From patchwork Fri Jun 9 01:11:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luis Claudio R. Goncalves" X-Patchwork-Id: 691057 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 58461C7EE25 for ; Fri, 9 Jun 2023 01:12:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237376AbjFIBMC (ORCPT ); Thu, 8 Jun 2023 21:12:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237308AbjFIBMA (ORCPT ); Thu, 8 Jun 2023 21:12:00 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1B7D271D for ; Thu, 8 Jun 2023 18:11:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686273073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oAPrzE0wKW/BWdQ1bdJelqKYq/KbYmGOiNXVRllbmt0=; b=KUpS0qqK8wSlUDrkpv4e40ficBsSZGylA8CnivgiLHLGs1SrmO9GXP52KSlzM30inZu2Xo 6S3fqDBfIYHU2XXN7fUvc0EO5TPBctAuh1WCuJyRUZITOdpexRF0EQZtSExmGarpVnpn0k uzrzoLJLebnQC9/WsrHbEHXoV2/gEvU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-223--L8cKAO1MGiPLAHUqYs1aw-1; Thu, 08 Jun 2023 21:11:08 -0400 X-MC-Unique: -L8cKAO1MGiPLAHUqYs1aw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D38D803DBE; Fri, 9 Jun 2023 01:11:07 +0000 (UTC) Received: from localhost (unknown [10.22.32.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 152341121315; Fri, 9 Jun 2023 01:11:06 +0000 (UTC) From: "Luis Claudio R. Goncalves" To: linux-rt-users , stable-rt , Steven Rostedt , Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , Daniel Wagner , Tom Zanussi , Clark Williams , Mark Gross , Jeff Brady , Luis Goncalves Subject: [PATCH RT 1/3] Revert "printk: declare printk_deferred_{enter, safe}() in include/linux/printk.h" Date: Thu, 8 Jun 2023 22:11:02 -0300 Message-Id: <20230609011104.967128-2-lgoncalv@redhat.com> In-Reply-To: <20230609011104.967128-1-lgoncalv@redhat.com> References: <20230609011104.967128-1-lgoncalv@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org v5.10.180-rt89-rc1 stable review patch. If anyone has any objections, please let me know. ----------- This reverts commit 32232bcd4e5300e678718d5c29da4dfa07ade01e. The support for deferred printing was removed in v5.10-rc1-rt1 by commit 9153e3c5cb0c9 ("printk: remove deferred printing") because: Since printing occurs either atomically or from the printing kthread, there is no need for any deferring or tracking possible recursion paths. Remove all printk context tracking. Fixes: 32232bcd4e530 ("printk: declare printk_deferred_{enter,safe}() in include/linux/printk.h") Fixes: 083183f8bea0f ("rt: printk: remove new references to deferred printing") Signed-off-by: Luis Claudio R. Goncalves --- include/linux/printk.h | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/include/linux/printk.h b/include/linux/printk.h index 92e0656841128..7e4352467d831 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -609,23 +609,4 @@ static inline void print_hex_dump_debug(const char *prefix_str, int prefix_type, #define print_hex_dump_bytes(prefix_str, prefix_type, buf, len) \ print_hex_dump_debug(prefix_str, prefix_type, 16, 1, buf, len, true) -#if defined(CONFIG_PRINTK) && !defined(CONFIG_PREEMPT_RT) -extern void __printk_safe_enter(void); -extern void __printk_safe_exit(void); -/* - * The printk_deferred_enter/exit macros are available only as a hack for - * some code paths that need to defer all printk console printing. Interrupts - * must be disabled for the deferred duration. - */ -#define printk_deferred_enter __printk_safe_enter -#define printk_deferred_exit __printk_safe_exit -#else /* defined(CONFIG_PRINTK) && !defined(CONFIG_PREEMPT_RT) */ -static inline void printk_deferred_enter(void) -{ -} -static inline void printk_deferred_exit(void) -{ -} -#endif - #endif From patchwork Fri Jun 9 01:11:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luis Claudio R. Goncalves" X-Patchwork-Id: 691899 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 BC826C7EE29 for ; Fri, 9 Jun 2023 01:12:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229986AbjFIBME (ORCPT ); Thu, 8 Jun 2023 21:12:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237276AbjFIBMD (ORCPT ); Thu, 8 Jun 2023 21:12:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE7A1E47 for ; Thu, 8 Jun 2023 18:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686273075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bKgOLKDTsYWvdqsp1XsUosocX8QvfGur3sjYjMRA4Fk=; b=U8ZwHPAY88aFISsIirI3VF5v5Cge2wmsEAU8W4O89yeWEH0YcZmx3LEMlngkxe0kBIPahd UKpwr1tIdT5ZEETK5miC7lkVYODQzjm3Mipij24/3/5IQsznJlB2emHIVfXVEpLLNaDsxY ZM7Qajg42tCtE1jxr9mll6lp7DfrLxw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-489-8dVApdFIOWSeDR8Ya2cpxg-1; Thu, 08 Jun 2023 21:11:09 -0400 X-MC-Unique: 8dVApdFIOWSeDR8Ya2cpxg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7AC953C0C88F; Fri, 9 Jun 2023 01:11:08 +0000 (UTC) Received: from localhost (unknown [10.22.32.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 321C1140E955; Fri, 9 Jun 2023 01:11:08 +0000 (UTC) From: "Luis Claudio R. Goncalves" To: linux-rt-users , stable-rt , Steven Rostedt , Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , Daniel Wagner , Tom Zanussi , Clark Williams , Mark Gross , Jeff Brady , Luis Goncalves Subject: [PATCH RT 2/3] Revert "mm/page_alloc: fix potential deadlock on zonelist_update_seqseqlock" Date: Thu, 8 Jun 2023 22:11:03 -0300 Message-Id: <20230609011104.967128-3-lgoncalv@redhat.com> In-Reply-To: <20230609011104.967128-1-lgoncalv@redhat.com> References: <20230609011104.967128-1-lgoncalv@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org v5.10.180-rt89-rc1 stable review patch. If anyone has any objections, please let me know. ----------- This reverts commit a992c387b41186ab968fd176ca26b432b05c53ec. The support for deferred printing was removed in v5.10-rc1-rt1 by commit 9153e3c5cb0c9 ("printk: remove deferred printing") because: Since printing occurs either atomically or from the printing kthread, there is no need for any deferring or tracking possible recursion paths. Remove all printk context tracking. Also, disabling interrupts in __build_all_zonelists() should produce warnings once that code path is hit. Fixes: a992c387b4118 ("mm/page_alloc: fix potential deadlock on zonelist_update_seq seqlock") Fixes: 083183f8bea0f ("rt: printk: remove new references to deferred printing") Signed-off-by: Luis Claudio R. Goncalves --- mm/page_alloc.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7e65e3ef16e3a..3760a06932a6e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -6043,20 +6043,7 @@ static void __build_all_zonelists(void *data) int nid; int __maybe_unused cpu; pg_data_t *self = data; - unsigned long flags; - /* - * Explicitly disable this CPU's interrupts before taking seqlock - * to prevent any IRQ handler from calling into the page allocator - * (e.g. GFP_ATOMIC) that could hit zonelist_iter_begin and livelock. - */ - local_irq_save(flags); - /* - * Explicitly disable this CPU's synchronous printk() before taking - * seqlock to prevent any printk() from trying to hold port->lock, for - * tty_insert_flip_string_and_push_buffer() on other CPU might be - * calling kmalloc(GFP_ATOMIC | __GFP_NOWARN) with port->lock held. - */ write_seqlock(&zonelist_update_seq); #ifdef CONFIG_NUMA @@ -6091,7 +6078,6 @@ static void __build_all_zonelists(void *data) } write_sequnlock(&zonelist_update_seq); - local_irq_restore(flags); } static noinline void __init From patchwork Fri Jun 9 01:11:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luis Claudio R. Goncalves" X-Patchwork-Id: 691056 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 4AEE4C83003 for ; Fri, 9 Jun 2023 01:12:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235413AbjFIBMF (ORCPT ); Thu, 8 Jun 2023 21:12:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237307AbjFIBMD (ORCPT ); Thu, 8 Jun 2023 21:12:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39FA71B9 for ; Thu, 8 Jun 2023 18:11:15 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-513-H0rTBmLaMEGFSZDmjxQi5g-1; Thu, 08 Jun 2023 21:11:10 -0400 X-MC-Unique: H0rTBmLaMEGFSZDmjxQi5g-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9C8912801589; Fri, 9 Jun 2023 01:11:09 +0000 (UTC) Received: from localhost (unknown [10.22.32.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 540F51121314; Fri, 9 Jun 2023 01:11:09 +0000 (UTC) From: "Luis Claudio R. Goncalves" To: linux-rt-users , stable-rt , Steven Rostedt , Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , Daniel Wagner , Tom Zanussi , Clark Williams , Mark Gross , Jeff Brady , Luis Goncalves Subject: [PATCH RT 3/3] Linux 5.10.180-rt89-rc1 Date: Thu, 8 Jun 2023 22:11:04 -0300 Message-Id: <20230609011104.967128-4-lgoncalv@redhat.com> In-Reply-To: <20230609011104.967128-1-lgoncalv@redhat.com> References: <20230609011104.967128-1-lgoncalv@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org v5.10.180-rt89-rc1 stable review patch. If anyone has any objections, please let me know. ----------- Signed-off-by: Luis Claudio R. Goncalves --- localversion-rt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localversion-rt b/localversion-rt index 666227d921a3d..d1173dc87024f 100644 --- a/localversion-rt +++ b/localversion-rt @@ -1 +1 @@ --rt88 +-rt89-rc1