From: Cody P Schafer <cody@linux.vnet.ibm.com>
To: Jiang Liu <liuj97@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux MM <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: sparse: use __aligned() instead of manual padding in mem_section
Date: Thu, 30 May 2013 09:36:07 -0700 [thread overview]
Message-ID: <51A77FF7.5090908@linux.vnet.ibm.com> (raw)
In-Reply-To: <51A6A34B.6020907@gmail.com>
On 05/29/2013 05:54 PM, Jiang Liu wrote:
> On Thu 30 May 2013 07:14:39 AM CST, Cody P Schafer wrote:
>> Also, does anyone know what causes this alignment to be required here? I found
>> this was breaking things in a patchset I'm working on (WARNs in sysfs code
>> about duplicate filenames when initing mem_sections). Adding some documentation
>> for the reason would be appreciated.
> Hi Cody,
> I think the alignment requirement is caused by the way the
> mem_section array is
> organized. Basically it requires that PAGE_SIZE could be divided by
> sizeof(struct mem_section).
> So your change seems risky too because it should be aligned to power of
> two instead
> of 2 * sizeof(long).
Well, if that's the case then this patch is wrong, and manual padding
may be the only way to go. :(
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-05-30 16:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-29 23:14 [PATCH] mm: sparse: use __aligned() instead of manual padding in mem_section Cody P Schafer
2013-05-30 0:54 ` Jiang Liu
2013-05-30 16:36 ` Cody P Schafer [this message]
2013-05-30 17:39 ` Dave Hansen
2013-05-30 18:40 ` [PATCH] sparsemem: BUILD_BUG_ON when sizeof mem_section is non-power-of-2 Cody P Schafer
2013-05-30 19:18 ` Dave Hansen
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=51A77FF7.5090908@linux.vnet.ibm.com \
--to=cody@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liuj97@gmail.com \
/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).