All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: David Hildenbrand <david@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>,
	linux-mm@kvack.org, Kent Overstreet <kent.overstreet@gmail.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] pgflags_t
Date: Wed, 6 Oct 2021 15:28:45 +0000	[thread overview]
Message-ID: <YV3ArQxQ7CFzhBhR@zeniv-ca.linux.org.uk> (raw)
In-Reply-To: <106400c5-d3f2-e858-186a-82f9b517917b@redhat.com>

On Wed, Oct 06, 2021 at 05:23:49PM +0200, David Hildenbrand wrote:
> On 06.10.21 17:22, Al Viro wrote:
> > On Wed, Oct 06, 2021 at 03:58:14PM +0100, Matthew Wilcox wrote:
> > > David expressed some unease about the lack of typesafety in patches
> > > 1 & 2 of the page->slab conversion [1], and I'll admit to not being
> > > particularly a fan of passing around an unsigned long.  That crystallised
> > > in a discussion with Kent [2] about how to lock a page when you don't know
> > > its type (solution: every memory descriptor type starts with a
> > > pgflags_t)
> > 
> > Why bother making it a struct?  What's wrong with __bitwise and letting
> > sparse catch conversions?
> > 
> 
> As I raised in my reply, we store all kinds of different things in
> page->flags ... not sure if that could be worked around somehow.

What of that?  Inline helpers with force-casts for accessing those and
that's it...

Use of __bitwise is simply invisible to compiler - it doesn't get past the
preprocessor on non-sparse builds.  So it's not like you'd disrupt the
atomic accesses, layout, etc.

  reply	other threads:[~2021-10-06 15:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-06 14:58 [RFC] pgflags_t Matthew Wilcox
2021-10-06 15:16 ` David Hildenbrand
2021-10-06 15:29   ` Matthew Wilcox
2021-10-06 15:22 ` Al Viro
2021-10-06 15:23   ` David Hildenbrand
2021-10-06 15:28     ` Al Viro [this message]
2021-10-06 15:32       ` David Hildenbrand
2021-10-06 15:46         ` Al Viro
2021-10-06 15:47           ` David Hildenbrand
2021-10-06 15:38   ` Matthew Wilcox
2021-10-06 15:48     ` Al Viro
2021-10-07 14:37 ` Vlastimil Babka
2021-10-07 14:48   ` Matthew Wilcox

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=YV3ArQxQ7CFzhBhR@zeniv-ca.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.