From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 34835330665 for ; Thu, 18 Dec 2025 09:30:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766050239; cv=none; b=LwIdpvN9lxsVKDy+3H6rtEwXf+OHjVMhjMmBE0OTFhWobbPcgKebRFljwKYHxwo2M4nvspev4mkBuu55rSZ08ZMJ0hSOCtmwxg003xJnv1bfM0svgnJbxh+dPjCxrpolXyMgxeS/Kr1U7izgnvnpyuo63ENt2IV2p3SuOBpS9B4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766050239; c=relaxed/simple; bh=8Lk1cogg5352nQHgKI1WW/DDJU3qCFewyZmYxMrF1i0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WXNSYpnirbPNHoaIKJmZPj3TQh37z9NxuT63G9ww0yzyWt9UhbuKUTpsvWbqMnZsMHSeawgbGrMBQ1bEITnDre4qEXBEt670ctGN1RZ/+VZQ09oY/zR2sIIeaI6Put8Xm6JwqNvX34F8f1qFdZNFNOKXQn3PIqV+7OLySuxNQ18= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=J7+xZH4N; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="J7+xZH4N" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-430f9ffd4e8so736122f8f.0 for ; Thu, 18 Dec 2025 01:30:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1766050235; x=1766655035; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=auj72bQKfXEBr2u68dWzZijoBsCuhcqMu/4EXNR4iyc=; b=J7+xZH4NlMnvbBYCKnvZ5BxWe1mQeTBkgQeJ3RjNSFKYDmjPkIElN/o6kWOkIPrFLG bMFnnXnQEpo2y9K6faOcbayK84cjTtuKKOTRiDUJIS5J56AoYMfJjJQSP+c9aM+gNzDZ OGP5Bx9racFOtWDP9o1XAoFtf7zdJojdI8ZaWVBPAF6Wsx0ORwZ5HzHTV9h7PRkpU89P 5ti+ZIg12fFPIE5IuEfJsBKDf/QKAMqjlHuqgA8j+kbhMIUynO2JJHqSQefuuTSDuSLW 7mve9kTe+NMfJqvZBZ7h+4CVBV/3NK3jpsxjipZfxQQWBszmCmph+rifF3wqMAzgnwfn LL5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766050235; x=1766655035; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=auj72bQKfXEBr2u68dWzZijoBsCuhcqMu/4EXNR4iyc=; b=mUuqiStic+O4pdc0p61G8Gmatxxk3aLli00PvE02I2UbvDcVOmgGiTnbLQ8YxxKwM9 C9PhOVEgbJZUCv1NWAhcI8HzVKTLgWvWrHBRIULA2xgkDjF7b05/VvtHzyI9sB2gxrlH jEX3rsusdcuwG42xMsm5CmSOmhyWyMcXIExO8pIcLzUHxp7r2Fd8e6eVnNEHnL8bhmmZ PcuY0Fsg25YuFgiDknPbYxAuoDGa3LXoTmxVRQbOfq/CwRxz41usu6VfYBeUUgtKui6Z Ig0k7gUy14QqrRIFLgN10fV5zV/FKYCX2qCn8aRGDX1PZSDW2AvyXWn24IMOMq95PjCc lc5Q== X-Forwarded-Encrypted: i=1; AJvYcCWgtBrcvo2oHCzkIPzo6f8YwQ9LCvOj8loL2NPDuuHu6CjPJqIQctESaCHRmapIJCqbcu4PS32sajZwDrY=@vger.kernel.org X-Gm-Message-State: AOJu0YwiazaJnMGhYu8nwKlobCYftcPFl+IsqJjImdLY3Ygnh96M1c3o Dx/XMHq7ANt40BGwFCTMnPloBuNKw+KMtuqbq/zjxH05oSxW+ismlAk4XuTkPCcPQb4= X-Gm-Gg: AY/fxX43StTyoxCmrJuJZ7PrQCDcwW5rZL/RqEr69tPp1Q3qVoLGPR47AL6utEJv2JZ MQ/9CRRuZPcV1Lzluc6fthYcaHnYdyVlxajqDEw0XqnKUGcjTUfBa/sPmlXwn3WI09uIrFuqA1z DK6+GIVGlArfrRGOhd1dU6n0+Yd2hPdx5IaTVIcOh4Ez1Yf8dzXDWTSSL29Olj+F859m6ejA53P tQybjZbbuD/Db7BIUWSqw8LEcQ9Et6lOCjj63lA9M6zNIkxmT3T/GbSwJN+J/bQLi6r40YN6P8x azw321BV1SiBco8aUVk86L/eqSbOg9tBrx4t3WmBQY7kIKRgKw4a9aGC9/UfEhWxwTIZ2UfR+FL H4OjZaSMt/Ve24VrCGJ+rs01+vva/V3TQAcARblv95AYSKtSdWajydHYA91DKlJ4LYumKvdOHHg Etv0nSmP/kZbMSFAHo7AwJ3e/B X-Google-Smtp-Source: AGHT+IHyh7gnIimLVB/hVii5bUcInWlX+sJTJLBC1+RURn9zto3ffEvz7ijXdEVgop3qQY9DVJKifQ== X-Received: by 2002:a05:6000:2407:b0:430:a803:e49f with SMTP id ffacd0b85a97d-432448b7f43mr2778068f8f.15.1766050235424; Thu, 18 Dec 2025 01:30:35 -0800 (PST) Received: from localhost (109-81-80-251.rct.o2.cz. [109.81.80.251]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324493fe32sm4092572f8f.14.2025.12.18.01.30.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Dec 2025 01:30:34 -0800 (PST) Date: Thu, 18 Dec 2025 10:30:33 +0100 From: Michal Hocko To: Yeoreum Yun Cc: akpm@linux-foundation.org, david@kernel.org, lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com, vbabka@suse.cz, rppt@kernel.org, surenb@google.com, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com, song@kernel.org, yonghong.song@linux.dev, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com, jolsa@kernel.org, jackmanb@google.com, hannes@cmpxchg.org, ziy@nvidia.com, bigeasy@linutronix.de, clrkwllms@kernel.org, rostedt@goodmis.org, catalin.marinas@arm.com, will@kernel.org, ryan.roberts@arm.com, kevin.brodsky@arm.com, dev.jain@arm.com, yang@os.amperecomputing.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-rt-devel@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/2] arm64: mmu: use pagetable_alloc_nolock() while stop_machine() Message-ID: References: <20251212161832.2067134-1-yeoreum.yun@arm.com> <20251212161832.2067134-3-yeoreum.yun@arm.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=us-ascii Content-Disposition: inline In-Reply-To: <20251212161832.2067134-3-yeoreum.yun@arm.com> On Fri 12-12-25 16:18:32, Yeoreum Yun wrote: > linear_map_split_to_ptes() and __kpti_install_ng_mappings() > are called as callback of stop_machine(). > That means these functions context are preemption disabled. > > Unfortunately, under PREEMPT_RT, the pagetable_alloc() or > __get_free_pages() couldn't be called in this context > since spin lock that becomes sleepable on RT, > potentially causing a sleep during page allocation. > > To address this, pagetable_alloc_nolock(). As you cannot tolerate allocation failure and this is pretty much permanent allocation (AFAIU) why don't you use a static allocation? -- Michal Hocko SUSE Labs