linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Song Liu <songliubraving@fb.com>
Cc: "William Kucharski" <william.kucharski@oracle.com>,
	"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>,
	"linux-afs@lists.infradead.org" <linux-afs@lists.infradead.org>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Linux-MM <linux-mm@kvack.org>,
	Networking <netdev@vger.kernel.org>, "Chris Mason" <clm@fb.com>,
	"David S. Miller" <davem@davemloft.net>,
	"David Sterba" <dsterba@suse.com>,
	"Josef Bacik" <josef@toxicpanda.com>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"Bob Kasten" <robert.a.kasten@intel.com>,
	"Mike Kravetz" <mike.kravetz@oracle.com>,
	"Chad Mynhier" <chad.mynhier@oracle.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	"Johannes Weiner" <jweiner@fb.com>,
	"Dave Airlie" <airlied@redhat.com>,
	"Vlastimil Babka" <vbabka@suse.cz>,
	"Keith Busch" <keith.busch@intel.com>,
	"Ralph Campbell" <rcampbell@nvidia.com>,
	"Steve Capper" <steve.capper@arm.com>,
	"Dave Chinner" <dchinner@redhat.com>,
	"Sean Christopherson" <sean.j.christopherson@intel.com>,
	"Hugh Dickins" <hughd@google.com>,
	"Ilya Dryomov" <idryomov@gmail.com>,
	"Alexander Duyck" <alexander.h.duyck@linux.intel.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Jérôme Glisse" <jglisse@redhat.com>,
	"Amir Goldstein" <amir73il@gmail.com>,
	"Jason Gunthorpe" <jgg@ziepe.ca>,
	"Michal Hocko" <mhocko@suse.com>, "Jann Horn" <jannh@google.com>,
	"David Howells" <dhowells@redhat.com>,
	"John Hubbard" <jhubbard@nvidia.com>,
	"Souptick Joarder" <jrdr.linux@gmail.com>,
	"john.hubbard@gmail.com" <john.hubbard@gmail.com>,
	"Jan Kara" <jack@suse.cz>,
	"Andrey Konovalov" <andreyknvl@google.com>,
	"Arun KS" <arunks@codeaurora.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	"Jeff Layton" <jlayton@kernel.org>,
	"Yangtao Li" <tiny.windzz@gmail.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Robin Murphy" <robin.murphy@arm.com>,
	"Mike Rapoport" <rppt@linux.ibm.com>,
	"David Rientjes" <rientjes@google.com>,
	"Andrey Ryabinin" <aryabinin@virtuozzo.com>,
	"Yafang Shao" <laoar.shao@gmail.com>,
	"Huang Shijie" <sjhuang@iluvatar.ai>,
	"Yang Shi" <yang.shi@linux.alibaba.com>,
	"Miklos Szeredi" <mszeredi@redhat.com>,
	"Pavel Tatashin" <pasha.tatashin@oracle.com>,
	"Kirill Tkhai" <ktkhai@virtuozzo.com>,
	"Sage Weil" <sage@redhat.com>, "Ira Weiny" <ira.weiny@intel.com>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	"Gao Xiang" <hsiangkao@aol.com>,
	"Bartlomiej Zolnierkiewicz" <b.zolnierkie@samsung.com>,
	"Ross Zwisler" <zwisler@google.com>,
	"kbuild test robot" <lkp@intel.com>
Subject: Re: [PATCH v2 1/2] mm: Allow the page cache to allocate large pages
Date: Tue, 30 Jul 2019 13:26:32 -0700	[thread overview]
Message-ID: <20190730202632.GC4700@bombadil.infradead.org> (raw)
In-Reply-To: <443BA74D-9A8E-479B-9E63-4ACD6D6C0AF9@fb.com>

On Mon, Jul 29, 2019 at 10:03:40PM +0000, Song Liu wrote:
> > +/* If you add more flags, increment FGP_ORDER_SHIFT */
> > +#define	FGP_ORDER_SHIFT		7
> > +#define	FGP_PMD			((PMD_SHIFT - PAGE_SHIFT) << FGP_ORDER_SHIFT)
> > +#define	FGP_PUD			((PUD_SHIFT - PAGE_SHIFT) << FGP_ORDER_SHIFT)
> > +#define	fgp_get_order(fgp)	((fgp) >> FGP_ORDER_SHIFT)
> 
> This looks like we want support order up to 25 (32 - 7). I guess we don't 
> need that many. How about we specify the highest order to support here? 

We can support all the way up to order 64 with just 6 bits, leaving 32 -
6 - 7 = 19 bits free.  We haven't been adding FGP flags very quickly,
so I doubt we'll need anything larger.

> Also, fgp_flags is signed int, so we need to make sure fgp_flags is not
> negative. 

If we ever get there, I expect people to convert the parameter from signed
int to unsigned long.


  reply	other threads:[~2019-07-30 20:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29 21:09 [PATCH v2 0/2] mm,thp: Add filemap_huge_fault() for THP William Kucharski
2019-07-29 21:09 ` [PATCH v2 1/2] mm: Allow the page cache to allocate large pages William Kucharski
2019-07-29 22:03   ` Song Liu
2019-07-30 20:26     ` Matthew Wilcox [this message]
2019-07-30 21:13       ` Song Liu
2019-07-29 21:09 ` [PATCH v2 2/2] mm,thp: Add experimental config option RO_EXEC_FILEMAP_HUGE_FAULT_THP William Kucharski
2019-07-29 22:47   ` Dan Williams
2019-07-30 19:18     ` Matthew Wilcox
2019-07-29 22:51   ` Song Liu
2019-07-30 14:11     ` William Kucharski
2019-07-30 19:14       ` Song Liu

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=20190730202632.GC4700@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=airlied@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=amir73il@gmail.com \
    --cc=andreyknvl@google.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=arunks@codeaurora.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=chad.mynhier@oracle.com \
    --cc=clm@fb.com \
    --cc=dan.j.williams@intel.com \
    --cc=darrick.wong@oracle.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=dchinner@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=dsterba@suse.com \
    --cc=hsiangkao@aol.com \
    --cc=hughd@google.com \
    --cc=idryomov@gmail.com \
    --cc=ira.weiny@intel.com \
    --cc=jack@suse.cz \
    --cc=jannh@google.com \
    --cc=jgg@ziepe.ca \
    --cc=jglisse@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=jlayton@kernel.org \
    --cc=john.hubbard@gmail.com \
    --cc=josef@toxicpanda.com \
    --cc=jrdr.linux@gmail.com \
    --cc=jweiner@fb.com \
    --cc=keith.busch@intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=ktkhai@virtuozzo.com \
    --cc=laoar.shao@gmail.com \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    --cc=mszeredi@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pasha.tatashin@oracle.com \
    --cc=rcampbell@nvidia.com \
    --cc=rientjes@google.com \
    --cc=robert.a.kasten@intel.com \
    --cc=robin.murphy@arm.com \
    --cc=rppt@linux.ibm.com \
    --cc=sage@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=sjhuang@iluvatar.ai \
    --cc=songliubraving@fb.com \
    --cc=steve.capper@arm.com \
    --cc=tglx@linutronix.de \
    --cc=tiny.windzz@gmail.com \
    --cc=vbabka@suse.cz \
    --cc=william.kucharski@oracle.com \
    --cc=yang.shi@linux.alibaba.com \
    --cc=zwisler@google.com \
    /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).