From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F521CCF9E9 for ; Wed, 29 Oct 2025 10:33:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0A9678E0063; Wed, 29 Oct 2025 06:33:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 081E78E0045; Wed, 29 Oct 2025 06:33:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ED9988E0063; Wed, 29 Oct 2025 06:33:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id DBC688E0045 for ; Wed, 29 Oct 2025 06:33:09 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 8AA3DBB89A for ; Wed, 29 Oct 2025 10:33:09 +0000 (UTC) X-FDA: 84050789298.28.A5C0EA7 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf19.hostedemail.com (Postfix) with ESMTP id 251001A000D for ; Wed, 29 Oct 2025 10:33:06 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BkRgS09h; dmarc=pass (policy=quarantine) header.from=redhat.com; spf=pass (imf19.hostedemail.com: domain of vschneid@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=vschneid@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1761733987; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8TDebEJmKrapkTDm2SQS84/R7MOsdaEIy1zvcb82V9E=; b=5fLHlNN8ITzEK8/DUhn2n0bbl0WYcsLLkAGinKOAFc1w8iEC8hb9+XLO7vpFRemYVkmsg1 RkjlxhxMuyNOfhpWg1GeS3h7/wRSMEBGAT98pDP9Y9aYDA7m4F9yiwqR36LmyQI1JbCcvC 9keQtLIumJhWMZgFlwbMCPUHXxRinJ0= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BkRgS09h; dmarc=pass (policy=quarantine) header.from=redhat.com; spf=pass (imf19.hostedemail.com: domain of vschneid@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=vschneid@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1761733987; a=rsa-sha256; cv=none; b=WZU97ABzylGxAJJcGZhBO9bgMynVzMR+PTTkb7eDB5GPdpiJZGBfqCbsJfluBqNerxLa0S YjiGalmsDDwr8/Qx9sQ4LtdJf8hVpIFIKBbOg64w+jfwA2VlUl9O2PNUHzU2oDYEhoWPA4 8nuCu1vYq/N9myjIYkZftcd7grqTX5Y= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761733986; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8TDebEJmKrapkTDm2SQS84/R7MOsdaEIy1zvcb82V9E=; b=BkRgS09hvR7WO62DNhNuc5U23hKtV8jf4YmgE45PP+yrVk+1OV+VXeWbUbHdVBhEmJ9QWk oewDYr6VfqWtkUPGaZ8GtsHJiMKHjwa/hUQgaMoUA8F7XG9ZosGcT85E66s9ILIGqt8W+z KwBC5Rpiwe9hDWZBopIfVoS6UkqxYjk= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-417-gFgjcr4JMS6naIX17T3EwQ-1; Wed, 29 Oct 2025 06:33:03 -0400 X-MC-Unique: gFgjcr4JMS6naIX17T3EwQ-1 X-Mimecast-MFC-AGG-ID: gFgjcr4JMS6naIX17T3EwQ_1761733982 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-47496b3c1dcso53689595e9.3 for ; Wed, 29 Oct 2025 03:33:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761733982; x=1762338782; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rJM20FESPr5Q3wolT/mFDxUYnwba82V6xz3P+wmiM7o=; b=VrPLHwVDTz3lcCJg8uT0GL6DlE9o+30oFJt31x2WSAXyjbW9uWyhrniRjCEyzJ9eKL ZcuBYMpACmDlyoek22gSK9bjQAi9naY+lcPh3zsEMVrO++0zbZ6Kkwiel/kHVy3JZO2Y lP0DMamhsL1qw9TgJvH1v0pndWmT/vesBMFkOJsPYOA7cpKi26W71qgG5xmKGpZgGaph 4rWhco9gKkKFyt6Vc94XMJ9TG9ux1+G6e5YCL0o2IOj8WSZ+BD0aHgVnJ4UL0KYT4JR7 yYMlUpyp6Q65N7fl0ptlUej1L5pv73ABOEPJvy0F0f7e+M43Vw+fmPDofbJ+CynH7LrA JG7A== X-Forwarded-Encrypted: i=1; AJvYcCUmvvF/EqSCtmP8ocTFBoOyDcv8KgonxdVkiabLagbC89x5FtPbfxMxgfl5nAXpxdGQbXfnWhqUcg==@kvack.org X-Gm-Message-State: AOJu0Yykp5AslaLpbLO4NRuU0ZcSoregzCyWhcoYw6H0rcZeUmLsTFaI w8qtiCtNRgqas46V1y4SrygduSyWi1tz+B5W0qeyLL1PRFtyyuKGbX+YqVpDjfGf0aAvxAKglro cq7oK1M8HE4S8WypwbnHSq4DGOhXMznY5BTM+XxI1HLvYA1CTdMQx X-Gm-Gg: ASbGnctTcykGP8z09fy8TS984zn6AJsLh6TACsHkr5fGC/JoJdDmbJulJdlk9RYpufQ du0Bm+17VJmgIQ+Iz2rgbOmlIYPSDWml55uDltPuC2rWzgUGHbpJCl0SydCnfYCR2eOupgEXWIJ rXUkrxr+3+x0J0NdxmILlOYirY4E8cQ/B1Gf/FvBZ8jfF1/HQats7wqpXepFENqV7ZrquQHy5HP Njc80RPyPqaXQ8m1VuG92s4j1Zv821CooUtWGlkE4yrXwV7cA1vOB5Ep9x0vlXYjiBy63pGxs9J L4c6NIqdHb2aujawPm9kRpM/Mpz2JDQgDWUEmRh+tnoIXWlApK5it9CpQmhMELJ+6HmfGfClFf3 vPUvywyGcFJNsM0nrFrq22yrKSh2uPpyEXKEDHZukRtEqnE0UZTD+qMPqcKAG X-Received: by 2002:a05:600c:64c4:b0:477:bb0:7528 with SMTP id 5b1f17b1804b1-4771e1da0c8mr21409535e9.22.1761733981944; Wed, 29 Oct 2025 03:33:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxlh/PGW1+wNXuO1RQYN4fEeAqw5AdQXtt4ynjbr63hSK8Qg5GeiiDecSDqHTa53KxpVgVKg== X-Received: by 2002:a05:600c:64c4:b0:477:bb0:7528 with SMTP id 5b1f17b1804b1-4771e1da0c8mr21408835e9.22.1761733981314; Wed, 29 Oct 2025 03:33:01 -0700 (PDT) Received: from vschneid-thinkpadt14sgen2i.remote.csb (213-44-135-146.abo.bbox.fr. [213.44.135.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952b79cbsm25638297f8f.4.2025.10.29.03.32.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 03:33:00 -0700 (PDT) From: Valentin Schneider To: Frederic Weisbecker , Phil Auld Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, rcu@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Arnaldo Carvalho de Melo , Josh Poimboeuf , Paolo Bonzini , Arnd Bergmann , "Paul E. McKenney" , Jason Baron , Steven Rostedt , Ard Biesheuvel , Sami Tolvanen , "David S. Miller" , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Uladzislau Rezki , Mathieu Desnoyers , Mel Gorman , Andrew Morton , Masahiro Yamada , Han Shen , Rik van Riel , Jann Horn , Dan Carpenter , Oleg Nesterov , Juri Lelli , Clark Williams , Yair Podemsky , Marcelo Tosatti , Daniel Wagner , Petr Tesarik Subject: Re: [PATCH v6 00/29] context_tracking,x86: Defer some IPIs until a user->kernel transition In-Reply-To: References: <20251010153839.151763-1-vschneid@redhat.com> Date: Wed, 29 Oct 2025 11:32:58 +0100 Message-ID: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: wPuYp2w61BXQRfXHmp5pWTQR4Z8jvttY7O1u4_ylcNs_1761733982 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Rspamd-Queue-Id: 251001A000D X-Rspamd-Server: rspam03 X-Stat-Signature: wic9feuee9g78k98oq1x7m6yqsjjgr3c X-HE-Tag: 1761733986-169302 X-HE-Meta: U2FsdGVkX19rlhLI3OfVjKHg97dez4BrVpvGwBvSWEXp+9mBWX2akHps/JR2LdvGz+HF5Iu9teYrWUMLyJeP3u2OyokJ2zxwjODmaypiYe5ffk+2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xV/OHWG5KRHwAB9xNbD2U1GppW14pxJ6WktCQEGOSJ46hHBawz+7bPKobOwFYRIL7sT/H9kx1KaVBIlbYHihS5A9dxrPuaRSjOoQ4nOIpxfhWGDbtzvn2JvH70C+hS8JtbxqeFdAAwGx66jW2t/MuGNAFWlhndz1QLRpG6Z09yZ/1uuoXXiR7Mb61kC2BeMNwZPL993LzVC9laHFgTwHC8WNhjlIUgeaeIwX6vXD0DCDqcxxmgX2REC6dfgvU3UqY8k+z8uLlk/gDDbqVUsiA0CHPiwwTh9zzmJuXKRXsgbhvX/vBtFDFiUbO/S7zzyEiCocnfnQKfeDPMEiD/16x52lq94A+gGWzuk+fforY21h5jfNeiPt0egBf+3ooAG2CaXB3nrrXDRQBbc6l977jhesQIBsJuxrAHFMw+TyN8= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 28/10/25 17:25, Frederic Weisbecker wrote: > +Cc Phil Auld > > Le Fri, Oct 10, 2025 at 05:38:10PM +0200, Valentin Schneider a =C3=A9crit= : >> Patches >> =3D=3D=3D=3D=3D=3D=3D >> >> o Patches 1-2 are standalone objtool cleanups. > > Would be nice to get these merged. > >> o Patches 3-4 add an RCU testing feature. > > I'm taking this one. > Thanks! >> >> o Patches 5-6 add infrastructure for annotating static keys and static c= alls >> that may be used in noinstr code (courtesy of Josh). >> o Patches 7-20 use said annotations on relevant keys / calls. >> o Patch 21 enforces proper usage of said annotations (courtesy of Josh). >> >> o Patch 22 deals with detecting NOINSTR text in modules > > Not sure how to route those. If we wait for each individual subsystem, > this may take a while. > At least the __ro_after_init ones could go as their own thing since they're standalone, but yeah they're the ones touching all sorts of subsystems :/ >> o Patches 23-24 deal with kernel text sync IPIs > > I would be fine taking those (the concerns I had are just details) > but they depend on all the annotations. Alternatively I can take the whol= e > thing but then we'll need some acks. > >> o Patches 25-29 deal with kernel range TLB flush IPIs > > I'll leave these more time for now ;o) > And if they ever go somewhere, it should be through x86 tree. > > Also, here is another candidate usecase for this deferral thing. > I remember Phil Auld complaining that stop_machine() on CPU offlining was > a big problem for nohz_full. Especially while we are working on > a cpuset interface to toggle nohz_full but this will require the CPUs > to be offline. > Yeah that does ring a bell... > So my point is that when a CPU goes offline, stop_machine() puts all > CPUs into a loop with IRQs disabled. CPUs in userspace could possibly > escape that since they don't touch the kernel anyway. But as soon as > they enter the kernel, they should either acquire the final state of > stop_machine if completed or join the global loop if in the middle. > I need to have a think about that one; one pain point I see is the context tracking work has to be NMI safe since e.g. an NMI can take us out of userspace. Another is that NOHZ-full CPUs need to be special cased in the stop machine queueing / completion. /me goes fetch a new notebook > Thanks. > > -- > Frederic Weisbecker > SUSE Labs