[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181127224052.2zyxkdo4lbecq4cz@gmail.com>
Date: Tue, 27 Nov 2018 12:40:52 -1000
From: Joey Pabalinas <joeypabalinas@...il.com>
To: Hugh Dickins <hughd@...gle.com>
Cc: Mike Rapoport <rppt@...ux.ibm.com>,
Matthew Wilcox <willy@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Baoquan He <bhe@...hat.com>, Michal Hocko <mhocko@...e.com>,
Vlastimil Babka <vbabka@...e.cz>,
Andrea Arcangeli <aarcange@...hat.com>,
David Hildenbrand <david@...hat.com>,
Mel Gorman <mgorman@...hsingularity.net>,
David Herrmann <dh.herrmann@...il.com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Kan Liang <kan.liang@...el.com>,
Andi Kleen <ak@...ux.intel.com>,
Davidlohr Bueso <dave@...olabs.net>,
Peter Zijlstra <peterz@...radead.org>,
Christoph Lameter <cl@...ux.com>,
Nick Piggin <npiggin@...il.com>, pifang@...hat.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Joey Pabalinas <joeypabalinas@...il.com>
Subject: Re: [PATCHi v2] mm: put_and_wait_on_page_locked() while page is
migrated
On Tue, Nov 27, 2018 at 01:08:50PM -0800, Hugh Dickins wrote:
> On Tue, 27 Nov 2018, Mike Rapoport wrote:
> > On Mon, Nov 26, 2018 at 11:27:07AM -0800, Hugh Dickins wrote:
> > >
> > > +/*
> > > + * A choice of three behaviors for wait_on_page_bit_common():
> > > + */
> > > +enum behavior {
> > > + EXCLUSIVE, /* Hold ref to page and take the bit when woken, like
> > > + * __lock_page() waiting on then setting PG_locked.
> > > + */
> > > + SHARED, /* Hold ref to page and check the bit when woken, like
> > > + * wait_on_page_writeback() waiting on PG_writeback.
> > > + */
> > > + DROP, /* Drop ref to page before wait, no check when woken,
> > > + * like put_and_wait_on_page_locked() on PG_locked.
> > > + */
> > > +};
> >
> > Can we please make it:
> >
> > /**
> > * enum behavior - a choice of three behaviors for wait_on_page_bit_common()
> > */
> > enum behavior {
> > /**
> > * @EXCLUSIVE: Hold ref to page and take the bit when woken,
> > * like __lock_page() waiting on then setting %PG_locked.
> > */
> > EXCLUSIVE,
> > /**
> > * @SHARED: Hold ref to page and check the bit when woken,
> > * like wait_on_page_writeback() waiting on %PG_writeback.
> > */
> > SHARED,
> > /**
> > * @DROP: Drop ref to page before wait, no check when woken,
> > * like put_and_wait_on_page_locked() on %PG_locked.
> > */
> > DROP,
> > };
>
> I'm with Matthew, I'd prefer not: the first looks a more readable,
> less cluttered comment to me than the second: this is just an arg
> to an internal helper in mm/filemap.c, itself not kernel-doc'ed.
>
> But the comment is not there for me: if consensus is that the
> second is preferable, then sure, we can change it over.
For something which is internal to a single file I strongly prefer
the first as well.
--
Cheers,
Joey Pabalinas
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists