All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: chenj <chenj@lemote.com>, <james.hogan@imgtec.com>
Cc: <linux-mips@linux-mips.org>, <chenhc@lemote.com>
Subject: Re: [PATCH, v3] MIPS: lib: csum_partial: more instruction paral
Date: Tue, 20 May 2014 13:05:57 +0100	[thread overview]
Message-ID: <537B4525.3080903@imgtec.com> (raw)
In-Reply-To: <1400587772-6130-1-git-send-email-chenj@lemote.com>

On 05/20/2014 01:09 PM, chenj wrote:
> Computing sum introduces true data dependency. This patch removes some
> true data depdendencies, hence instruction level parallelism is
> improved.
> 
> This patch brings at most 50% csum performance gain on Loongson 3a
> processor in our test.
> 
> One example about how this patch works is in CSUM_BIGCHUNK1:
> // ** original **    vs    ** patch applied **
>     ADDC(sum, t0)           ADDC(t0, t1)
>     ADDC(sum, t1)           ADDC(t2, t3)
>     ADDC(sum, t2)           ADDC(sum, t0)
>     ADDC(sum, t3)           ADDC(sum, t2)
> 
> In the original implementation, each ADDC(sum, ...) references the sum
> value updated by previous ADDC.
> 
> With patch applied, the first two ADDC operations are independent,
> hence can be executed simultaneously if possible.
> 
> Another example is in the "copy and sum calculating" chunk:
> // ** original **    vs    ** patch applied **
>     STORE(t0, UNIT(0)...    STORE(t0, UNIT(0)...
>     ADDC(sum, t0)           ADDC(t0, t1)
>     STORE(t1, UNIT(1)...    STORE(t1, UNIT(1)...
>     ADDC(sum, t1)           ADDC(sum, t0)
>     STORE(t2, UNIT(2)...    STORE(t2, UNIT(2)...
>     ADDC(sum, t2)           ADDC(t2, t3)
>     STORE(t3, UNIT(3)...    STORE(t3, UNIT(3)...
>     ADDC(sum, t3)           ADDC(sum, t2)
> 
> With patch applied, the second and third ADDC are independent.

Hi chenj,

You forgot to sign-off your patch

-- 
markos

WARNING: multiple messages have this Message-ID (diff)
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: chenj <chenj@lemote.com>, james.hogan@imgtec.com
Cc: linux-mips@linux-mips.org, chenhc@lemote.com
Subject: Re: [PATCH, v3] MIPS: lib: csum_partial: more instruction paral
Date: Tue, 20 May 2014 13:05:57 +0100	[thread overview]
Message-ID: <537B4525.3080903@imgtec.com> (raw)
Message-ID: <20140520120557.uaF-1eeraztb0gok1pNtrvpe8Vj9dgI3V2QfvjlcAKY@z> (raw)
In-Reply-To: <1400587772-6130-1-git-send-email-chenj@lemote.com>

On 05/20/2014 01:09 PM, chenj wrote:
> Computing sum introduces true data dependency. This patch removes some
> true data depdendencies, hence instruction level parallelism is
> improved.
> 
> This patch brings at most 50% csum performance gain on Loongson 3a
> processor in our test.
> 
> One example about how this patch works is in CSUM_BIGCHUNK1:
> // ** original **    vs    ** patch applied **
>     ADDC(sum, t0)           ADDC(t0, t1)
>     ADDC(sum, t1)           ADDC(t2, t3)
>     ADDC(sum, t2)           ADDC(sum, t0)
>     ADDC(sum, t3)           ADDC(sum, t2)
> 
> In the original implementation, each ADDC(sum, ...) references the sum
> value updated by previous ADDC.
> 
> With patch applied, the first two ADDC operations are independent,
> hence can be executed simultaneously if possible.
> 
> Another example is in the "copy and sum calculating" chunk:
> // ** original **    vs    ** patch applied **
>     STORE(t0, UNIT(0)...    STORE(t0, UNIT(0)...
>     ADDC(sum, t0)           ADDC(t0, t1)
>     STORE(t1, UNIT(1)...    STORE(t1, UNIT(1)...
>     ADDC(sum, t1)           ADDC(sum, t0)
>     STORE(t2, UNIT(2)...    STORE(t2, UNIT(2)...
>     ADDC(sum, t2)           ADDC(t2, t3)
>     STORE(t3, UNIT(3)...    STORE(t3, UNIT(3)...
>     ADDC(sum, t3)           ADDC(sum, t2)
> 
> With patch applied, the second and third ADDC are independent.

Hi chenj,

You forgot to sign-off your patch

-- 
markos

  reply	other threads:[~2014-05-20 12:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1400587638-17791-1-git-send-email-chenj@lemote.com>
2014-05-20 12:09 ` [PATCH, v3] MIPS: lib: csum_partial: more instruction paral chenj
2014-05-20 12:05   ` Markos Chandras [this message]
2014-05-20 12:05     ` Markos Chandras
2014-05-20 12:33     ` [PATCH] " chenj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=537B4525.3080903@imgtec.com \
    --to=markos.chandras@imgtec.com \
    --cc=chenhc@lemote.com \
    --cc=chenj@lemote.com \
    --cc=james.hogan@imgtec.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.