Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1520928rdh; Mon, 25 Sep 2023 15:51:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGUjGRkon0S+1bMDnvTCeoMMIBHsF+wz7Bggxx5RFyPCbjeOWHuGVyHckckH4FHdqn+3mHO X-Received: by 2002:a05:6a00:14c4:b0:690:1857:3349 with SMTP id w4-20020a056a0014c400b0069018573349mr9930786pfu.25.1695682287660; Mon, 25 Sep 2023 15:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695682287; cv=none; d=google.com; s=arc-20160816; b=aOEuy02qDX38cEA5oFn37pxU83KHWbO5UVfuT0FCq9JYHubNyawppG1p0dOhzG+1CJ 5cKegDpnQOzoxR3Oa+RqtGhZC3LBtps+Y+TQvAGE9NxatLxjqULj9P4fsG/NndZTbJ6/ FC9RqneBoezloEx+DSeSFFrXBje+3D0H6492ds5aY464SKTOPAUQwNSXX7R8/A1TC4bU pC8S5KgV0MSbzBj3kQeiSJ9eq4c3vroEwTO2cgZ7B0692uQSukSOwxyeOePBSyvAbq0n bLkJJMh3FC3KK6vbONXFjgI2au1u8Ju0/2IXWzeCNhsm0VX+/P7rQw3YFaFT6KNNWUso 2PFQ== 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=frDcyzEi7BETFvRwPE5lXsTchFG6Btz6mpVljw1D87Y=; fh=Br3vn02nrqpc8WUG7nyHuFyDsfaCfgTMROyHk6bJlsE=; b=bqmGSzCIoewT762T0JUQL90OqFQenMhxknwRsNsFmYYtGTZdl/6WpD9JjscNp9DVmq Z725FoCA9Gx1NqM+P1AOCG7rgqGkMB1jxm4LMEldlRpxzbLZSp+zNdLZ7sSnINHI/wVQ Nb5NM0WDrWYlvVp15/YDcaR4vNrtzMZMkiE1Qy1xaaif1EAVgbtpth/QmoyUuTMPE/0s U5OOZmXUOPwU90buGo3ysoQBo54v4RSrOQolZ0zXFDQsGT/RA3DHFzkap1DksvTseMNZ 2Jxd07MAXnSWrWpgV/WbicRApEu3BgvjaQZLHk9BRP+5Ve+g9zOywmgPEJujqqui0ekD iqvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=b+4bfXEr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id g25-20020a62e319000000b00690c19cb105si10506360pfh.250.2023.09.25.15.51.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 15:51:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=b+4bfXEr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2C44480BBC7C; Mon, 25 Sep 2023 15:46:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233339AbjIYWqo (ORCPT + 99 others); Mon, 25 Sep 2023 18:46:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230038AbjIYWqj (ORCPT ); Mon, 25 Sep 2023 18:46:39 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 864F111C for ; Mon, 25 Sep 2023 15:46:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695681993; x=1727217993; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=YP7EHKPr2e+Pz1hp7bVbAs2UlnEMcHx46HJgSSpOj1Y=; b=b+4bfXErjjyW0Ahi0ZAATvF/MnAXFOrUmpSzdAAann/6KF3uMIP0Jqac CHuhWI+RYNc0Ufv58BrEhhTA+tmIZgOo0hYWAigEMw1TCei4FNX6lyV6h ZA9luFrGChaNiPYHHr6qCzdxO/0VquMZuY8VFKfyJmkXxFEdQQO1PiksL 2FQHPm8absuwy9U/qX7u8Szs/GfCXAwwqGsh0mdq1QKfKpivQsv4zu+an uOPynuzXoTo9i/8SuygOPM2qk2CMnhex9OqpipVcf5GAe48CVPj4fDsz0 kiU13S1txE8202JGGrJJmny+vY1FClqiqqNSJEVVzde7769rM5jRcV+TF A==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="381333722" X-IronPort-AV: E=Sophos;i="6.03,176,1694761200"; d="scan'208";a="381333722" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 15:46:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="725211019" X-IronPort-AV: E=Sophos;i="6.03,176,1694761200"; d="scan'208";a="725211019" Received: from tassilo.jf.intel.com (HELO tassilo) ([10.54.38.190]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 15:46:32 -0700 Date: Mon, 25 Sep 2023 15:46:31 -0700 From: Andi Kleen To: Hugh Dickins Cc: Andrew Morton , Christoph Lameter , Matthew Wilcox , 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 01/12] hugetlbfs: drop shared NUMA mempolicy pretence Message-ID: References: <2d872cef-7787-a7ca-10e-9d45a64c80b4@google.com> <47a562a-6998-4dc6-5df-3834d2f2f411@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47a562a-6998-4dc6-5df-3834d2f2f411@google.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Mon, 25 Sep 2023 15:46:51 -0700 (PDT) On Mon, Sep 25, 2023 at 01:21:10AM -0700, Hugh Dickins wrote: > hugetlbfs_fallocate() goes through the motions of pasting a shared NUMA > mempolicy onto its pseudo-vma, but how could there ever be a shared NUMA > mempolicy for this file? hugetlb_vm_ops has never offered a set_policy > method, and hugetlbfs_parse_param() has never supported any mpol options > for a mount-wide default policy. > > It's just an illusion: clean it away so as not to confuse others, giving > us more freedom to adjust shmem's set_policy/get_policy implementation. > But hugetlbfs_inode_info is still required, just to accommodate seals. > > Yes, shared NUMA mempolicy support could be added to hugetlbfs, with a > set_policy method and/or mpol mount option (Andi's first posting did > include an admitted-unsatisfactory hugetlb_set_policy()); but it seems > that nobody has bothered to add that in the nineteen years since v2.6.7 > made it possible, and there is at least one company that has invested > enough into hugetlbfs, that I guess they have learnt well enough how to > manage its NUMA, without needing shared mempolicy. TBH i'm not sure people in general rely on shared mempolicy. The original use case for it was to modify the numa policy of non anonymous shared memory files without modifying the program (e.g. Oracle database's shared memory segments) But I don't think that particular usage model ever got any real traction: at leas I haven't seen any real usage of it outside my tests. I suspect people either are fine with just process policy or modify the program, in which case it's not a big burden to modify every user, so process policy or vma based mbind policy works fine. Maybe it would be an interesting experiment to disable it everywhere with some flag and see if anybody complains. On the other hand it might be Hyrum'ed by now. -Andi