Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1533011rdh; Mon, 25 Sep 2023 16:17:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFo5h3hc4DfDEtMTbuOUX7j2QHs+0szuv6UFxV/60w9X+bsexlcpiAi8FowZylqUQcSutsk X-Received: by 2002:a05:6a20:3d8b:b0:158:7fdf:66df with SMTP id s11-20020a056a203d8b00b001587fdf66dfmr10343842pzi.18.1695683836759; Mon, 25 Sep 2023 16:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695683836; cv=none; d=google.com; s=arc-20160816; b=uCP/Mff+ejcv/434HpIqsgxZC4OgCG9b46eZXrtPnqaPZjWqyaQ1ZwN6EjUAGOFqmG tcTbayH9ykXFVBabPuEgPXMQLtCNdGiuAtLlxwZ1F+XPyj86r7sO61sMG8EWjnN4xjSU 7SAgCAHKAYAjiRKRIKzE2vgffGtsj7XOYZjGOnylVKDWn9Jk8GJPTReZQ3FFY71HyY1A af9eW0ZEEGZWOGnRmZeo6q9pFXIL1kCfipl8jswegpsS36CQehAOAXOiWlA3Fu3k/Agz iaob8KnsGEFOLICt34941gJDWysQ2yKK+c2fzAlR6f7iSVY959WACNBvJYhBHfjW+T4+ 6WxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=m41YmgAlvlgZpwnL0qQM2KGCyZY6OCsIZ8O/irEMgBQ=; fh=Yibd+6efQ2NbloUNqjhUgqChaOBGlXVnr6VE1C45OVo=; b=YTfbxb599x9+mAMM3qK0+Sme5/kB36+lKIbpsytMAk0ZdnAcpANLaAWkpzfEYFYywe 2zN18eh7DHC3p5maFyfMAOuOqlaQ/xqPm297kfwSPi+v8rSXlWFw/Hz7nq9BYQxergxa Q7PzS1vVCCQbQabTsSEH8da72sfbGXNCKYjwhZx/TftQpVmSu/4yE832RqCN2zRusYce kusPt5oJOm1o/ZS9AKXcOJfMHjM8Lmsd458S0ET1nsuvb7DAoeXIARIQECpEOh6ph1E2 jR5jLtUE8MwRysmOL9TxrsCdMaRE6FQEvkMlSeEvwTRagDEExfX/56Mby8Ecr3vsI+8o /ARA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Y2Qe941j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id ms9-20020a17090b234900b00274a5edad0csi10831900pjb.139.2023.09.25.16.17.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 16:17:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Y2Qe941j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id EB17180A4438; Mon, 25 Sep 2023 15:11:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230476AbjIYWLV (ORCPT + 99 others); Mon, 25 Sep 2023 18:11:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbjIYWLU (ORCPT ); Mon, 25 Sep 2023 18:11:20 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB79F107 for ; Mon, 25 Sep 2023 15:11:14 -0700 (PDT) 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=m41YmgAlvlgZpwnL0qQM2KGCyZY6OCsIZ8O/irEMgBQ=; b=Y2Qe941jWJAfvz+rqON69Ejd3S nLm4c1FZo4i8LCQsjNv2joK9WKgWwsq5Gg3U8NWj3v1LEfIuIMXx2NVn93U6x5AtV50vCV7g9is20 5KjEQMpQ30BlC8eq1aCEivbzfAqNkI6YI/CEPvINIWcPylWmmUaqBo6pK0ACjVDxHGmx2o0ayiFl8 h49RqPmSICN+0uaOmOWiBzHiYO6OdrLZbc7RdcIPOd/oovJexnkm/zzpQcZN+Ou1Vq3hyJ69gFjS/ 1o50v9U7S9XRu8t8lQVjctB4xmlfWsu3u7NSgt/WYxdhnyYUhSfrGtv4zoE2YQAvFfKhQvw5HZ+R2 SVEtLn8w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qktmy-003xxD-Dd; Mon, 25 Sep 2023 22:10:48 +0000 Date: Mon, 25 Sep 2023 23:10:48 +0100 From: Matthew Wilcox To: Hugh Dickins Cc: Andrew Morton , Andi Kleen , Christoph Lameter , Mike Kravetz , David Hildenbrand , Suren Baghdasaryan , Yang Shi , Sidhartha Kumar , Vishal Moola , Kefeng Wang , Greg Kroah-Hartman , Tejun Heo , Mel Gorman , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 02/12] kernfs: drop shared NUMA mempolicy hooks Message-ID: References: <2d872cef-7787-a7ca-10e-9d45a64c80b4@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 25 Sep 2023 15:11:21 -0700 (PDT) On Mon, Sep 25, 2023 at 01:22:27AM -0700, Hugh Dickins wrote: > It seems strange that kernfs should be an outlier with a set_policy and > get_policy in its kernfs_vm_ops. Ah, it dates back to v2.6.30's commit > 095160aee954 ("sysfs: fix some bin_vm_ops errors"), when I had crashed > on powerpc's pci_mmap_legacy_page_range() fallback to shmem_zero_setup(). > > Well, that was commendably thorough, to give sysfs-bin a set_policy and > get_policy, just to avoid the way it was coded resulting in EINVAL from > mmap when CONFIG_NUMA; but somehow feels a bit over-the-top to me now. > > It's easier to say that nobody should expect to manage a shmem object's > shared NUMA mempolicy via some kernfs backdoor to that object: delete > that code (and there's no longer an EINVAL from mmap in the NUMA case). > > This then leaves set_policy/get_policy as implemented only by shmem - > though importantly also by SysV SHM, which has to interface with shmem > which implements them, and with SHM_HUGETLB which does not. > > Signed-off-by: Hugh Dickins Reviewed-by: Matthew Wilcox (Oracle)