public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Andrew Fish <afish@apple.com>
To: Eugene Cohen <eugene@hp.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"liming.gao@intel.com" <liming.gao@intel.com>,
	"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>
Subject: Re: [PATCH 1/3] ArmPkg/CompilerIntrinsicsLib: replace memcpy and memset with C code
Date: Thu, 11 Aug 2016 16:04:20 -0700	[thread overview]
Message-ID: <93CB1B8B-8788-49FD-8FBE-9DF24F838FA6@apple.com> (raw)
In-Reply-To: <AT5PR84MB029157C951664077DEE207ABB41E0@AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM>


> On Aug 11, 2016, at 2:50 PM, Cohen, Eugene <eugene@hp.com> wrote:
> 
>>> Why does memcpy performance matter?  In addition to the overall
>> memcpy stuff scattered around C code we have an instance that is
>> particularly sensitive to memcpy performance.  For DMA operations
>> when invoking double-buffering or access to portions of a buffer that
>> is common mapped (i.e. uncached on non-coherent DMA systems) the
>> impact of a non-optimized memcpy is enormous compared to the
>> optimized ones because the penalty is amplified by orders of
>> magnitude due to uncached memory access latency.
>>> 
>> 
>> That code would be using CopyMem(), no? This only serves the
>> compiler
>> generated calls, which are few since Tianocore does not allow
>> initialized locals.
> 
> I see and agree that should minimize the impact.   I guess I'll ask the naive question.  Could the BaseMemoryLib and CompilerIntrinsicsLib share the same stuff?
> 

Eugene,

I think if a CompilerIntrinsicsLib implementation consumes the BaseMemoryLib class (lists it in the INF) then I think it should just work.

Thanks,

Andrew Fish

> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel



  parent reply	other threads:[~2016-08-11 23:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11 18:20 [PATCH 1/3] ArmPkg/CompilerIntrinsicsLib: replace memcpy and memset with C code Ard Biesheuvel
2016-08-11 18:20 ` [PATCH 2/3] BaseTools RVCT: ignore various RVC diagnostics Ard Biesheuvel
2016-08-12  3:04   ` Gao, Liming
2016-08-11 18:20 ` [PATCH 3/3] MdePkg RVCT: add definition of UNREACHABLE Ard Biesheuvel
2016-08-12  3:04   ` Gao, Liming
2016-08-11 21:34 ` [PATCH 1/3] ArmPkg/CompilerIntrinsicsLib: replace memcpy and memset with C code Cohen, Eugene
2016-08-11 21:45   ` Ard Biesheuvel
2016-08-11 21:50     ` Cohen, Eugene
2016-08-11 21:53       ` Ard Biesheuvel
2016-08-11 23:04       ` Andrew Fish [this message]
2016-08-12  8:09         ` Ard Biesheuvel
2016-09-01 13:11 ` Leif Lindholm

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-list 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=93CB1B8B-8788-49FD-8FBE-9DF24F838FA6@apple.com \
    --to=devel@edk2.groups.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox