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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 AF486C07E95 for ; Tue, 20 Jul 2021 12:42:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4E40B60C40 for ; Tue, 20 Jul 2021 12:42:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E40B60C40 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E76996B009C; Tue, 20 Jul 2021 08:42:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E26D76B009D; Tue, 20 Jul 2021 08:42:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D16606B009E; Tue, 20 Jul 2021 08:42:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id A8F6C6B009C for ; Tue, 20 Jul 2021 08:42:00 -0400 (EDT) Received: from smtpin37.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2E53527718 for ; Tue, 20 Jul 2021 12:41:59 +0000 (UTC) X-FDA: 78382928358.37.8D5FE25 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf01.hostedemail.com (Postfix) with ESMTP id 3DC39501409A for ; Tue, 20 Jul 2021 12:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mPQYZ33BlIlkd+dlj726EPZl7tWfypJs/9dI+fk9jOI=; b=LlZjdT2lJ7hqhYOLaFTHZ2MrNS yMAxfTels85yLjDevtVIPWJKxmWb0TnPovMeXl3bNFDJyNWgdud/36VM5HX+hr56ZUpIRljS0aRbK CrknnuUKOrkUlgxJtW493IFjzhrFKB6keI2eARUJED7Q40VWDG3kYlF/ULL3KXMlkJDWgFbTBv5w/ zCNG4P1yyYS84/01BJ6h+bNiNthp01O0un6x2IVJSWvKZoHC/ldhiWqlXwGwNjkxpIecyJlI2tXcM 68dgVdzH/DcivgBiFnfU1+sX6WbYMr2H5ej78YxBoDSMuO91zB4Idth48sMWQ+1rg+pgVVOvHgdgj Z7xO1+kQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5p3j-0086gc-Lf; Tue, 20 Jul 2021 12:41:23 +0000 Date: Tue, 20 Jul 2021 13:41:15 +0100 From: Matthew Wilcox To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v14 000/138] Memory folios Message-ID: References: <20210715033704.692967-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=LlZjdT2l; spf=none (imf01.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Stat-Signature: 7scfgdaxu343r761x6jdxr9y753eukjx X-Rspamd-Queue-Id: 3DC39501409A X-Rspamd-Server: rspam01 X-HE-Tag: 1626784918-887190 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: On Tue, Jul 20, 2021 at 01:54:38PM +0300, Mike Rapoport wrote: > Most of the changelogs (at least at the first patches) mention reduction of > the kernel size for your configuration on x86. I wonder, what happens if > you build the kernel with "non-distro" configuration, e.g. defconfig or > tiny.config? I did an allnoconfig build and that reduced in size by ~2KiB. > Also, what is the difference on !x86 builds? I don't generally do non-x86 builds ... feel free to compare for yourself! I imagine it'll be 2-4 instructions per call to compound_head(). ie something like: load page into reg S load reg S + 8 into reg T test bottom bit of reg T cond-move reg T - 1 to reg S becomes load folio into reg S the exact spelling of those instructions will vary from architecture to architecture; some will take more instructions than others. Possibly it means we end up using one fewer register and so reducing the number of registers spilled to the stack. Probably not, though.