From patchwork Sun Jul 28 22:47:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Kucharski X-Patchwork-Id: 11063081 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DB39213A4 for ; Sun, 28 Jul 2019 22:49:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF92F286BE for ; Sun, 28 Jul 2019 22:49:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC8BE286F3; Sun, 28 Jul 2019 22:49:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A90AC286BE for ; Sun, 28 Jul 2019 22:49:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2D9458E0005; Sun, 28 Jul 2019 18:49:38 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 28B288E0003; Sun, 28 Jul 2019 18:49:38 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0666A8E0005; Sun, 28 Jul 2019 18:49:37 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-vs1-f69.google.com (mail-vs1-f69.google.com [209.85.217.69]) by kanga.kvack.org (Postfix) with ESMTP id CE4F18E0002 for ; Sun, 28 Jul 2019 18:49:37 -0400 (EDT) Received: by mail-vs1-f69.google.com with SMTP id 66so10173291vsp.2 for ; Sun, 28 Jul 2019 15:49:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=zXJGbPdLQetWR9mQOqHja7x/P9Sjt9M+ElbTWB13yNc=; b=icAI8tTRRr09zqDcDuATzHOega7l32lEDtowU/B5zE0rToCL+Qvp2ckH4fsuXGL2XV iMeZbxdeuPO8nssPtrleKTKODf9r4+++snQSt29Q13LYqyupuiHJo5xOZRiDhsAPEMwu JxMlkjhaLx+vFdahnPaDvZBW5qgLd/D/r57oSweIT8mkVb92HaS6uJWEkw4Wa7jeCt9s ew2zNEYa/hC8rpOchXAKd/oJQPkJRBfsKiOmhhCRgW8YPnHZc0QnkSf8muGx6p3d1q65 BC7ciJ2XXw7N6dHtGR2oi4sJWyO4WJO4FjpSdjPEXaUwKT3NF6Rh1sxF0M/47ZlzeWql 6izA== X-Gm-Message-State: APjAAAVMKMt90d+7OgXqkEUdo5q2gHIaIdnF2eI5R8W48Fjm1dBzSPg0 AkZRwcOHyPLH6sZ/T0t4SLqsG8nmf2fPyWx6SknYFngG8UMpVFP19gjf15wU7poVXv2zo6Lg7LG 8jJollbwvEwAp1sQrhW2hl1wx1Lc7xwYQTIXgN0mofWCV3AQOR+XYlVNnX7RAhf+QCA== X-Received: by 2002:a67:1a81:: with SMTP id a123mr66859113vsa.162.1564354177401; Sun, 28 Jul 2019 15:49:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWWnlHU8qNMUro21YNHKM9KKK4gOxe/WcIqiKzW1rs8pfg9X3YJf1yRjX+m+dgXVAKZpXL X-Received: by 2002:a67:1a81:: with SMTP id a123mr66859100vsa.162.1564354176470; Sun, 28 Jul 2019 15:49:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564354176; cv=none; d=google.com; s=arc-20160816; b=SgPu9eez6Ti8KSJPAk8LU7oVdXoYFhRSXvRRrnJaV1pLyF68xMVv521nTUCh7IMMe0 +C91OmQ0iGeLXLMljzNNd8y0lYXcBT6w4fygSXSmVsZAPGJDwzM1Io5QJ6fAyRo2jZo8 HJ6A0gtXcBEw886fOAkLsGpDXCJr5cCPWHuzNwWuh5WdZztafUBTICzvjgim0C+lxLvY pFHxfICBCP26D1hGwwv5y0/67wK1UVe7WgvEALXtBArZsBN6YUfTp8i/l4YIQXsodP7Q DCbsptSGPmBarrumkWl8kzyyc599CO4/qdvIGBzESh0CRvZyS4/wl0TfKJCtjH78EAId Sdzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zXJGbPdLQetWR9mQOqHja7x/P9Sjt9M+ElbTWB13yNc=; b=G4sQrFGH2Pute4CMGTeZxFePi1dBJ7Ze+CMoXtb2Wtmlwg2H79/BSVaoINkDWYPTmV XjpbbqRzeuOI+PGu8SfkdcTr6u+gMdjKFNbUqnC8srCPqf62atNsSADagKLKuYpvHasd Qy3IrW2N8+eeQmtgiM+t3XEFoW3RGtCnx/qmyA67oNsqGPFxC2V1P+qre8Qlm+mYjF/B jNW38hAM8URcH13iWq5Xf8cigyEqR6jkMIK2n82PLhcQDRGXLtnRvoVQeg9upfSj2gvW aiULMFG+dc+xTmlR42cscqNqDofwfFPCxI2o3iv87TZyJwvj4zISE0JwUOyYNyeaUBs2 tpzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=LeZ2MfjD; spf=pass (google.com: domain of william.kucharski@oracle.com designates 141.146.126.78 as permitted sender) smtp.mailfrom=william.kucharski@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from aserp2120.oracle.com (aserp2120.oracle.com. [141.146.126.78]) by mx.google.com with ESMTPS id x28si14151436vsi.430.2019.07.28.15.49.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jul 2019 15:49:36 -0700 (PDT) Received-SPF: pass (google.com: domain of william.kucharski@oracle.com designates 141.146.126.78 as permitted sender) client-ip=141.146.126.78; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=LeZ2MfjD; spf=pass (google.com: domain of william.kucharski@oracle.com designates 141.146.126.78 as permitted sender) smtp.mailfrom=william.kucharski@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6SMn095005197; Sun, 28 Jul 2019 22:49:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=zXJGbPdLQetWR9mQOqHja7x/P9Sjt9M+ElbTWB13yNc=; b=LeZ2MfjDE/SS3Gtde0StBs4/ljA2oNNH3kc9d/ytqtzGZLCpPwJorqAuj6WWwWaFc77f mxUSajHGvWReVv/WCOERqSV4IaDYDOM/g+y50GDq1nbiGQJWL2rUh7z6GOWc3x7VIOqp mBXk2DGnsQIHfQ1mNE5jyErxK7FU5VVjKfPhPk8xUjL7g+hRbKkADDL19AJ7C5+ujkvR Xn3oT/OzdCBnmwZRnHTdAhxvgftvysBOvR6m20bvdYmMt+UMWoRfd+1mA1i5IV8Q3Mvk XWKsLc27ZPwW3pfz1SeZar4m3ZsIr74232x6uzIoCCdTOLFQVZD7RhoU/djhoUlo+AiJ cw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2u0ejp44ca-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 28 Jul 2019 22:49:00 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6SMlovZ050927; Sun, 28 Jul 2019 22:48:56 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2u0bqt6t51-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 28 Jul 2019 22:48:56 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x6SMmfX4017546; Sun, 28 Jul 2019 22:48:42 GMT Received: from localhost.localdomain (/73.243.10.6) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 28 Jul 2019 15:48:40 -0700 From: William Kucharski To: ceph-devel@vger.kernel.org, linux-afs@lists.infradead.org, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, Chris Mason , "David S. Miller" , David Sterba , Josef Bacik Cc: Dave Hansen , Song Liu , Bob Kasten , Mike Kravetz , William Kucharski , Chad Mynhier , "Kirill A. Shutemov" , Johannes Weiner , Matthew Wilcox , Dave Airlie , Vlastimil Babka , Keith Busch , Ralph Campbell , Steve Capper , Dave Chinner , Sean Christopherson , Hugh Dickins , Ilya Dryomov , Alexander Duyck , Thomas Gleixner , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Amir Goldstein , Jason Gunthorpe , Michal Hocko , Jann Horn , David Howells , John Hubbard , Souptick Joarder , "john.hubbard@gmail.com" , Jan Kara , Andrey Konovalov , Arun KS , "Aneesh Kumar K.V" , Jeff Layton , Yangtao Li , Andrew Morton , Robin Murphy , Mike Rapoport , David Rientjes , Andrey Ryabinin , Yafang Shao , Huang Shijie , Yang Shi , Miklos Szeredi , Pavel Tatashin , Kirill Tkhai , Sage Weil , Ira Weiny , Dan Williams , "Darrick J. Wong" , Gao Xiang , Bartlomiej Zolnierkiewicz , Ross Zwisler Subject: [PATCH 1/2] mm: Allow the page cache to allocate large pages Date: Sun, 28 Jul 2019 16:47:07 -0600 Message-Id: <20190728224708.28192-2-william.kucharski@oracle.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190728224708.28192-1-william.kucharski@oracle.com> References: <20190728224708.28192-1-william.kucharski@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9332 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1907280284 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9332 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1907280285 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Matthew Wilcox Signed-off-by: William Kucharski --- fs/afs/dir.c | 2 +- fs/btrfs/compression.c | 2 +- fs/cachefiles/rdwr.c | 4 ++-- fs/ceph/addr.c | 2 +- fs/ceph/file.c | 2 +- include/linux/pagemap.h | 13 +++++++++---- mm/filemap.c | 25 +++++++++++++------------ mm/readahead.c | 2 +- net/ceph/pagelist.c | 4 ++-- net/ceph/pagevec.c | 2 +- 10 files changed, 32 insertions(+), 26 deletions(-) diff --git a/fs/afs/dir.c b/fs/afs/dir.c index e640d67274be..0a392214f71e 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -274,7 +274,7 @@ static struct afs_read *afs_read_dir(struct afs_vnode *dvnode, struct key *key) afs_stat_v(dvnode, n_inval); ret = -ENOMEM; - req->pages[i] = __page_cache_alloc(gfp); + req->pages[i] = __page_cache_alloc(gfp, 0); if (!req->pages[i]) goto error; ret = add_to_page_cache_lru(req->pages[i], diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 60c47b417a4b..5280e7477b7e 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -466,7 +466,7 @@ static noinline int add_ra_bio_pages(struct inode *inode, } page = __page_cache_alloc(mapping_gfp_constraint(mapping, - ~__GFP_FS)); + ~__GFP_FS), 0); if (!page) break; diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c index 44a3ce1e4ce4..11d30212745f 100644 --- a/fs/cachefiles/rdwr.c +++ b/fs/cachefiles/rdwr.c @@ -259,7 +259,7 @@ static int cachefiles_read_backing_file_one(struct cachefiles_object *object, goto backing_page_already_present; if (!newpage) { - newpage = __page_cache_alloc(cachefiles_gfp); + newpage = __page_cache_alloc(cachefiles_gfp, 0); if (!newpage) goto nomem_monitor; } @@ -495,7 +495,7 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object, goto backing_page_already_present; if (!newpage) { - newpage = __page_cache_alloc(cachefiles_gfp); + newpage = __page_cache_alloc(cachefiles_gfp, 0); if (!newpage) goto nomem; } diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index e078cc55b989..bcb41fbee533 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1707,7 +1707,7 @@ int ceph_uninline_data(struct file *filp, struct page *locked_page) if (len > PAGE_SIZE) len = PAGE_SIZE; } else { - page = __page_cache_alloc(GFP_NOFS); + page = __page_cache_alloc(GFP_NOFS, 0); if (!page) { err = -ENOMEM; goto out; diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 685a03cc4b77..ae58d7c31aa4 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -1305,7 +1305,7 @@ static ssize_t ceph_read_iter(struct kiocb *iocb, struct iov_iter *to) struct page *page = NULL; loff_t i_size; if (retry_op == READ_INLINE) { - page = __page_cache_alloc(GFP_KERNEL); + page = __page_cache_alloc(GFP_KERNEL, 0); if (!page) return -ENOMEM; } diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index c7552459a15f..e9004e3cb6a3 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -208,17 +208,17 @@ static inline int page_cache_add_speculative(struct page *page, int count) } #ifdef CONFIG_NUMA -extern struct page *__page_cache_alloc(gfp_t gfp); +extern struct page *__page_cache_alloc(gfp_t gfp, unsigned int order); #else -static inline struct page *__page_cache_alloc(gfp_t gfp) +static inline struct page *__page_cache_alloc(gfp_t gfp, unsigned int order) { - return alloc_pages(gfp, 0); + return alloc_pages(gfp, order); } #endif static inline struct page *page_cache_alloc(struct address_space *x) { - return __page_cache_alloc(mapping_gfp_mask(x)); + return __page_cache_alloc(mapping_gfp_mask(x), 0); } static inline gfp_t readahead_gfp_mask(struct address_space *x) @@ -240,6 +240,11 @@ pgoff_t page_cache_prev_miss(struct address_space *mapping, #define FGP_NOFS 0x00000010 #define FGP_NOWAIT 0x00000020 #define FGP_FOR_MMAP 0x00000040 +/* 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) struct page *pagecache_get_page(struct address_space *mapping, pgoff_t offset, int fgp_flags, gfp_t cache_gfp_mask); diff --git a/mm/filemap.c b/mm/filemap.c index d0cf700bf201..eb4c87428099 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -954,7 +954,7 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping, EXPORT_SYMBOL_GPL(add_to_page_cache_lru); #ifdef CONFIG_NUMA -struct page *__page_cache_alloc(gfp_t gfp) +struct page *__page_cache_alloc(gfp_t gfp, unsigned int order) { int n; struct page *page; @@ -964,12 +964,12 @@ struct page *__page_cache_alloc(gfp_t gfp) do { cpuset_mems_cookie = read_mems_allowed_begin(); n = cpuset_mem_spread_node(); - page = __alloc_pages_node(n, gfp, 0); + page = __alloc_pages_node(n, gfp, order); } while (!page && read_mems_allowed_retry(cpuset_mems_cookie)); return page; } - return alloc_pages(gfp, 0); + return alloc_pages(gfp, order); } EXPORT_SYMBOL(__page_cache_alloc); #endif @@ -1597,12 +1597,12 @@ EXPORT_SYMBOL(find_lock_entry); * pagecache_get_page - find and get a page reference * @mapping: the address_space to search * @offset: the page index - * @fgp_flags: PCG flags + * @fgp_flags: FGP flags * @gfp_mask: gfp mask to use for the page cache data page allocation * * Looks up the page cache slot at @mapping & @offset. * - * PCG flags modify how the page is returned. + * FGP flags modify how the page is returned. * * @fgp_flags can be: * @@ -1615,6 +1615,7 @@ EXPORT_SYMBOL(find_lock_entry); * - FGP_FOR_MMAP: Similar to FGP_CREAT, only we want to allow the caller to do * its own locking dance if the page is already in cache, or unlock the page * before returning if we had to add the page to pagecache. + * - FGP_PMD: If FGP_CREAT is specified, attempt to allocate a PMD-sized page. * * If FGP_LOCK or FGP_CREAT are specified then the function may sleep even * if the GFP flags specified for FGP_CREAT are atomic. @@ -1660,12 +1661,13 @@ struct page *pagecache_get_page(struct address_space *mapping, pgoff_t offset, no_page: if (!page && (fgp_flags & FGP_CREAT)) { int err; - if ((fgp_flags & FGP_WRITE) && mapping_cap_account_dirty(mapping)) + if ((fgp_flags & FGP_WRITE) && + mapping_cap_account_dirty(mapping)) gfp_mask |= __GFP_WRITE; if (fgp_flags & FGP_NOFS) gfp_mask &= ~__GFP_FS; - page = __page_cache_alloc(gfp_mask); + page = __page_cache_alloc(gfp_mask, fgp_order(fgp_flags)); if (!page) return NULL; @@ -2802,15 +2804,14 @@ static struct page *wait_on_page_read(struct page *page) static struct page *do_read_cache_page(struct address_space *mapping, pgoff_t index, int (*filler)(void *, struct page *), - void *data, - gfp_t gfp) + void *data, unsigned int order, gfp_t gfp) { struct page *page; int err; repeat: page = find_get_page(mapping, index); if (!page) { - page = __page_cache_alloc(gfp); + page = __page_cache_alloc(gfp, order); if (!page) return ERR_PTR(-ENOMEM); err = add_to_page_cache_lru(page, mapping, index, gfp); @@ -2917,7 +2918,7 @@ struct page *read_cache_page(struct address_space *mapping, int (*filler)(void *, struct page *), void *data) { - return do_read_cache_page(mapping, index, filler, data, + return do_read_cache_page(mapping, index, filler, data, 0, mapping_gfp_mask(mapping)); } EXPORT_SYMBOL(read_cache_page); @@ -2939,7 +2940,7 @@ struct page *read_cache_page_gfp(struct address_space *mapping, pgoff_t index, gfp_t gfp) { - return do_read_cache_page(mapping, index, NULL, NULL, gfp); + return do_read_cache_page(mapping, index, NULL, NULL, 0, gfp); } EXPORT_SYMBOL(read_cache_page_gfp); diff --git a/mm/readahead.c b/mm/readahead.c index 2fe72cd29b47..954760a612ea 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -193,7 +193,7 @@ unsigned int __do_page_cache_readahead(struct address_space *mapping, continue; } - page = __page_cache_alloc(gfp_mask); + page = __page_cache_alloc(gfp_mask, 0); if (!page) break; page->index = page_offset; diff --git a/net/ceph/pagelist.c b/net/ceph/pagelist.c index 65e34f78b05d..0c3face908dc 100644 --- a/net/ceph/pagelist.c +++ b/net/ceph/pagelist.c @@ -56,7 +56,7 @@ static int ceph_pagelist_addpage(struct ceph_pagelist *pl) struct page *page; if (!pl->num_pages_free) { - page = __page_cache_alloc(GFP_NOFS); + page = __page_cache_alloc(GFP_NOFS, 0); } else { page = list_first_entry(&pl->free_list, struct page, lru); list_del(&page->lru); @@ -107,7 +107,7 @@ int ceph_pagelist_reserve(struct ceph_pagelist *pl, size_t space) space = (space + PAGE_SIZE - 1) >> PAGE_SHIFT; /* conv to num pages */ while (space > pl->num_pages_free) { - struct page *page = __page_cache_alloc(GFP_NOFS); + struct page *page = __page_cache_alloc(GFP_NOFS, 0); if (!page) return -ENOMEM; list_add_tail(&page->lru, &pl->free_list); diff --git a/net/ceph/pagevec.c b/net/ceph/pagevec.c index 64305e7056a1..1d07e639216d 100644 --- a/net/ceph/pagevec.c +++ b/net/ceph/pagevec.c @@ -45,7 +45,7 @@ struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags) if (!pages) return ERR_PTR(-ENOMEM); for (i = 0; i < num_pages; i++) { - pages[i] = __page_cache_alloc(flags); + pages[i] = __page_cache_alloc(flags, 0); if (pages[i] == NULL) { ceph_release_page_vector(pages, i); return ERR_PTR(-ENOMEM);