From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AC8D3B6369 for ; Wed, 11 Mar 2026 07:54:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773215667; cv=none; b=YyHSbO0W/z078nf52vQBvzYpBtjqy91seIw+9TzQOHvmZJ11xSoMWbsmSfocyyqbujk0lRa0Rrd9nH4GR7NTC4XBwbGnyWV8ffuGK/+pivWFBSvda7fDOtk78c1ni5I8rqxWM7PFDxs2aSbkWY/j0NfZsI+gDh3/1FnQbVR+zU0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773215667; c=relaxed/simple; bh=BjONH1DvcGFuEtSr9A9W7qC0rcKtgxi41aDPBrMjpSc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=t5KLTiUuAIa6AM6RNffbkaQUCJGNMu/ALywEeeU/+X+bDoSSDICLudyAmt3LRTALJqyAe9+fXevrqWoIjCZkcg3sDpvuPZimFeYpUzHu9+mYK2tWwP2r5fc24vBE09hsYvAyxliLLU/6xcHPNVcCXEvVu8MJpo9/co+Z8JL4ay0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Mzy4Fgg9; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Mzy4Fgg9" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4853589700fso3322505e9.1 for ; Wed, 11 Mar 2026 00:54:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1773215663; x=1773820463; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=vi9Gsatd7iYRgsluFQhTgFHAqgoIXBEwFvUzAxjRWBk=; b=Mzy4Fgg9D888LZqJIq4I8C3ia5TfkEda0jd/xRYPiQOUf5e8TnBALaBNGOXt9kLScn TEXAO696cNk3TQIBCnf97/CqHw1hxJCQcfLeXFr52PEzYs0pby5I0HdcmSWJtG7huzua iwGAIrmRSxeVscB76wJEZE3ey8jWvCXJ7Giy8HRgxHcJm1SMA2BrPAAQ6peEY7tAj88W 33GZdhxRyM6YZf/UYNu3egQThA3oiLM/7g4p4vchwePc+wxpuZmM/6rKAJlI7WoKNuPk MMrOuvgqnC/u6UveiGUHW3c/eSt6iSCn7Onlda5h5UpnBETp1n1YyoDUB69qrQRh+Zuq deZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773215663; x=1773820463; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vi9Gsatd7iYRgsluFQhTgFHAqgoIXBEwFvUzAxjRWBk=; b=o1cPznjN32CtZXURl1UTLdFowO/2gMijAzPcFHQYEQAHUWdT5kRrdgXuCTvqsUiUq4 fPNdJf5XWIovbXqB/fG0Emjt7s0c4FK/lTU7FPcK8KIr6Uj/RJowcepAXxOgp+TXfv58 ZsftJBwy5DcdrMOmbDQ9vHEpjJjardRzMshIARU0Pu3AXMJsVcGmBwoze2+6oQ//FHZV +exHnqSLtdghlDyZBU2v5ClAKsNbg/TjBE0ONcc26cJLVuVk0FeSQQvx+dKgRFNsvthe RAllgDyd2WGeypL9jSUcJf6QrYtk1EzNkh+HHxR9RqpkZcvJE6g8Ub4wy5dOaTSvz4c9 Md8g== X-Gm-Message-State: AOJu0YyP+EiyhftDsA/0DeMOgBd8kxfM9Z0e9njDw46BY0Vtex+591BW gF8v9he2SqIMhFIWXC5XhqQdvsh1Mo5UCq1F4YgMR5bPRa8DEBwdKkNbftzXf6e/51Y= X-Gm-Gg: ATEYQzyteLbxmolDXxfnazCaH+mPphzXR+zhngd1oSuEPuplc5N6BjpTY+C26JcX5l3 rxpRg7yopsn2/ACqmh5hcf+9SCTTWfulcdhR420HmbUzbA1wAsL0B/Qid37XO47pCMVJvC+rQbi CC+uM1aXlok7/LVTBPu6HPKZ/9rPUwaruEmy4ISbM3tEWekCAiEsmk8gkEbyWIhx4ORTepoa3RO VtVxK8B1+l6dyhRnw2R5HH8L0mzmSUyK1A4YdMbiS0Q1dMIOXLVticsnUvg+vXnj1yb0cjhresL D9iMkhLQ6W/dXP0Vk/vUopbAxILfECX1qeRW2bLo55JTMPXTawDYun8ognXdpxtWiwbtUdyJsPN jPoPqxaTYWC3+nWHMve9HegEblsK0liJA4yOxav6wunVnw4MOd7tAKWGOy7XkjamI9VMnLU3Vry TiPv7k/CazrbEiv25b9IWLmYvcZUZJKlq28+VwXok6JN3TS1ffDvWfKksj3w== X-Received: by 2002:a05:600c:154d:b0:485:2fe9:33a7 with SMTP id 5b1f17b1804b1-4854b109745mr12712875e9.3.1773215662712; Wed, 11 Mar 2026 00:54:22 -0700 (PDT) Received: from ?IPV6:2001:1a48:8:903:1ed6:4f73:ce38:f9d4? ([2001:1a48:8:903:1ed6:4f73:ce38:f9d4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4854b66e3f8sm30497515e9.14.2026.03.11.00.54.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Mar 2026 00:54:22 -0700 (PDT) Message-ID: <4242ff70-c5d4-40f4-bddb-c823675fcb4c@suse.com> Date: Wed, 11 Mar 2026 08:54:21 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/5] Introduce QPW for per-cpu operations (v2) Content-Language: en-US To: Marcelo Tosatti , Frederic Weisbecker Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Leonardo Bras , Thomas Gleixner , Waiman Long , Boqun Feun , Mel Gorman References: <20260302154945.143996316@redhat.com> From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/10/26 18:12, Marcelo Tosatti wrote: > Hi Frederic, > > On Thu, Mar 05, 2026 at 05:55:12PM +0100, Frederic Weisbecker wrote: > > Can you please be more verbose, mindful of lesser cognitive powers ? :-) > > Note: i also dislike the added layers (and multiple cases) QPW adds. > > But there is precedence with local locks... > > Code would be less complex in case spinlocks were added: > > 01b44456a7aa7c3b24fa9db7d1714b208b8ef3d8 mm/page_alloc: replace local_lock with normal spinlock > 4b23a68f953628eb4e4b7fe1294ebf93d4b8ceee mm/page_alloc: protect PCP lists with a spinlock Note that per bf75f200569dd05ac2112797f44548beb6b4be26 changelog this seems it was all done for the same reasons as QPW. It's nice we got the trylock-without-irqsave approach as a followup, but the cost of (especially non-inlined) spin_trylock is not great, given that now we could do the trylock-without-irqsave cheaply with local_trylock. So that to me suggests it could be worth to try convert pcplists to QPW if it's agreed upon as the best way forward and is merged. > But people seem to reject that in the basis of performance > degradation. >