From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp153-162.sina.com.cn (smtp153-162.sina.com.cn [61.135.153.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 848792C21E8 for ; Wed, 11 Mar 2026 01:19:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=61.135.153.162 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773191954; cv=none; b=KY042mcQM5k88zANrtPspIUcuu9EoEvILiLbKiSje2tb4/XpCWvUrQ+8/7TKQtlWC9Ycn4nbyGmpCYl4A+HUZ98dzb6yUBPgneOG2hsXMXBth7M9p6Wo5LWEQun2dQUEO7rcuJcfoh/HCIe+rClewWo/w4neaLupJPrD5484nAc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773191954; c=relaxed/simple; bh=s6RfVpEzlI1z8uMSFcb1YEKa3ELfokNX0IjwgGIWUDI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CFLDCEKNKT0PdgrWDvu6KSDE5/Y9qCf2LhasEhCEe/202iYGnRLHvAHoXrZZD8WSciCiHEzbFmRNJmZ/hV5UgUkmxNDfnwMW/NiGa6ck/vIuf6I2Ja9GUjyBZW8J4X94ZtPISeNdvi8/Rhv6uLiTqSTWrexMo8dbrrpSYE4JF1o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b=BQ/6wV17; arc=none smtp.client-ip=61.135.153.162 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b="BQ/6wV17" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sina.com; s=201208; t=1773191947; bh=ChXyyqStyHvRMmaOsnZNTY2iWxfjhqEzfA54ZsC3T6g=; h=From:Subject:Date:Message-ID; b=BQ/6wV17FbXUb0mzy8XwUidXBmzlxzEZmT31yT8oA8nJuKCEq2rXNKyxEqN2pYd8h jx1vZcnIBnCNG++hJvsnzU0424fwc0KsE01mHNKlOUUeXhFFC7NZg87hVC09g2mqCL v4XgE7t5ZiDgafRLGOSFqfBvG/s2LYmLxN4QiwA4= X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([114.249.62.144]) by sina.com (10.54.253.31) with ESMTP id 69B0C2DD00007CB8; Wed, 11 Mar 2026 09:18:22 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 9687306816499 X-SMAIL-UIID: 7E0815E5776D42F09DEB167BE80166DC-20260311-091822-1 From: Hillf Danton To: Marcelo Tosatti Cc: Frederic Weisbecker , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Christoph Lameter , Vlastimil Babka Subject: Re: [PATCH v2 0/5] Introduce QPW for per-cpu operations (v2) Date: Wed, 11 Mar 2026 09:18:14 +0800 Message-ID: <20260311011815.785-1-hdanton@sina.com> In-Reply-To: References: <20260302154945.143996316@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Tue, 10 Mar 2026 14:12:03 -0300 Marcelo Tosatti 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 > > But people seem to reject that in the basis of performance degradation. > Given pcp_spin_lock() cut in 0f21b911011f ("mm/page_alloc: simplify and cleanup pcp locking"), spin lock works because of trylock and fallback, so it is a special case instead of a generic boilerplate to follow.