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 88ED5D10BE5 for ; Sat, 26 Oct 2024 07:21:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D64F26B0082; Sat, 26 Oct 2024 03:21:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D152E6B0083; Sat, 26 Oct 2024 03:21:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BDC666B0085; Sat, 26 Oct 2024 03:21:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A14436B0082 for ; Sat, 26 Oct 2024 03:21:32 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 56CEA1C73DF for ; Sat, 26 Oct 2024 07:21:08 +0000 (UTC) X-FDA: 82714907730.02.1204D72 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf04.hostedemail.com (Postfix) with ESMTP id 15FA540008 for ; Sat, 26 Oct 2024 07:21:02 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=nyQhGN6h; spf=none (imf04.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729927211; a=rsa-sha256; cv=none; b=P2EgwqJz2q6oUbYN8NNWVy5ybtngtX/Zn4yKLtwaqJ8sTW3OrdOw4ZRf5E5aYsQHjn1oDL C3YWb40/UaCnqhGXynJTo/OO2pAQDJSYso+vpGowbJ+QfzvKRoDiIKusSiNcFU0g0Lqkrh k38/2+M656rMjWAYFNfLy3KcgHhK0jY= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=nyQhGN6h; spf=none (imf04.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729927211; 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=LIXr6hISEoWtn/tdGHEodzPt+7XKY517Fvb738CQsSM=; b=3BWc3u4zOI6IU5va+w7rOlTSP+TPhGJyEbz4/zNRQTTjyHEQKCivZIzhnkgITEmOJ5fPUO Yzv8CU1nERx9HZnW9+XNRYBoO9QNl+MgPqRwWYbrkl37EzkrLSyF0dAwQ07axwKgUERv8K CB22yZlWhx0ENJCvN2374wCF5hoB6as= 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=LIXr6hISEoWtn/tdGHEodzPt+7XKY517Fvb738CQsSM=; b=nyQhGN6hiv1Ufc4RjT6hI4KCe7 JxIYo0rkSycQPwIOuM0oiyisLySBLdGJep5ePw/s3wBIYvFhIArQ3/2Rut4EhseOGwV0CBYmQiHqH TqzdJAm54F1v+uWYk6yse2YGtnlLO1vAyV9Q3HWdZsWAtB0lXd4k4THcLzKKa5H6X2JLhSJt4tbV+ sE8nMTRZvq6yeqFEq53Ry4l+jFdw2mNMwcHOlv0FcgFPD8EKFTcFqLKCNNLN/wIrSNtwipn4LEDGG aXF87GIl/UBQ6KvJtyNIDBAW6xiANZg2YfllRfiGtuZNABTbKmkcL6DpevJ08U+BJFq8UA1ZkkJrg vRiL6QUQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1t4b6s-0000000632U-3wRT; Sat, 26 Oct 2024 07:21:19 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 2A2C4300777; Sat, 26 Oct 2024 09:21:19 +0200 (CEST) Date: Sat, 26 Oct 2024 09:21:19 +0200 From: Peter Zijlstra To: "Christoph Lameter (Ampere)" Cc: tglx@linutronix.de, axboe@kernel.dk, linux-kernel@vger.kernel.org, mingo@redhat.com, dvhart@infradead.org, dave@stgolabs.net, andrealmeid@igalia.com, Andrew Morton , urezki@gmail.com, hch@infradead.org, lstoakes@gmail.com, Arnd Bergmann , linux-api@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, malteskarupke@web.de Subject: Re: [PATCH v1 11/14] futex: Implement FUTEX2_NUMA Message-ID: <20241026072119.GH9767@noisy.programming.kicks-ass.net> References: <20230721102237.268073801@infradead.org> <20230721105744.434742902@infradead.org> <9dc04e4c-2adc-5084-4ea1-b200d82be29f@linux.com> <20241025085815.GG14555@noisy.programming.kicks-ass.net> <887eadb6-6142-3edf-0a25-d33b2219b90d@gentwo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <887eadb6-6142-3edf-0a25-d33b2219b90d@gentwo.org> X-Stat-Signature: nk3sqhtf3ewg5anku6qozws9tzf9r94d X-Rspamd-Queue-Id: 15FA540008 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1729927262-825314 X-HE-Meta: U2FsdGVkX1+y3Q44GdEHl1aSzCbMRD41QebSBOytFEqPKR1AyZEKVwdPvARdQvcmCY1F4oUPdZuZr9/i9ZgX0U1MsIihoO/7NJaYB8g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7VQWTS6uxzbn4dd+aOdVawiS20eWCZZIq/6r/M1WBQzobOyZcFUGkqGVgCuw5ypw== 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: List-Subscribe: List-Unsubscribe: On Fri, Oct 25, 2024 at 12:36:28PM -0700, Christoph Lameter (Ampere) wrote: > > Sorry saw this after the other email. > > On Fri, 25 Oct 2024, Peter Zijlstra wrote: > > > > Could we follow NUMA policies like with other metadata allocations during > > > systen call processing? > > > > I had a quick look at this, and since the mempolicy stuff is per vma, > > and we don't have the vma, this is going to be terribly expensive -- > > mmap_lock and all that. > > There is a memory policy for the task as a whole that is used for slab > allocations and allocations that are not vma bound in current->mempolicy. > Use that. > You can get a node number following the current task mempolicy by calling > mempolicy_slab_node() and keep using that node for the future. I'll look into the per task thing, which I'm hoping means per-process. We need something that is mm wide consistent. But since futexes play in the address space, I was really rather thinking we ought to use the vma policy.