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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8712FC64EC4 for ; Tue, 7 Mar 2023 01:58:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229899AbjCGB60 (ORCPT ); Mon, 6 Mar 2023 20:58:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229748AbjCGB6X (ORCPT ); Mon, 6 Mar 2023 20:58:23 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91DC330B15 for ; Mon, 6 Mar 2023 17:58:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0080160F52 for ; Tue, 7 Mar 2023 01:58:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 277FCC433EF; Tue, 7 Mar 2023 01:58:20 +0000 (UTC) Date: Mon, 6 Mar 2023 20:58:18 -0500 From: Steven Rostedt To: Hillf Danton Cc: John Stultz , LKML , Wei Wang , Midas Chien , "Chunhui Li (=?UTF-8?B?5p2O5pil6L6J?=)" , Kees Cook , Anton Vorontsov , "Guilherme G. Piccoli" , Tony Luck , linux-mm@kvack.org Subject: Re: [PATCH v2] pstore: Revert pmsg_lock back to a normal mutex Message-ID: <20230306205818.5a2bc51a@gandalf.local.home> In-Reply-To: <20230307003106.1768-1-hdanton@sina.com> References: <20230302062741.483079-1-jstultz@google.com> <20230304031029.3037914-1-jstultz@google.com> <20230306010323.2909-1-hdanton@sina.com> <20230307003106.1768-1-hdanton@sina.com> X-Mailer: Claws Mail 3.17.8 (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 Tue, 7 Mar 2023 08:31:06 +0800 Hillf Danton wrote: > On Mon, 6 Mar 2023 10:28:44 -0500 Steven Rostedt > > On Mon, 6 Mar 2023 09:03:23 +0800 Hillf Danton wrote: > > > > > > PS what sense made by spinning on owner until need_resched() with preempt > > > disabled in the non-rt context? > > > > Not sure what the question you have here is? If need_resched() is set, we > > want to schedule out. > > Given the critical section under mutex could be preempted, what is hard to > understand is the wakeup of a ten-minute sleeper could not preempt a nice-10 > mutex spinner for instance. But it can. Most wakeups are done by interrupts or softirqs. Both of which will happen even if a task is running with preemption disabled. -- Steve