From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from va-1-112.ptr.blmpb.com (va-1-112.ptr.blmpb.com [209.127.230.112]) (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 204BB44D6A1 for ; Thu, 11 Jun 2026 16:17:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.127.230.112 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781194648; cv=none; b=LqNwZppwtruJOAgTPapAkHW9OU2KQHGRdp61TzCCGQB3PCkC/DPMSHQZfZZXTgfegD14H9DCm3qK403IkaplihSR4hcJfmn5EVuO4m473clMaP+AfZOll7sQrHKc6eHxNcgORIAEd5rPd96vACt+9H1FaYYG14+oI3hDYPRLj14= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781194648; c=relaxed/simple; bh=XR/ompuVz9b4Z45ekki5A1Z2EUzBiPLNaltKuddbHIE=; h=Cc:Subject:In-Reply-To:From:Message-Id:References:To:Date: Mime-Version:Content-Type; b=udMtnswnK2LwhJkaMpPbQZrtD4rSI8hY200eCWNPC4WzH2Z4briLgxe7jkhdFXlWQ9sIu/FI49dgNAJ6EabqOq2pRkGwacyNQESI9W7lo99sVz2LeqyUxCFHu6cmXJr2t+hVxqezJUdvFKj9m0gggSlmzo7R7fvVibCILMnapNg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=jSJqR7R4; arc=none smtp.client-ip=209.127.230.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="jSJqR7R4" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1781194641; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=8k818rycdIuq6r0FYGeNWAJs8nf4VyzQJLfACwa481U=; b=jSJqR7R4GFR3kkRjh3nv5xlaLW5A95Yz6fDI5oTNM7rV/vmERpJZoyD/IP8l62FJ8NZMA1 lZgTGNcVvoRXf1sCm7JTmsTeoxVOTQ7oSCUgZamXg4XnKnH6w0Jg6DkfSUXweQaYLkihC5 teE/Lo6lDIiB0r/xuO4s/PoyAqIX3EOBWty0s6klHPvLXotaVTQ5B/1/SNBLHCV4Uz3HBR G8fR6t69TcRowmqmHB4aFbR7rVx52Njf35GmUu8VLliBPAYQRaiyM4O5k7L0qJO6m/oxkQ ol1NJCUOa38Jbt+idfrwgUauSjLc0h8j+fJclVbB3BRcVSUzJyUa+7i0olenyQ== Cc: Subject: Re: [PATCH v7 11/14] x86/mm: Cap flush_tlb_info alignment at 64 bytes X-Lms-Return-Path: In-Reply-To: <6e0bf0e9-b4f2-4800-b9b7-66dfe536523b@gmail.com> Content-Transfer-Encoding: 7bit From: "Chuyi Zhou" Message-Id: User-Agent: Mozilla Thunderbird References: <20260609091710.404083-1-zhouchuyi@bytedance.com> <20260609091710.404083-12-zhouchuyi@bytedance.com> <6e0bf0e9-b4f2-4800-b9b7-66dfe536523b@gmail.com> To: "Nadav Amit" , , , , , , , , , , , , , Date: Fri, 12 Jun 2026 00:16:58 +0800 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 X-Original-From: Chuyi Zhou On 2026-06-11 11:37 p.m., Nadav Amit wrote: > > > On 09/06/2026 12:17, Chuyi Zhou wrote: > >> +#if SMP_CACHE_BYTES > 64 >> +#define FLUSH_TLB_INFO_ALIGN 64 >> +#else >> +#define FLUSH_TLB_INFO_ALIGN SMP_CACHE_BYTES >> +#endif >> + > > How about instead doing: > > #define FLUSH_TLB_INFO_ALIGN MIN(SMP_CACHE_BYTES, 64) > > ? > Yes, that looks better to me. It expresses the cap directly. I will change it to: #define FLUSH_TLB_INFO_ALIGN MIN(SMP_CACHE_BYTES, 64) and add an explicit include of in tlbflush.h so this does not rely on an indirect include.