Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2403501ybe; Tue, 3 Sep 2019 12:19:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZ7u98J9RVnVhHCwWcydKTV30eA9Et+imXoI+ll6wIrIiBbYWmNGgb2tTsGlAP3+t9qlSm X-Received: by 2002:a62:e915:: with SMTP id j21mr38133310pfh.239.1567538373431; Tue, 03 Sep 2019 12:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567538373; cv=none; d=google.com; s=arc-20160816; b=v/WTA2THBYLWabhSeW6qKQbvS5zlU3ugFecuLQf9JnLnLSwwG7Wjh8OfRpx7XGyprx 9ZnY4xMf6Sy8VnWhKdjLNxg5uvQAzA6Vi1PHwa7VYpAO+d9i+tRSzuds6qhC5EMR0FID t4RqDX44aJ/UZSLuX6YRqxBwIwl62PJ54fifQOMNh4uQfDVn37fPLnQN1UuncRiRVw80 wSZpMagcnBaPdRzhywuhQ/MsdUZAe35SiEmyY6ph28E41zwBkSPV8H0L9bZJ+ANJPupC wKt4AcRV4aOeTbehUVnaOss/tkCccr93z85ZYJAbg237oncTY0iibCeEW6MkQcsWVYoE tteg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=vqhhjZ5dqOhXMqD/NZ8VNxsnMc1F9L5xKEC7qQPcrik=; b=L0JdXngHxYjl58U0du6Tk9ul9dGj1vGEV/rfLRflbEhzXJ3FqMAMlWS2vAqPCjrkX4 hZLQ38Ugbz2HIV7q9+LwOm+GMa2OnONS69O6X/cFtiMOh3OusVcuCjsU7ARAExmUqfmX BPaUCGs1SZGYpnIAqdG0O1r09qHNSSD5SoXTTuvb/gowS8nQaTJfSItcSbfgcD2SFbNC Lp2clPc3cJ9q9edtJkfMWVdXfTAR/xWa9dCLF0qAnXCTDdmTgQqJmYgvpqqPklxHqRAf vjJip8zFukgswlw1+xCLN2O9Md99KtBrAO65uSJKtOSL73Ia4LBVzj0JcBTG4o2ZFpdf xycQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v24si15348753pgn.64.2019.09.03.12.19.17; Tue, 03 Sep 2019 12:19:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726270AbfICTSW (ORCPT + 99 others); Tue, 3 Sep 2019 15:18:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:54784 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725914AbfICTSW (ORCPT ); Tue, 3 Sep 2019 15:18:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AFCC2AF10; Tue, 3 Sep 2019 19:18:20 +0000 (UTC) Date: Tue, 3 Sep 2019 21:18:19 +0200 From: Michal Hocko To: Matthew Wilcox Cc: William Kucharski , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Dave Hansen , Song Liu , Bob Kasten , Mike Kravetz , Chad Mynhier , "Kirill A. Shutemov" , Johannes Weiner Subject: Re: [PATCH v5 1/2] mm: Allow the page cache to allocate large pages Message-ID: <20190903191819.GD14028@dhcp22.suse.cz> References: <20190902092341.26712-1-william.kucharski@oracle.com> <20190902092341.26712-2-william.kucharski@oracle.com> <20190903115748.GS14028@dhcp22.suse.cz> <20190903121155.GD29434@bombadil.infradead.org> <20190903121952.GU14028@dhcp22.suse.cz> <20190903162831.GI29434@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190903162831.GI29434@bombadil.infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 03-09-19 09:28:31, Matthew Wilcox wrote: > On Tue, Sep 03, 2019 at 02:19:52PM +0200, Michal Hocko wrote: > > On Tue 03-09-19 05:11:55, Matthew Wilcox wrote: > > > On Tue, Sep 03, 2019 at 01:57:48PM +0200, Michal Hocko wrote: > > > > On Mon 02-09-19 03:23:40, William Kucharski wrote: > > > > > Add an 'order' argument to __page_cache_alloc() and > > > > > do_read_cache_page(). Ensure the allocated pages are compound pages. > > > > > > > > Why do we need to touch all the existing callers and change them to use > > > > order 0 when none is actually converted to a different order? This just > > > > seem to add a lot of code churn without a good reason. If anything I > > > > would simply add __page_cache_alloc_order and make __page_cache_alloc > > > > call it with order 0 argument. > > > > > > Patch 2/2 uses a non-zero order. > > > > It is a new caller and it can use a new function right? > > > > > I agree it's a lot of churn without > > > good reason; that's why I tried to add GFP_ORDER flags a few months ago. > > > Unfortunately, you didn't like that approach either. > > > > Is there any future plan that all/most __page_cache_alloc will get a > > non-zero order argument? > > I'm not sure about "most". It will certainly become more common, as > far as I can tell. I would personally still go with __page_cache_alloc_order way, but this is up to you and other fs people what suits best. I was just surprised to see a lot of code churn when it was not really used in the second patch. That's why I brought it up. > > > > Also is it so much to ask callers to provide __GFP_COMP explicitly? > > > > > > Yes, it's an unreasonable burden on the callers. > > > > Care to exaplain why? __GFP_COMP tends to be used in the kernel quite > > extensively. > > Most of the places which call this function get their gfp_t from > mapping->gfp_mask. If we only want to allocate a single page, we > must not set __GFP_COMP. If we want to allocate a large page, we must > set __GFP_COMP. Rather than require individual filesystems to concern > themselves with this wart of the GFP interface, we can solve it in the > page cache. Fair enough. -- Michal Hocko SUSE Labs