From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6C30C4742C for ; Fri, 13 Nov 2020 07:08:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D926820B80 for ; Fri, 13 Nov 2020 07:08:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="XPVMvRHG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D926820B80 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 34E4C6B007D; Fri, 13 Nov 2020 02:08:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2FF596B007E; Fri, 13 Nov 2020 02:08:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A0A66B0080; Fri, 13 Nov 2020 02:08:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id E22BB6B007D for ; Fri, 13 Nov 2020 02:08:43 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 7F7418249980 for ; Fri, 13 Nov 2020 07:08:43 +0000 (UTC) X-FDA: 77478517326.24.fight93_5f118fa2730d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 64CCC1A4A0 for ; Fri, 13 Nov 2020 07:08:43 +0000 (UTC) X-HE-Tag: fight93_5f118fa2730d X-Filterd-Recvd-Size: 4014 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Fri, 13 Nov 2020 07:08:42 +0000 (UTC) Received: by mail-wr1-f47.google.com with SMTP id r17so8579311wrw.1 for ; Thu, 12 Nov 2020 23:08:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IlXhzogRSxSvoHkWYteutxbOuUvU6nH3WapY0MSxAaw=; b=XPVMvRHGELsBmWE8Al91Q9dAH4K4xxhUxuP0YbN1DisG9ho6/GbC1Bmnvn6+nweh5k sUIqk2yfRTeks/Tk0IkH7FFt2nE/AoZoEwNx2dNJ1ZSHdtf5GN0N21ZCUYHxd6KZsfWW oDzf4yHEtP31iKsorbUKlr2VJbyHzKfkVvkLflEKX3Wbd1oug0/VoT4BQQK3Sx/3CTNZ PE9ULJQtMS/1PuN4vuni3svPYenFDo4U2YGxAkRfqlQAsjeT4yHwwKuTvbe61E7PKeWo wRVsZ/4P9tbmM0DYUbMwnAsZtL9K8ywmksINY2/YksWwvOS41Av8XNqCUMZmNtdMHg97 d5GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IlXhzogRSxSvoHkWYteutxbOuUvU6nH3WapY0MSxAaw=; b=ioXDVHfHd9XIHbfZWiOPm5Oe1dwM8K2PHVa9w0S2E4ED+BhlPiHoGCTlVn29SDAXr5 uHpT4p282+36UDk14eysGDAtPydbED0kb8W2jBTP9hZZCI/9O6Nfr//oulsxK7jjyZ7V /ypNzuJHmn5dIVY4bSUuMD1fSee4JPwCAYG/PdZ4rxzJyHUigIleLDwIaZ6H08Fe30nz nAMAEy3RmcMfs7LoYwSpCmZ9g1NBQnsli/izwPgM/e49+oV9kQ+ATESag62F322BOkqO ewxJO89hF59u8P8DJ9uD5ZJyf/tQHWcOiWXi06vGw67kKIYPOnxa5PR60iHRzRCLRQm8 TrMQ== X-Gm-Message-State: AOAM531dfkSa4/ykOhcNT4jQ2yNHGHiFYY94b0Z+6dcv+2aLSMc1cl61 CaGYfkMxjRVITpiTr45X1+DcdZ2WU7mX5/tewROa3w== X-Google-Smtp-Source: ABdhPJwjzsmFnnk8S7s8wDdbSnnNmcl6obLTrQpcB+KdKfl7AU/IhKbH4qXIhRemzTEbJ3HBJPZ12iCpK9sg8PZ3PHI= X-Received: by 2002:a5d:4001:: with SMTP id n1mr1532830wrp.426.1605251321518; Thu, 12 Nov 2020 23:08:41 -0800 (PST) MIME-Version: 1.0 References: <20201113044652.GD17076@casper.infradead.org> In-Reply-To: <20201113044652.GD17076@casper.infradead.org> From: Hugh Dickins Date: Thu, 12 Nov 2020 23:08:13 -0800 Message-ID: Subject: Re: Are THPs the right model for the pagecache? To: Matthew Wilcox Cc: linux-mm , Linux-FSDevel Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000030, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Nov 12, 2020 at 8:47 PM Matthew Wilcox wrote: > > When I started working on using larger pages in the page cache, I was > thinking about calling them large pages or lpages. As I worked my way > through the code, I switched to simply adopting the transparent huge > page terminology that is used by anonymous and shmem. I just changed > the definition so that a thp is a page of arbitrary order. > > But now I'm wondering if that expediency has brought me to the right > place. To enable THP, you have to select CONFIG_TRANSPARENT_HUGEPAGE, > which is only available on architectures which support using larger TLB > entries to map PMD-sized pages. Fair enough, since that was the original > definition, but the point of suppoting larger page sizes in the page > cache is to reduce software overhead. Why shouldn't Alpha or m68k use > large pages in the page cache, even if they can't use them in their TLBs? Yes, I strongly agree with this new position. While I understood your desire to avoid all the confusions of yet another config option, it always seemed a wrong direction to require THugeP support for your not-necessarily-huge TLargePs. Most of the subtlety and significance of traditional THPs lies with the page table mappings thereof; whereas your TLPs or whatever are aiming for I/O and page cache efficiencies: very useful, but a mistake to muddle it with the page table issues. Hugh