From: Andrew Morton <akpm@linux-foundation.org>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Vineet.Gupta1@synopsys.com, liwanp@linux.vnet.ibm.com,
mingo@kernel.org, tj@kernel.org, vgupta@synopsys.com
Subject: Re: + memblock-add-assertion-for-zero-allocation-alignment.patch added to -mm tree
Date: Wed, 6 Mar 2013 16:16:19 -0800 [thread overview]
Message-ID: <20130306161619.0b8e3674d91bc3b5f1927813@linux-foundation.org> (raw)
In-Reply-To: <CAE9FiQVAnR08U=ywUzk_4fkSh_mz6sZqtwWg02YzzF_cbN45rQ@mail.gmail.com>
On Wed, 6 Mar 2013 16:07:20 -0800 Yinghai Lu <yinghai@kernel.org> wrote:
> > --- a/mm/memblock.c~memblock-add-assertion-for-zero-allocation-alignment
> > +++ a/mm/memblock.c
> > @@ -771,6 +771,9 @@ static phys_addr_t __init memblock_alloc
> > {
> > phys_addr_t found;
> >
> > + if (WARN_ON(!align))
> > + align = __alignof__(long long);
> > +
> > /* align @size to avoid excessive fragmentation on reserved array */
> > size = round_up(size, align);
>
> Hi, Peter,
>
> Do you agree that we should check align in round_up()?
As you don't describe your reasoning it is hard to say.
But no, I don't think so. Checking for zero would add a pile of
basically useless code to the 100+ round_up() callsites, and
round_up(x, 0) is kinda meaningful, in a strange way.
next prev parent reply other threads:[~2013-03-07 0:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130306224405.8160D5A4082@corp2gmr1-2.hot.corp.google.com>
2013-03-07 0:07 ` Yinghai Lu
2013-03-07 0:16 ` Andrew Morton [this message]
2013-03-07 1:03 ` H. Peter Anvin
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=20130306161619.0b8e3674d91bc3b5f1927813@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Vineet.Gupta1@synopsys.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liwanp@linux.vnet.ibm.com \
--cc=mingo@kernel.org \
--cc=tj@kernel.org \
--cc=vgupta@synopsys.com \
--cc=yinghai@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
all inboxes | Powered by JetHome®