From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 8646F1DFDE for ; Wed, 11 Mar 2026 00:01:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773187266; cv=none; b=Zihvew892JPxr5HkTV7gxLkX5rJPIbVLDDDFNl9fSfb3zQWnFcavXE1seYp1oRLMarMXI5nWxWuQ1yEU46fU7wHeHxsqBMoKx1SPedVb3BYTwyzivxwtMBNAKb2C8+QNJmMrLWDdiF0qfUD4SpB5TjwCTv3K3TaiC/NaJ3SqRzc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773187266; c=relaxed/simple; bh=WPQTlOy4+7EdwLH1HzvDEbIl1rugHmya/5VpKkfZU3I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type:Content-Disposition; b=DKN3weaVhdiRwzQT3N4chIR5uzaTXSi6EbdDf6aNCjAKLCixScQ7os9lLjlKcLHCVU8EWMje7WZ8vcgjZbGBQm+6Zrl2h4DTrutrlaE9Hed42jUjADDsX69vKpvvfQgHD7k2gDAWtGvHPGOrm+3fcZMRdZWBKXXtX63PDO6qdXA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=M4OUXF0X; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="M4OUXF0X" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-48529c325f0so33312335e9.0 for ; Tue, 10 Mar 2026 17:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773187264; x=1773792064; darn=vger.kernel.org; h=content-transfer-encoding:content-disposition:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=/eEDdOnuoN+4uXFeXQVdnNuy5kSNMswYGhV2JxYSYJ0=; b=M4OUXF0X+hcXS1wiesAHuhqlu5lgYI2DIvvAtxTPUQFqUZjkDPmmDfm/+9KLJzA3bw Kv4pVt2S2clVEgYQVC15VS/U8JeOcMfyrT88XJ/1IGONuqtAsSpCELgbZn0URXgXZq4Q C7sPNifpr4EqpEwN8JijsP9OXW910gypeg9y3KwCORZ7+feHr7phiRSiBE/h4RMeVTxN i+H1S4j5/6Ig7kJPyuklvUgb5EJhD+CnShbc3L8AjdqPNmL0SMpTx5Y4+e4UuYEG3vJh mawSRJg2v4DGZrEDCxoHu1+rlW+cRvnsHZnDDf11QmWeUQVXokNPIOCeiqgU5tZ9jn3l 97Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773187264; x=1773792064; h=content-transfer-encoding:content-disposition:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/eEDdOnuoN+4uXFeXQVdnNuy5kSNMswYGhV2JxYSYJ0=; b=dq5GP5fHrEGZp8ZSj4HppBPs++yIhmK4LOUsdEyrEXOXhDsJcKwT13xA2iIReEQX3r BWkSMG4bkOKyVejeZYt4b/oSOGSSx3WJ7jhp1hzRwbbdlNd4n2CTdK+Nnq8vXoYBBoib DBl40c4sovzN/PIMQV2IZMhVyRY7htyhj35Qg2vQyjOEyVEnMngp0VgFKiYR+JZuWmhw 02IM36dWjpxaYNq8UMbwzhIvZWRqGU7PYoLp1NhliLSxkHxACwTCtgXBIxLWRjTJTb0+ 048NEX8k2tpGm30G3FatjBnnVT9XHi/joh9vI2a2ng2magCaINO2sIbBqaCIMtWRb567 VNiA== X-Forwarded-Encrypted: i=1; AJvYcCUTc1zP0WeCfyGGRqf4SiIci/cpCyTEXMXxh70yxp3TrzfvcoLDX0Tlugpj1DapR7lTfKTEqPM/euG3iBQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yzc+7lhGog71WgfNNiKVtsCEG0edjX9nVByzPP3buD7WooCdaNi t6QsSjCKIy0Q9UiGYHj9Dez0Nkd30bCgINpcesl3wI/ex2REA0+zpk1G X-Gm-Gg: ATEYQzy8Z9/Umjb2tcRGEah1ajWFCuk0914XQiVCubnNT7aeWMzvdx4rW3er6I/ncA5 WcLUIJnRggfE8JIR3gIuB2HlexdAjQqB4GA1USSess61aF+CqvEBoSHMbYuYlnjDXfziKACCDwZ Re1ZsIm58PvCLKgHNYDBpHfrv4r8q8ZickkxIcgKRaei2R0VvTyOIDh1+zBlPYFNKXHXRojjkcI cllZEkPlQYoi42MT0TOEqKWHGChjjB07MgCYHNvpxDwRDixrGw1yAN/NTHpQ4FIx1O7LIeLBH2q UL8FGhY0qE7D1Y1YkFD2kTsAnhYVgPZKC4SUQIhp5+WA1zmpoERPKP6otBPj79YQKUchj+0QZ0F lzYTxCE+0hY5Xbm4wmmVsQ6DhkR+AY2qtnMwAy6FhslTswU1tXzBO9TF8Wcs6RGr7nnIUsIfpE0 wK0A7d1OWFVs/owbE/MY+NGaj3gVlIJ+xAxfU= X-Received: by 2002:a05:600c:1383:b0:485:2fe9:3375 with SMTP id 5b1f17b1804b1-4854b0bff59mr10920345e9.15.1773187263637; Tue, 10 Mar 2026 17:01:03 -0700 (PDT) Received: from WindFlash.powerhub ([2a0a:ef40:1b2a:fa01:9944:6a8c:dc37:eba5]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4854b0bff95sm7638015e9.3.2026.03.10.17.01.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2026 17:01:02 -0700 (PDT) From: Leonardo Bras To: "Vlastimil Babka (SUSE)" Cc: Leonardo Bras , Marcelo Tosatti , Michal Hocko , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Johannes Weiner , 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 Feng , Frederic Weisbecker Subject: Re: [PATCH 0/4] Introduce QPW for per-cpu operations Date: Tue, 10 Mar 2026 21:01:00 -0300 Message-ID: X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8bit On Mon, Mar 09, 2026 at 10:52:55AM +0100, Vlastimil Babka (SUSE) wrote: > On 3/8/26 18:41, Leonardo Bras wrote: > > Hi Marcelo, > > > > Great, hiding migrate_disable under the static branch is the best scenario. > > > > I wonder why we spend 2 cycles on the static branches, though, should be > > close to nothing unless the branch predictor is too busy already. Well, we > > AFAIK static branches are runtime patched to non-conditional jumps or nops, > so there's nothing left for the branch predictor to do. Or maybe I > misunderstand your comment. > It does however increase code footprint and thus instruction cache usage, so > maybe that's an effect of that. Oh, I was not aware of that part. Since we can actually change the the branch decision variable in runtime, I guessed that it was just a optimized way for the processor to use the branch predictor. If it makes a non-conditional branch is even better then. Thanks! Leo > > > can always try to optimize in a different way. > > > > Thanks for the effort on this! > > Leo