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 A10D2C3DA6F for ; Fri, 25 Aug 2023 12:49:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0E367900017; Fri, 25 Aug 2023 08:49:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 06C778E0015; Fri, 25 Aug 2023 08:49:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E4F20900017; Fri, 25 Aug 2023 08:49:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D21998E0015 for ; Fri, 25 Aug 2023 08:49:26 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A4BD5140618 for ; Fri, 25 Aug 2023 12:49:26 +0000 (UTC) X-FDA: 81162607932.26.28F9512 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf07.hostedemail.com (Postfix) with ESMTP id E027940015 for ; Fri, 25 Aug 2023 12:49:23 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=rGoKp+E+; dmarc=none; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692967764; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qrjV5LfbhE2I0hjArcTr3nf3ghXpZRO6ca+q7nCkmwE=; b=O0LowTFS4N1xTqVg5Xg/h+U7/2QFYZRM+Or9qfeB+UtKZLPA+BHEm+WnkFAqTlP7fHAXc/ 2gJg3wRwnAfzeTwFbwcERh3JWOmzcVsDsdnYn2LB/TS5NEOf1mQFVo0hkgSv0LdWrzuUDY gdfxPrRMCdUoZsHFKsKd9wJOdid1gMI= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=rGoKp+E+; dmarc=none; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692967764; a=rsa-sha256; cv=none; b=uJFwchdtHBPlF+auVQdmQjDBUoO1LBhaHgmqBBwHZRVkDlKC+qJqL2CmYOioGVLdteREQ1 gnMStLSgST8jwtp6+XhOCQJ8wPYC8eIsHULyscFe57l8LoHONQT6R5mHsgUdi9BJ62ndij GTxSpUQBnph00MuX1jX0pvFpRWBWpV0= 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=qrjV5LfbhE2I0hjArcTr3nf3ghXpZRO6ca+q7nCkmwE=; b=rGoKp+E+1vIvHTH06YcdIjXD7G D9aHo/wY6h4lA6ZOiQvEVqOLXTNR0pKSBC92wS6dg9SXxq1csBZfQ9YXr9sgdwKSqWovZPp5j8+3v XoPFWs/DofgF9c8I6se5aJ0IT8W88ttJjAFUik3k2WhF5K/P4uvczw3cfHL1JzGovpSdCa1hRowc5 hGkGzZVTttb9rJk78+KL7i+ptfcLNwGagxtX1YED6MiyvQVQDRWtevUkyOX3oiElJQuo3JuhETN2V oTn9/HW30O3WS7OUCmLjfZEZAN/LDNBzSC39c81eNTWndVIjHr3mzN2JAqsH7sYr7ROoGyCkFv52u Vq4e6MaQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qZWFX-00HAwg-S4; Fri, 25 Aug 2023 12:49:15 +0000 Date: Fri, 25 Aug 2023 13:49:15 +0100 From: Matthew Wilcox To: David Hildenbrand Cc: Saurabh Singh Sengar , Zach O'Keefe , "linux-mm@kvack.org" , Yang Shi , "linux-kernel@vger.kernel.org" , Greg KH , Saurabh Sengar Subject: Re: [EXTERNAL] Re: [PATCH v3] mm/thp: fix "mm: thp: kill __transhuge_page_enabled()" Message-ID: References: <20230821234844.699818-1-zokeefe@google.com> <37c2b525-5c2c-d400-552c-9ccb91f4d7bf@redhat.com> <3e08d48b-7b70-cc7f-0ec1-12ad9b1a33db@redhat.com> <3408ff54-f353-0334-0d66-c808389d2f01@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3408ff54-f353-0334-0d66-c808389d2f01@redhat.com> X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: E027940015 X-Stat-Signature: o6jkqnj1y9fn3cw9t9maaxnwjteq8cfp X-HE-Tag: 1692967763-16612 X-HE-Meta: U2FsdGVkX1803Qp8JA1zYh+ibhivP9qEJoZixxwIY69f3XizUjFpeSoZ5PJQXh58aeEKs0jUBHarG8dwfvnXk7uGqrVqadwniUewdhNt+MSjwra96m2dF+xkiK80ngLWrBS8LXQX4/b6lTfnIvmi+tHArUHJFu8csNEd0U3dBf3fXbXpP1bIRbPXJ/Rvm8n6uffLnFNbUlDaIy4ms2mvn15Mbc/f7TWEjMUY2egYn3Ccn4pOkFOSmM/XojnSxULx2U8VdZt+hMzO3ycCvvnC/MJPRcjIavakY77s/2ebQkKWWVxYMiatxbDO27QQ2cg2JzF7iCP9cs2cEQrCO6ySohGHFVH5w1x1TJWYrD/yOJAsYShbJTTICHyhkUH/76ab3CkSncu0nwGB+N7HxC/3/niSktpKQLuAXSRtppI+2sVMPimjHn0EAg0omHh/PUxy3bOeRAi+Bsb1slQ+UmBBoRuv4/KG78jvua9ntcTFxJrCIyWLwNFxlC0rNL432WMFTictc3h74q4255mToY5/UjS6mN66/ifRrSgMx1NNMMLHHvIPozAuN7cTfKa25pEPINhYXyvfHS2NvCeURMIVz4MpbwD2Nj85iT/auFEEkegO3VZqJ5iY0qT3YbajHSqP2V6VZGPOYbXIdg6nJeDklfGHr26oCYBotAMrHExhqs3EwfschtbDBmbhFlS7RMJZQVmd6RihKCO/EKlqjtGcM0PdPLsJBwVB9E79fUVRefU3INfnFdOWLfxYROajhHBPwfdXWi2WXNl2rdXFPlOtnK07/fw4Z3bWFNr04GZk7FoPhuvTs9jZ0d+XkCrzf4dBFJiCbtU3fQzMAbb3LF/W+SfxVlXxtwdTd3HoDeE2f/cw2Edvzj/ZIH4dyMCVkavwx87PuCActfWb/FWZJX7QbZCbGgh79uJMYjSugke9tLcJIQUpqggPkNrNuuxMN9Dc4roly9nTnrb44DK0F4Q wzjzL98b v+pM8e8xKJhLFNl8Yww+GIYybQd9kWaFbi1eEEGVA48E8sz3bGAPxGLjrwoahIsViy8qkUU9E1E3j7eYEgeR559+8hd34MuozhUzNb0Pk4Rvl/CAfbCviBM/ogUU9O2J3+OqRSrZlA+jOK1SdKvJqh8YGaUY+AnxhBFPusg682IBUqDjFnpq8T1lNb9wKvjXIr1JuPNA9ESTqFd0dHNOUTEafekUMKsmc3BrwYVUhMpj7lrNauPXpizGt00zFIHj+ETsgYcqP5IMkwCZ8UWo6iB6x5Rj1cfWy8L6joHny/oe+7I2gBxy6MVr39tQNoPjePCvDeq/XImdnBAm8kvfkU5VK+g== 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 Fri, Aug 25, 2023 at 09:59:23AM +0200, David Hildenbrand wrote: > Especially, we do have bigger ->huge_fault changes coming up: > > https://lkml.kernel.org/r/20230818202335.2739663-1-willy@infradead.org > > If the driver is not in the tree, people don't care. > > You really should try upstreaming that driver. > > > So this patch here adds complexity (which I don't like) in order to keep an > OOT driver working -- possibly for a short time. I'm tempted to say "please > fix your driver to not use huge faults in that scenario, it is no longer > supported". > > But I'm just about to vanish for 1.5 week into vacation :) > > @Willy, what are your thoughts? Fundamentally there was a bad assumption with the original patch -- it assumed that the only reason to support ->huge_fault was for DAX, and that's not true. It's just that the only drivers in-tree which support ->huge_fault do so in order to support DAX. Keeping a driver out of tree is always a risky and costly proposition. It will continue to be broken by core kernel changes, particularly if/when it does unusual things. I think the complexity is entirely on us. I think there's a simpler way to handle the problem, but I'd start by turning all of this "admin and app get to control when THP are used" nonsense into no-ops.