Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp337804pxt; Wed, 4 Aug 2021 12:29:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyh788SzY11ZsZYATC+i1bbPDcOyYQ7sXgtDAMi8/BQpstGkNVZ3K0LI3D3tTiAoy32wY/ X-Received: by 2002:a17:906:b7d2:: with SMTP id fy18mr804561ejb.0.1628105351036; Wed, 04 Aug 2021 12:29:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628105351; cv=none; d=google.com; s=arc-20160816; b=G/KHhfWp7V1zSqQkrXDygvJLd5ygEcHbnfDDO7ZG2QdBuedqZuTH0qDTd94+TjUCKg mTzrvslgJEmK185PkVrw/s05r32B1PmdFgqSJRoGjV8/ecQbetg5Tm3t0piwMeJc2Z7n yD5zo94sRNh5GRilAYUVBCTSTyX5v9NCqpHwEeE+BBQ8A3xyy6HL4u5C6Q+6TAkSpIv0 KmeadMKjczUsp3G4cjCs07WJR6pkK5jIf81l8cZpgGfPatXFkUsUni9TlnYHe/cDGeHC qzBeIgp+7RpL+CuwOrlmR8aBH3pLiI5/vcxA4dOK8x/OhQw6IICHr0MblmnqPb++kxAk 7suQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=g8gWG4GvcAMyY1R5sBjgVUE3P46zlE0by6LB5VU98k4=; b=r45g7EuJVV/tCDgADOKMLA55+1cchkhklo22V/plr+cVGP1YU52TWCp6f50oyCEkgN IDxT5Yg97qUpR/PHB4E+0TDehD/vivNw29PGdjHSOYmGJEtJ2aELdC+I2XrKgfHAav1W WEskJzcUAK5dH0es0AiJ+zu9Cfj5XCO/040yn+zKfiOkK9xiTJ2kgU1QAVXC1JPpBYs3 rxTsMNJ1jsy/KbkVBz+WEQJuGarycgF6RjNq+JdVkH2MBsALnVuKWRH2PBMiLNXCEUY/ BoiVRGa6de/HOimjMeeL6pyixX3xi2JzSxlI0FQo8MPkheVgo3ZBKIsuLB3b7BTYjsBk eUDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce17si3067925ejc.222.2021.08.04.12.28.47; Wed, 04 Aug 2021 12:29:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235466AbhHDQRT (ORCPT + 99 others); Wed, 4 Aug 2021 12:17:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:39850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbhHDQRT (ORCPT ); Wed, 4 Aug 2021 12:17:19 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BFD8260E78; Wed, 4 Aug 2021 16:17:05 +0000 (UTC) Date: Wed, 4 Aug 2021 12:17:04 -0400 From: Steven Rostedt To: Jens Axboe Cc: Sebastian Andrzej Siewior , Peter Zijlstra , Daniel Wagner , Thomas Gleixner , LKML , linux-rt-users@vger.kernel.org Subject: Re: [ANNOUNCE] v5.14-rc4-rt4 Message-ID: <20210804121704.1587c41b@oasis.local.home> In-Reply-To: <7c946918-ae0d-6195-6a78-b019f9bc1fd3@kernel.dk> References: <20210802162750.santic4y6lzcet5c@linutronix.de> <20210804082418.fbibprcwtzyt5qax@beryllium.lan> <20210804104340.fhdjwn3hruymu3ml@linutronix.de> <20210804104803.4nwxi74sa2vwiujd@linutronix.de> <20210804110057.chsvt7l5xpw7bo5r@linutronix.de> <20210804131731.GG8057@worktop.programming.kicks-ass.net> <4f549344-1040-c677-6a6a-53e243c5f364@kernel.dk> <20210804153308.oasahcxjmcw7vivo@linutronix.de> <20210804154743.niogqvnladdkfgi2@linutronix.de> <7c946918-ae0d-6195-6a78-b019f9bc1fd3@kernel.dk> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Aug 2021 09:49:48 -0600 Jens Axboe wrote: > > @@ -430,9 +430,9 @@ static struct io_wq_work *io_get_next_work(struct io_wqe *wqe) > > } > > > > if (stall_hash != -1U) { > > - raw_spin_unlock(&wqe->lock); > > + raw_spin_unlock_irq(&wqe->lock); > > io_wait_on_hash(wqe, stall_hash); > > - raw_spin_lock(&wqe->lock); > > + raw_spin_lock_irq(&wqe->lock); > > } > > > > return NULL; > > > > (this is on-top of the patch you sent earlier and Daniel Cc: me on after > > I checked that the problem/warning still exists). > > That'd work on non-RT as well, but it makes it worse on non-RT as well with > the irq enable/disable dance. While that's not the end of the world, would > be nice to have a solution that doesn't sacrifice anything, yet doesn't > make RT unhappy. We use to have something like: local_irq_disable_rt() that would only disable irqs when PREEMPT_RT was configured, but this was considered "ugly" and removed to try to only use spin_lock_irq() and raw_spin_lock_irq(). But for this situation, it looks like it would do exactly what you wanted. Not sacrifice anything yet keep RT happy. Not sure that's a solution still. :-/ Perhaps in this situation, we could open code it to: if (stall_hash != -1U) { raw_spin_unlock(&wqe->lock); /* On RT the spin_lock_irq() does not disable interrupts */ if (IS_ENABLED(CONFIG_PREEMPT_RT)) local_irq_enable(); io_wait_on_hash(wqe, stall_hash); if (IS_ENABLED(CONFIG_PREEMPT_RT)) local_irq_disable(); raw_spin_lock(&wqe->lock); } Note, I haven't looked at the rest of the code to know the ripple effect of this, but I'm just suggesting the idea. -- Steve