From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f202.google.com (mail-dy1-f202.google.com [74.125.82.202]) (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 ADBC51F5EA for ; Thu, 30 Apr 2026 00:12:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777507926; cv=none; b=PypFaUYgygGeseckMobjwY0J4uH/3t/2+h4jj36YYMLn4yftTUajKFWaYV4ckT4nvrW8pFxV3LzvkypUqS1MfxAW+Jg8xnt7dMkiZetJpZLfX8U/R3bYlobovNitzEXkW4uF9B4/wCghvCMovYLkHpw4KVVovygT9ZTdbJKlFSU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777507926; c=relaxed/simple; bh=6sYgDNOD1AaqOKJSgBvMJ2naf4FVahhxWL34k9U9ED8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=WAoM+GsJi3MR3bBHpUGdVImfYg8HuNJYhXZ0SznEsClVXQTozPT6s6eYQT3/9EiCE6J/nmD9EuD0UvVfcW3crTW16qqUQ3VmEqshmtcK1WqiTMWFYBA3v7O/FtEMsnVY8Ak8w3gN9nKDwLv3KqEz7IScJUcgEMnyJfICv4UEGKY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aniketgattani.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=TgEgCJcm; arc=none smtp.client-ip=74.125.82.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aniketgattani.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="TgEgCJcm" Received: by mail-dy1-f202.google.com with SMTP id 5a478bee46e88-2eaf70f3b5fso479029eec.0 for ; Wed, 29 Apr 2026 17:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1777507925; x=1778112725; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=dl40BgfsKMv4JKZvVJi9z2VoboTFCJMd6Rmp4zsqo8s=; b=TgEgCJcmGTF3HWLJ8AetZg0/o7VGT88oGd7ozsawJDoEAfdU68x9zeC1vwDcilPtau k7v5v+Uw0uDnGqiX61DvBySq6QmSd12a50sl2g8MIKdFOy7bZ5sYr8AyxseQJPsAAgiR XYuIrdNgHnnxk0cK6Ppjq7dzP3tOvnBD1to0wZopbrRt1l/yaajYjH4vVoouyvJsky63 5AEBxlZsEovq59l3J2rPK7ee7M7Hcp41uqxHhtJIMPivvCjvwEKO1cQvpVXrlNNmPjIr UAT9l9p1Uj1DMt0UfeCsljCKOZrDf8ArDjP70K6iCj4L1iVzvR1pM9324EK3E3R77J8D NkLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777507925; x=1778112725; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dl40BgfsKMv4JKZvVJi9z2VoboTFCJMd6Rmp4zsqo8s=; b=jxPYYpjRKimNyYe+Ble0m4Ns9IdoNQnzdpYP5uWJmvpe3ZaapWVw2qs8sFE+UTQmEJ IqMuO24lMg5tKQ/79vQBPo/A8Nve5EfgUss3uBVOjPOqtBiXl+wTWBp7f48otmdBhPe2 8FAB6mMkurdgbsLC6b92XVZiUJeAIGmC21idluzbsP1M3UWkL9M8Oluq3almMagAGVqT pVNK5XfAIpHWIBdMSXEvs92Sj0AqX1yshCc1Qdtlk055OSPhtoZAV/+R05j9Q/RtZGzJ /gwLgLytruL7LzDrN5iTwqwVx844EumxAZx8LAvYgo/aMEESIVHCgNtpfufXDjjHK7oY 5J4Q== X-Forwarded-Encrypted: i=1; AFNElJ9Xyhcsy/Z6tya0zy5CIrEZ2Hpnafdjd4dEiWXtiw09Lq3DHlAEGcMMwaVH6T4etHfJKsNMKb+7KLqrMLQ=@vger.kernel.org X-Gm-Message-State: AOJu0Ywk2oZYcHXNmq0p7mFAbTg6Vj05RAMltIJTjmZIhjC0khuYlYcS r5FKN/qrkEp2mhbqIkSokSVNCQGiVJ5kZZp/7mOu0kHi9Kspk1bJ9qWuYnSWNv8nXUGZGVne/og kKdah1qsM0EfBD4pdAh8WM8RsuL/tE62EIw== X-Received: from dycaa19.prod.google.com ([2002:a05:7301:5413:b0:2da:b59f:1e95]) (user=aniketgattani job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7301:e8d:b0:2ed:e14:7f5e with SMTP id 5a478bee46e88-2ed3f15aed3mr195367eec.34.1777507924508; Wed, 29 Apr 2026 17:12:04 -0700 (PDT) Date: Thu, 30 Apr 2026 00:12:03 +0000 In-Reply-To: <20260428124823.GY3102624@noisy.programming.kicks-ass.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260428124823.GY3102624@noisy.programming.kicks-ass.net> X-Mailer: git-send-email 2.54.0.545.g6539524ca2-goog Message-ID: <20260430001203.1408218-1-aniketgattani@google.com> Subject: Re: [PATCH v2 1/2] sched/membarrier: Use per-CPU mutexes for targeted commands From: Aniket Gattani To: Peter Zijlstra Cc: Mathieu Desnoyers , "Paul E . McKenney" , Ingo Molnar , Ben Segall , Josh Don , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Tue, Apr 28, 2026 at 2:48 PM Peter Zijlstra wrote: > > + if ((unsigned int)cpu_id >= nr_cpu_ids || !cpu_possible(cpu_id)) > > + return 0; > > Right, so this is broken, sorry about that. This makes the whole > cpu_id == -1 branch below dead code, and that cannot be right. Hi Peter, Yikes! Thanks for catching that! I forgot that I placed the condition that way in the first place for the exact same reason. I should have caught it myself. I like your suggestion too and will incorporate it in v3. Thanks, Aniket