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=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 4D42CC2B9F4 for ; Mon, 28 Jun 2021 12:41:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3600561C31 for ; Mon, 28 Jun 2021 12:41:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232927AbhF1MnY (ORCPT ); Mon, 28 Jun 2021 08:43:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232701AbhF1MnT (ORCPT ); Mon, 28 Jun 2021 08:43:19 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EA9DC061760 for ; Mon, 28 Jun 2021 05:40:53 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id x20so18735241ljc.5 for ; Mon, 28 Jun 2021 05:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=pWlR4YOkd8r6fBXSkgmDPdaUdCNYp8ikvYFMARhlCFg=; b=Oxksn4yKNReeH+KzWlY47KMNb9WTHopjB+tZf0NdYwVRIS3ZcFJ7afYEXXrxkqLIm6 67Mss8GReFxB2AAOvKMD2qBQLWA42WpBddsLFYajCpUVv6rptpdC5xPvkW9xNA064UHn HrrPTAORiyHrH2sVlTca3RunbMlqXsTAptOg7u2VKKdMlWbSnLW1GEDRl8a6OwPtjcfL AFMH7JypJL11pG/D0zZ5/BwGTKHk9Js23O7SeQswpmANqyFhKkWOPk7EAdLx0XmC0VCf OUNQgPpdSwmXU4F9JEDMELGGOFoaSrpHkjokPRp51axX5Y1zg5/shsIpG0MPnESiT/0C 32yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pWlR4YOkd8r6fBXSkgmDPdaUdCNYp8ikvYFMARhlCFg=; b=QQ7Mctw3Z5jjy+IoNmJOQg96TJhha49Jg63gDss5CDGRXlXTd3iOKv7hauSeIDetjC kkT5PsfhWKnpY6V8342tDNvlYOH7tE484sKaJndAKkV08HJ7ERAFMTJeUn72TTahtPdw /1q7B7D+uU1quG/KAb9hq+oubDru0cm74htXtJ6vfoN6IiUmVcv12BkDH132HfYregfp Z1LXFKSh4MJIWDLbVfHl6HB/ekO+PdCc2aTcPfgy/Qke8tvnfOnE0MCfDceu4WKTAAfh tZBO69e78SdUC27B0f7yQ+Q3TAmHtfgt3mBHgUFNXf79Hac7GPciXwlkiUzFRcBsiM7l pd5w== X-Gm-Message-State: AOAM531k+FOu3qU7XZq/9ljXv+PjiiW9lAPUmPvOOFp2dKdcz/JVtoUV zLWpcK59V9GH9lXKUbWHMgVkGg== X-Google-Smtp-Source: ABdhPJxqOQLjAKOnhgVMn+Pqls/utX1ohXkGCAy/hp1RrNvoBiG/wi/OXtYdsQObKDfc/fG0tkghRg== X-Received: by 2002:a2e:9945:: with SMTP id r5mr20046316ljj.324.1624884051437; Mon, 28 Jun 2021 05:40:51 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id m18sm393250lfu.67.2021.06.28.05.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Jun 2021 05:40:50 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 2AF8210280E; Mon, 28 Jun 2021 15:40:50 +0300 (+03) Date: Mon, 28 Jun 2021 15:40:50 +0300 From: "Kirill A. Shutemov" To: "Matthew Wilcox (Oracle)" Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yu Zhao , Christoph Hellwig , David Howells Subject: Re: [PATCH v12 11/33] mm/lru: Add folio LRU functions Message-ID: <20210628124050.6xa7m6n362hst2op@box.shutemov.name> References: <20210622114118.3388190-1-willy@infradead.org> <20210622114118.3388190-12-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210622114118.3388190-12-willy@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 22, 2021 at 12:40:56PM +0100, Matthew Wilcox (Oracle) wrote: > Handle arbitrary-order folios being added to the LRU. By definition, > all pages being added to the LRU were already head or base pages, > so define page wrappers around folio functions where the original > page functions involved calling compound_head() to manipulate flags, > but define folio wrappers around page functions where there's no need to > call compound_head(). The one thing that does change for those functions > is calling compound_nr() instead of thp_nr_pages(), in order to handle > arbitrary-sized folios. > > Saves 783 bytes of kernel text; no functions grow. > > Signed-off-by: Matthew Wilcox (Oracle) > Reviewed-by: Yu Zhao > Reviewed-by: Christoph Hellwig > Reviewed-by: David Howells Acked-by: Kirill A. Shutemov -- Kirill A. Shutemov