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=-0.6 required=3.0 tests=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 81EEAC433E0 for ; Tue, 26 May 2020 22:20:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4370E208C9 for ; Tue, 26 May 2020 22:20:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="qCb428az" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4370E208C9 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 D925E800B6; Tue, 26 May 2020 18:20:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D432080010; Tue, 26 May 2020 18:20:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C88C8800B6; Tue, 26 May 2020 18:20:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0067.hostedemail.com [216.40.44.67]) by kanga.kvack.org (Postfix) with ESMTP id AD96080010 for ; Tue, 26 May 2020 18:20:49 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 70CED181AC9C6 for ; Tue, 26 May 2020 22:20:49 +0000 (UTC) X-FDA: 76860291018.04.bite39_27079f926d4d X-HE-Tag: bite39_27079f926d4d X-Filterd-Recvd-Size: 2436 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Tue, 26 May 2020 22:20:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=XwPxUzMrfLWiY+zeasG0pmVYiHQIhzIbdSNkNN6qGgw=; b=qCb428azsiFiTY3bfIEilqYWFi EnnHHEGu+Ie2Gj2UbFpnLKRlezSYIlFDBUxXxeo/dJAoHM76uyjoDDXP2BhtDXrIxNFhyePSK81jq ISE4poEM92gnIinv4Z/Nc7v51Oea47l7msRB34LGfa4QJNv4ZJZBbrmc5cQ45hKvBGqqx0yTkLPZk wzvDQsTy5OvgTlCNaPg2vBimDwIaxRnhoUGRP7WyPCxSrrxJYznOS4hJnfY7G14vfrIRiwHVovwIi rz841xgkYwTe5YxUfoVHZVy//+p0uOkRMT+YsKA9emMroCkfnMhb4esqSZou4Ak8KG9gY7xEOmuAC Eld9a4jQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdhwF-0000yf-DI; Tue, 26 May 2020 22:20:47 +0000 Date: Tue, 26 May 2020 15:20:47 -0700 From: Matthew Wilcox To: William Kucharski Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 36/36] mm: Align THP mappings for non-DAX Message-ID: <20200526222047.GJ17206@bombadil.infradead.org> References: <20200515131656.12890-1-willy@infradead.org> <20200515131656.12890-37-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, May 26, 2020 at 04:05:58PM -0600, William Kucharski wrote: > Thinking about this, if the intent is to make THP usable for any > greater than PAGESIZE page size, this routine should probably go back > to taking a size or perhaps order parameter so it could be called to > align addresses accordingly rather than hard code PMD_SIZE. Yes, that's a good point. For example, on ARM, we'd want to 64kB-align files which we could use 64kB pages, but there would be no point doing that on x86. I'll revert to the earlier version of this patch that you sent. Not sure how best to allow the architecture to tell us what page sizes are useful to align to, but that earlier patch is a better base to build on than this version.