linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: John Hubbard <jhubbard@nvidia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Joao Martins <joao.m.martins@oracle.com>,
	linux-mm <linux-mm@kvack.org>, Jonathan Corbet <corbet@lwn.net>,
	Dan Williams <dan.j.williams@intel.com>,
	Dave Chinner <david@fromorbit.com>,
	Christoph Hellwig <hch@infradead.org>,
	Ira Weiny <ira.weiny@intel.com>, Jan Kara <jack@suse.cz>,
	Jane Chu <jane.chu@oracle.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	<linux-nvdimm@lists.01.org>, Michal Hocko <mhocko@suse.com>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	Shuah Khan <shuah@kernel.org>,
	Muchun Song <songmuchun@bytedance.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH] mm/up: combine put_compound_head() and unpin_user_page()
Date: Wed, 9 Dec 2020 17:03:32 -0400	[thread overview]
Message-ID: <20201209210332.GW552508@nvidia.com> (raw)
In-Reply-To: <16128311-9874-dcd4-c641-c68b34c9d634@nvidia.com>

On Wed, Dec 09, 2020 at 12:57:38PM -0800, John Hubbard wrote:
> > diff --git a/mm/gup.c b/mm/gup.c
> > index 98eb8e6d2609c3..7b33b7d4b324d7 100644
> > +++ b/mm/gup.c
> > @@ -123,6 +123,28 @@ static __maybe_unused struct page *try_grab_compound_head(struct page *page,
> >   	return NULL;
> >   }
> > +static void put_compound_head(struct page *page, int refs, unsigned int flags)
> > +{
> 
> It might be nice to rename "page" to "head", here.
> 
> While reading this I toyed with the idea of having this at the top:
> 
> 	VM_BUG_ON_PAGE(compound_head(page) != page, page);
> 
> ...but it's overkill in a static function with pretty clear call sites. So I
> think it's just right as-is.

Matt's folio patches would take are of this, when that is available
all this becomes a lot better.

Thanks,
Jason


  reply	other threads:[~2020-12-09 21:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 19:13 Jason Gunthorpe
2020-12-09 20:57 ` John Hubbard
2020-12-09 21:03   ` Jason Gunthorpe [this message]
2020-12-09 23:21 ` Ira Weiny
2020-12-10  9:22 ` Jan Kara

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=20201209210332.GW552508@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=dan.j.williams@intel.com \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=ira.weiny@intel.com \
    --cc=jack@suse.cz \
    --cc=jane.chu@oracle.com \
    --cc=jhubbard@nvidia.com \
    --cc=joao.m.martins@oracle.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    --cc=shuah@kernel.org \
    --cc=songmuchun@bytedance.com \
    --cc=vbabka@suse.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox