Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp409787ybe; Wed, 4 Sep 2019 01:29:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzcJUSx55jGXs5HsXBAJDkrwCR1cn7jI06YQcUMWJstPwYQork9zKPBs4dGb9Ho3mTnohXg X-Received: by 2002:a63:c17:: with SMTP id b23mr27442689pgl.224.1567585754132; Wed, 04 Sep 2019 01:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567585754; cv=none; d=google.com; s=arc-20160816; b=04zx0X5SXV6pcHxlmwpDcSqa8TCWwU4SEEXIuq9rxxavHTFN12jSDoh0/1im65AoQG lI8rlIyRVKC0Rm133kHZTZlt+9YhKULN9Xcrq3BE8Uvggu69STj1/kANIaJTrJnGXGcS SHcd7ssKNj4tyUKnI971B01bvB/RPsHuPTreZHZxwXIm6/2kQNYe3Dl9tqVUfYNtIB3i BHDbILArNBQroqEKlCXegRq1RYzr1b7jbR+zr4Lbjgld2BIN0zzkAWKjAkvjNw/HDnyG rEHnnjPjjSgl/JeLOm+63Al13w4CIGK34IEGuKV8XOvvCXgpA+FQMgOV590nkHeupwCj 3iuQ== 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=axbHMTSrCTRY6OW9N/67WBcMCNtocggHqBJzHgy0dE8=; b=DpBEoit8KsIpndaQ/4Hs5jLjyvV3h85uI1v7zt47BHSB/KlcUWiRRXYqR3E6uJGK85 I/zyXPpcSDtgBcGHyGTZdr3qleVBmFtLerD8vetCzAJP+4M8431ZfYsNZcN+jNXDanpw iWYCDZviwcw9w+1nxfyRcaqppkDsKYfk48xB4g2MLEMJSIBKPMQ/UMK47CDPyOJj/0i3 bSdj3F3FCEdVIWhFiuF53sjfeCjzcPv/l5GEZST1DwD1EBe6mKB9cDpiQDjEPQ5X/+CO MD2gn1Y2m1U3xB2+wM7ekvAM3m9BkchGNOBNrR5nciqoNKl4S5FX1GP9fcz98gt2P1iY +X2g== 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 k142si20020774pfd.217.2019.09.04.01.28.58; Wed, 04 Sep 2019 01:29:14 -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 S1728504AbfIDI2H (ORCPT + 99 others); Wed, 4 Sep 2019 04:28:07 -0400 Received: from mx2.suse.de ([195.135.220.15]:42422 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725966AbfIDI2G (ORCPT ); Wed, 4 Sep 2019 04:28:06 -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 77B1EAE91; Wed, 4 Sep 2019 08:28:05 +0000 (UTC) Date: Wed, 4 Sep 2019 10:28:05 +0200 From: Michal Hocko To: William Kucharski Cc: LKML , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Dave Hansen , Song Liu , Bob Kasten , Mike Kravetz , Chad Mynhier , "Kirill A. Shutemov" , Johannes Weiner , Matthew Wilcox Subject: Re: [PATCH v5 1/2] mm: Allow the page cache to allocate large pages Message-ID: <20190904082805.GJ3838@dhcp22.suse.cz> References: <20190902092341.26712-1-william.kucharski@oracle.com> <20190902092341.26712-2-william.kucharski@oracle.com> <20190903115748.GS14028@dhcp22.suse.cz> <68E123A9-22A8-40ED-B2ED-897FC02D7D75@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <68E123A9-22A8-40ED-B2ED-897FC02D7D75@oracle.com> 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 21:30:30, William Kucharski wrote: > > > > On Sep 3, 2019, at 5:57 AM, 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. > > All the EXISTING code in patch [1/2] is changed to call it with an order > of 0, as you would expect. > > However, new code in part [2/2] of the patch calls it with an order of > HPAGE_PMD_ORDER, as it seems cleaner to have those routines operate on > a page, regardless of the order of the page desired. > > I certainly can change this as you request, but once again the question > is whether "page" should MEAN "page" regardless of the order desired, > or whether the assumption will always be "page" means base PAGESIZE. > > Either approach works, but what is the semantic we want going forward? I do not have anything against handling page as compound, if that is the question. All I was interested in whether adding a new helper to _allocate_ the comound page wouldn't be easier than touching all existing __page_cache_alloc users. -- Michal Hocko SUSE Labs