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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55BF3C4332F for ; Mon, 17 Jan 2022 04:40:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 96EF96B0080; Sun, 16 Jan 2022 23:40:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F74E6B0081; Sun, 16 Jan 2022 23:40:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7BE856B0082; Sun, 16 Jan 2022 23:40:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0095.hostedemail.com [216.40.44.95]) by kanga.kvack.org (Postfix) with ESMTP id 65CED6B0080 for ; Sun, 16 Jan 2022 23:40:45 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 10F8495274 for ; Mon, 17 Jan 2022 04:40:45 +0000 (UTC) X-FDA: 79038528450.21.CCCADE4 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf27.hostedemail.com (Postfix) with ESMTP id F128340002 for ; Mon, 17 Jan 2022 04:40:43 +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=uR8uodyrCDk4BZAzJIFK2uL40QezGKhhsTM0fjhGqBA=; b=XaGX4PUAsNwC+GX21L2mOSsd5j l6sXSsu40ncOTZXWtkuTJcyWBEO3Z4W15v/kMSQxToYd4Or8X/HBzM7DQZVcdogS2IbZiove5JSG7 hrfM+X3wmhNsJawL69MAD9VgyAEjfu+buOArRCEIN0/KBiLdP4WZZcYO/8iKgMCDkTWdZVU6deFJa 2GQa2387O+6CrFQKRUm4clJJ7K2IbURfhRjQ+aGniaBj8DBIZ27rJ5wX04qP9d5Lanf7gaju5lvJe jmB93yn4pjMY+nXv5cS2ImHrYix6wLBl8gK2ox8QscqxBILXz9TjQiyvXbVlCceSb3957wBZ6X6aZ sLVOZokw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9Jon-007khC-Kq; Mon, 17 Jan 2022 04:40:33 +0000 Date: Mon, 17 Jan 2022 04:40:33 +0000 From: Matthew Wilcox To: Rongwei Wang Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, William Kucharski Subject: Re: [PATCH 09/12] mm/readahead: Align file mappings for non-DAX Message-ID: References: <20220116121822.1727633-1-willy@infradead.org> <20220116121822.1727633-10-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: F128340002 X-Stat-Signature: mp4tmyh7m1h3j5b145aftxe3y7k3ya1r Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=XaGX4PUA; spf=none (imf27.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-Rspamd-Server: rspam07 X-HE-Tag: 1642394443-42740 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 Mon, Jan 17, 2022 at 11:17:55AM +0800, Rongwei Wang wrote: > It seems this patch will make all file mappings align with PMD_SIZE? Only those which are big enough. See __thp_get_unmapped_area(): if (off_end <= off_align || (off_end - off_align) < size) return 0; > And > support realize all file THP, not only executable file THP? Executables are not the only files which benefit from being mapped to an aligned address. If you can use a PMD to map a font file, for example, that's valuable.