From: Dave Hansen <dave@sr71.net>
To: Christoph Lameter <cl@linux.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
kirill.shutemov@linux.intel.com, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] [RFC] mm: slab: separate slab_page from 'struct page'
Date: Tue, 10 Dec 2013 14:21:04 -0800 [thread overview]
Message-ID: <52A793D0.4020306@sr71.net> (raw)
In-Reply-To: <00000142de866123-cf1406b5-b7a3-4688-b46f-80e338a622a1-000000@email.amazonses.com>
On 12/10/2013 02:00 PM, Christoph Lameter wrote:
>> > We _need_ to share fields when the structure is handed between different
>> > subsystems and it needs to be consistent in both places. For slab page
>> > at least, the only data that actually gets used consistently is
>> > page->flags. It seems silly to bend over backwards just to share a
>> > single bitfield.
> If you get corruption in one field then you need to figure out which other
> subsystem could have accessed that field. Its not a single bitfield. There
> are numerous relationships between the fields in struct page.
I'm not saying that every 'struct page' user should get their own
complete structure. I'm just saying that the *slabs* should get their
own structure. Let's go through it field by field for the "normal"
'struct page' without debugging options:
page->flags: shared by everybody, needs to be consistent for things
like memory error handling
mapping: unioned over by s_mem for slab
index: unioned over by freelist for sl[oua]b
_count: unioned over by lots of stuff by sl[oua]b
lru: unioned over by lots of stuff by sl[oua]b, including another
list_head called 'list' which blk-mq.c is now using.
private: opaque storage anyway, but unioned over by sl[au]b
See? *EVERYTHING* is overridden by at least one of the sl?b allocators
except ->flags. In other words, there *ARE* no relationships when it
comes to the sl?bs, except for page->flags.
--
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-12-11 13:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 20:46 [PATCH] [RFC] mm: slab: separate slab_page from 'struct page' Dave Hansen
2013-12-10 21:07 ` Christoph Lameter
2013-12-10 21:44 ` Dave Hansen
2013-12-10 22:00 ` Christoph Lameter
2013-12-10 22:21 ` Dave Hansen [this message]
2013-12-12 17:37 ` Christoph Lameter
2013-12-12 19:28 ` 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=52A793D0.4020306@sr71.net \
--to=dave@sr71.net \
--cc=ak@linux.intel.com \
--cc=cl@linux.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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).