From: Matthew Wilcox <willy@infradead.org>
To: Christopher Lameter <cl@linux.com>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH] slub: Remove use of page->counter
Date: Tue, 10 Apr 2018 13:57:57 -0700 [thread overview]
Message-ID: <20180410205757.GD21336@bombadil.infradead.org> (raw)
In-Reply-To: <alpine.DEB.2.20.1804101545350.30437@nuc-kabylake>
On Tue, Apr 10, 2018 at 03:47:28PM -0500, Christopher Lameter wrote:
> On Tue, 10 Apr 2018, Matthew Wilcox wrote:
>
> > In my continued attempt to clean up struct page, I've got to the point
> > where it'd be really nice to get rid of 'counters'. I like the patch
> > below because it makes it clear when & where we're doing "weird" things
> > to access the various counters.
>
> Well sounds good.
>
> > struct {
> > unsigned long flags;
> > union {
> > struct {
> > struct address_space *mapping;
> > pgoff_t index;
> > };
> > struct {
> > void *s_mem;
/* Dword boundary */
> > void *freelist;
> > };
> > ...
> > };
> > union {
> > atomic_t _mapcount;
> > unsigned int active;
>
> Is this aligned on a doubleword boundary? Maybe move the refcount below
> the flags field?
You need freelist and _mapcount to be in the same dword. There's no
space to put them both in dword 0, so that's used for flags and mapping
/ s_mem. Then freelist, mapcount and refcount are in dword 1 (on 64-bit),
or freelist & mapcount are in dword 1 on 32-bit. After that, 32 and 64-bit
no longer line up on the same dword boundaries.
next prev parent reply other threads:[~2018-04-10 20:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-10 19:54 Matthew Wilcox
2018-04-10 20:47 ` Christopher Lameter
2018-04-10 20:57 ` Matthew Wilcox [this message]
2018-04-10 22:03 ` Christopher Lameter
2018-04-11 18:26 ` Matthew Wilcox
2018-04-16 13:53 ` Matthew Wilcox
2018-04-16 15:08 ` Christopher Lameter
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=20180410205757.GD21336@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=cl@linux.com \
--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