Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp611793rwb; Thu, 18 Aug 2022 09:08:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR6wgaohvzxKb77sqcFbG8MLFa2aftnyL74TDnmfs5PdsNx6YH5FN9qQ35CWjJN/hr002vsA X-Received: by 2002:a17:907:971e:b0:731:48b3:6fb7 with SMTP id jg30-20020a170907971e00b0073148b36fb7mr2349563ejc.267.1660838882978; Thu, 18 Aug 2022 09:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660838882; cv=none; d=google.com; s=arc-20160816; b=LNcD46SMDFW36XpqK1vamY/9y32jj1qxyIiN4jc4XH9NHtSmj/01G2g9f0j4+JJXyL r0F0KDWGUJMzT1C7Lw1qXTF6/t1TfKzx5wW7j61YR7kNWPqxkQtOq3833wKZLe9BiOkL ykkVjEuuLAtktbINfgRdsDJmQpgXIse4DtD0NhwF1UAix6lze/1bnKIrJnpqhAVZj5AB YwnBviQTtCjIO1vYeu7s7PTNYFnBbpFPeuk4MZpUm6uDC3PYbGpQFzwlMvQJBGZAEBak ZsVTOaVgQqewyNI5onF+EMYI/Ixlkg9AE9X44IWKmKGaJHhH6pn5dONnj9Hk4JwUBy0p OJ2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=8yxb0BK/v/93Xq0pa1I9UCRiP9ec/brO7gpNu4/9X1I=; b=Y4cpU+QgEjKnDEsilFDTwbKZRXIEpD1dvSuRcMvKisA0sSOH8H81dCA5nrvTdB6mo3 rlsoSVudEZAsORGBT7QKRg9z4g/QRK4tEPrP6EZZAWx8u1jPZAGa112uVEAWuDKiJjAC aRchq5EWPNPGG78RdgTno8l3PlbC/xNxOtkmq9LzET9dOCBTloU0tGkAkTtDDVX8U5E9 U/3zGpvOkk1PQQqsRTQE5cFxzA6iqYnaaP8FPY57MN8SbFiGQD+3sVRo2hwjxep3SfqE pAwSCbhDyw11JdT7GSCla5fK0q9gOYaqhaZnxtE6ELiYXUNpmQ5/zwC+ur6G/qKnJV6H WJpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=N0sOwP6Y; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 14-20020a170906328e00b0072b66c5cdf0si1132043ejw.481.2022.08.18.09.07.36; Thu, 18 Aug 2022 09:08:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=N0sOwP6Y; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245691AbiHRPXQ (ORCPT + 99 others); Thu, 18 Aug 2022 11:23:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343630AbiHRPW7 (ORCPT ); Thu, 18 Aug 2022 11:22:59 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDAE2B6D6D for ; Thu, 18 Aug 2022 08:22:57 -0700 (PDT) Date: Thu, 18 Aug 2022 17:22:53 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1660836175; 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=8yxb0BK/v/93Xq0pa1I9UCRiP9ec/brO7gpNu4/9X1I=; b=N0sOwP6Y1tb0uxw/BYDqiGHTaDkmgHYONONd4OzKlQlsepQD6QwroOxuY4eaN7Gf4yaTPm jV+d5tas7FuBcUWJpskBib6YDNx9ne+pA6SKpgsgz/pnZjtRjxvY4qCiEwErAA5xYiqQuC EGVnrneAfnVcRMSppGhJsqc3TpmdJA+EPATNQyjQupTc7LcgzE6ZGljlMI1fUGHVuBemr3 H5v51gGZAjEwVYKv6qiGoW6cAudBobHBzJNilmVdCM04W8zDBiGKg58lMHpImldTx6wC4N ulUZv9LfAJ85H0Tqa5ZXOgErhXs1Vy2aicTfGC+TfXg6g4Bk+QHcDo0kPAUr8Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1660836175; 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=8yxb0BK/v/93Xq0pa1I9UCRiP9ec/brO7gpNu4/9X1I=; b=dmenoKVG6VL28Mv4WKSd3gfipU49QQ0XlOgJfkhoKvR2lKtquKwtrYIEc2TVlo2m8sL8GC xaS/J1l+pxZr3WCg== From: Sebastian Andrzej Siewior To: Vlastimil Babka Cc: Christoph Lameter , linux-kernel@vger.kernel.org, Thomas Gleixner , Peter Zijlstra , Steven Rostedt , Linus Torvalds , Matthew Wilcox , Andrew Morton , David Rientjes , Joonsoo Kim , Pekka Enberg , linux-mm@kvack.org Subject: Re: [PATCH 1/9] slub: Make PREEMPT_RT support less convoluted Message-ID: References: <20220817162703.728679-1-bigeasy@linutronix.de> <20220817162703.728679-2-bigeasy@linutronix.de> <5679405a-b3c3-6dc5-783f-7ebeda7c9bf0@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5679405a-b3c3-6dc5-783f-7ebeda7c9bf0@suse.cz> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-08-18 16:37:06 [+0200], Vlastimil Babka wrote: > > The slub fastpath does not interfere with slow path operations and the > > That's true on !PREEMPT_RT because a slowpath operation under > local_lock_irqsave() will disable interrupts, so there can't be a > fastpath operation in an interrupt handler appearing in the middle of a > slowpath operation. > > On PREEMPT_RT local_lock_irqsave() doesn't actually disable interrupts, > so that can happen. IIRC we learned that the hard way when Mike > Galbraith was testing early versions of my PREEMPT_RT changes for SLUB. I think the point is that local_lock_irqsave() does not disable preemption. So the lock owner (within the local_lock_irqsave() section) can be preempted and another task can use the fast path which does not involve the lock and things go boom from here. Sebastian