From: Conrad Parker <conrad@metadecks.org>
To: linux-sh@vger.kernel.org
Subject: Re: Coherent memory allocator
Date: Thu, 29 Jul 2010 11:16:43 +0000 [thread overview]
Message-ID: <AANLkTinB=VSSRDusH9FhOx5sk0keFEUm=aEb=OS-g_zg@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinQHQOATkLVc+v+mWBzc3rprnA11yvLmMOmBhuM@mail.gmail.com>
On 29 July 2010 19:50, Andrew Murray <amurray@mpcdata.com> wrote:
> Hello,
>
> Whilst trying to reduce boot time on an SH kernel I noticed the
> coherent memory allocator (dma_generic_alloc_coherent) in
> arch/sh/mm/consistent.c always memset's the memory it allocates to 0 -
> regardless of the user's intention (i.e use of __GFP_ZERO flag as
> argument).
>
> I would expect this function to not memset it's memory and instead
> allow the user to specify if they want the memory zeroed through the
> gfp flags. This would ensure memory is only zeroed when required - and
> when it is required the __get_free_pages implementation uses the more
> efficient clear_page implementation.
>
> However removing the memset may break drivers than rely on zeroed
> memory even though they don't request it.
>
> Is my reasoning valid? Shall I submit a patch?
I have no idea if your reasoning is valid, but in general if you send
a patch to the list then it makes it easier for anyone who might be
affected to test if their environment breaks ... no need to ask for
permission to send a patch :)
Conrad.
prev parent reply other threads:[~2010-07-29 11:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-29 10:50 Coherent memory allocator Andrew Murray
2010-07-29 11:16 ` Conrad Parker [this message]
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='AANLkTinB=VSSRDusH9FhOx5sk0keFEUm=aEb=OS-g_zg@mail.gmail.com' \
--to=conrad@metadecks.org \
--cc=linux-sh@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).