From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 14CEF37D11C for ; Thu, 19 Mar 2026 14:40:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773931258; cv=none; b=d27iegiH8EMRC5c1Gr1Nrx4OK7sBXEYXdDTeeUxjMemYgHpPhSzlDXDsrXkdBOfiur/2RWO5YUgKsULB0wLVU5lQVjGENHIEEhNBZs4Hr/isUFMicIGHKPA8fhd9b7eUwMEDtrTM671Wwo9mpZtFlF7uYu7q0iTiPM7oj8+pu9M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773931258; c=relaxed/simple; bh=KrH+IASaBdVHem8LN+VH0hwMsKP4+UMZrLmC8vHxCQM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PeMkLMG9/VOqfTtgNeqc38COgcSsa/OJSeQ2HptOzCyrXMyDsKU+rzcR2lqJiHW770AN5nmysoqOmhB1QreOlqChHBOBYgdwnPpFtGAQhnUe+wv78xJYgo4nMgTwpmtPU+EU2pdKH0PxCGQBMINfRIuaB+nT/rszlMtXmQvJgYY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=KhFGW7A7; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=10CtFU4z; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KhFGW7A7"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="10CtFU4z" Date: Thu, 19 Mar 2026 15:40:53 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773931255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mhJ/sKa5Ve9UHrL16M6c2jo83m6bpNO7YcXdlYulPnw=; b=KhFGW7A7P2XdqPOQJBeXydbfZ2JEYgSWW2JTiM8HjG+moJMg10RdsUasEynFIy1kGuY7zy HYSGIsgf9nepq+cR3IOMUQoyhNBHtS8lJcgV2PMiT9xepNaQBJ3xiXDFfL8iVhwczfpylq KzBimxrLlIyQPRkVM9uiaaAe2G6vc0SoTbznJH9gbvPUjbK3flkntmNvjaAhAxL6LtyqNp V2KtyX6NJFRjB+QLNFR8Y1Y4oNJ+APhMc7R070QQN432BvMmL5slI7WJl8yDAtckyOFqQt TxcnaZwTadIiQzoKN2iA3CkBrHFBdUk1IESFdwWvVMklqRFDUjzUC2O/DbdvLg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773931255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mhJ/sKa5Ve9UHrL16M6c2jo83m6bpNO7YcXdlYulPnw=; b=10CtFU4zBpwHLgS3RU4iKqWWgSdlzLg9d+5ZanwZkGzywmGL26OZ4/oELtb0W8IfSHZZu2 ROAfER+JI/8HNlCA== From: Sebastian Andrzej Siewior To: Chuyi Zhou Cc: Nadav Amit , Thomas Gleixner , Ingo Molnar , luto@kernel.org, peterz@infradead.org, paulmck@kernel.org, muchun.song@linux.dev, Borislav Petkov , Dave Hansen , Paolo Bonzini , clrkwllms@kernel.org, Steven Rostedt , Linux Kernel Mailing List Subject: Re: [PATCH v3 10/12] x86/mm: Move flush_tlb_info back to the stack Message-ID: <20260319144053.bKDLNrIy@linutronix.de> References: <20260318045638.1572777-1-zhouchuyi@bytedance.com> <20260318045638.1572777-11-zhouchuyi@bytedance.com> <20260318172143.ICooJ3-U@linutronix.de> <44F4BED1-D09A-40B3-BB2B-E2AFB0AF8D0D@gmail.com> <3A5D6EAA-E20D-487E-987C-BA88B98820BD@gmail.com> <20260319084929.T6d0DX1P@linutronix.de> <167D4B3D-390B-45BE-97DD-FEC1791B3ABC@gmail.com> <20260319105827.Bx4E3nUN@linutronix.de> <7f4fd9bf-8e8c-44ec-a0e7-64e21abc8d13@bytedance.com> 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=utf-8 Content-Disposition: inline In-Reply-To: <7f4fd9bf-8e8c-44ec-a0e7-64e21abc8d13@bytedance.com> On 2026-03-19 21:41:28 [+0800], Chuyi Zhou wrote: > Hi Sebastian, Hi, > IIUC, you mean something like the following? basically yes. Later you might want to add a static_branch to can_inline_cpumask() instead the check you have now. The value to cpumask_size() should be assigned once the number of possible CPUs is known and never change. > diff --git a/include/linux/sched.h b/include/linux/sched.h > index 5a5d3dbc9cdf..4222114cd34c 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -927,6 +927,8 @@ struct task_struct { > unsigned short migration_disabled; > unsigned short migration_flags; > > + cpumask_t *ipi_cpus; This is probably not the best spot to stuff it. You will have a 4byte gap there. After user_cpus_ptr would be okay from alignment but I am not sure if something else shifts too much. > + > #ifdef CONFIG_PREEMPT_RCU > int rcu_read_lock_nesting; > union rcu_special rcu_read_unlock_special; Sebastian