From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (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 C677218787A for ; Tue, 31 Dec 2024 16:16:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=96.67.55.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735661770; cv=none; b=hg/aV1u2YB9vxm37QOqamMbY4Rl+A9ypQAqd/Bde0KmgvMCc7QhOkr0IIvexBr66C1s5lOJ7087W7JB6mF69W1YV4/lwAQz4Kv8jjdG6QeDPq9Me6x5/bUX/rhdCnJE76v6nVaUyQAffLVUMT02O0aNMdchb84azGIXhjKu4jrQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735661770; c=relaxed/simple; bh=lowjzJNn8anyBv7So8C8BkqLMNSMcywPBqCxgzE6X+0=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=mhf6uUeEkt7wGk/HOGTrSMaJvHgzKMFBg/CNZEzobE4pjIaG4I5za5whIWdXY1BbNbW9rGc2EVzwaT1lqpmkbp+Xtd17mhpjbBIlkRlXXkcu+QbIv5sJNR1WfJJaB3EAt0BTT9UwMJqRmdthyVWkKzIEvN8fE9GetOIfHEA+Rx0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com; spf=pass smtp.mailfrom=shelob.surriel.com; arc=none smtp.client-ip=96.67.55.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shelob.surriel.com Received: from fangorn.home.surriel.com ([10.0.13.7]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1tSeqW-000000003SG-24IT; Tue, 31 Dec 2024 11:11:52 -0500 Message-ID: Subject: Re: [PATCH 01/12] x86/mm: make MMU_GATHER_RCU_TABLE_FREE unconditional From: Rik van Riel To: Borislav Petkov Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, akpm@linux-foundation.org, nadav.amit@gmail.com, zhengqi.arch@bytedance.com, linux-mm@kvack.org Date: Tue, 31 Dec 2024 11:11:51 -0500 In-Reply-To: <20241230184118.GMZ3LpTn3dHvu_bq-p@fat_crate.local> References: <20241230175550.4046587-1-riel@surriel.com> <20241230175550.4046587-2-riel@surriel.com> <20241230184118.GMZ3LpTn3dHvu_bq-p@fat_crate.local> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.1 (3.54.1-1.fc41) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Sender: riel@surriel.com On Mon, 2024-12-30 at 19:41 +0100, Borislav Petkov wrote: > On Mon, Dec 30, 2024 at 12:53:02PM -0500, Rik van Riel wrote: > > Currently x86 uses CONFIG_MMU_GATHER_TABLE_FREE when using > > paravirt, and not when running on bare metal. > >=20 > > There is no real good reason to do things differently for > > each setup. Make them all the same. > >=20 > > After this change, the synchronization between get_user_pages_fast > > and page table freeing is handled by RCU, which prevents page > > tables > > from being reused for other data while get_user_pages_fast is > > walking > > them. >=20 > I'd rather like to read here why this is not a problem anymore and > why >=20 > =C2=A0 48a8b97cfd80 ("x86/mm: Only use tlb_remove_table() for paravirt") >=20 > is not relevant anymore. That would be a question for Peter :) >=20 > > This allows us to invalidate page tables while other CPUs have > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^^ >=20 > Please use passive voice in your commit message: no "we" or "I", etc, > and describe your changes in imperative mood. Will do. Between your feedback, the suggestions from Qi and Nadav, and the kernel test robot flagging some build issues without CONFIG_CPU_SUP_AMD, there's enough to warrant a v4 :) --=20 All Rights Reversed.