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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1B2FC43441 for ; Mon, 12 Nov 2018 02:01:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BCF7E208A3 for ; Mon, 12 Nov 2018 02:01:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCF7E208A3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730190AbeKLLv6 convert rfc822-to-8bit (ORCPT ); Mon, 12 Nov 2018 06:51:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:41534 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729903AbeKLLv6 (ORCPT ); Mon, 12 Nov 2018 06:51:58 -0500 Received: from vmware.local.home (unknown [64.114.255.114]) (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 61FF32087F; Mon, 12 Nov 2018 02:01:06 +0000 (UTC) Date: Sun, 11 Nov 2018 21:01:05 -0500 From: Steven Rostedt To: Oleksandr Natalenko Cc: "David S. Miller" , Sebastian Andrzej Siewior , Thomas Gleixner , Eric Dumazet , Dave Jones , netdev@vger.kernel.org, linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: WARN_ON() in netconsole with PREEMPT_RT Message-ID: <20181111210105.7f376c35@vmware.local.home> In-Reply-To: References: X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 11 Nov 2018 21:16:00 +0100 Oleksandr Natalenko wrote: > > This is a v4.19.1-rt3-based kernel. > > > > The WARN_ON() is: > > > > 362 void netpoll_send_udp(struct netpoll *np, const char *msg, int len) > > 363 { > > … > > 372 WARN_ON_ONCE(!irqs_disabled()); > > … > > > > If that matters, I have "threadirqs" passed to the kernel. > > > > Netconsole seems to work even after this warning. Is this OK/expected? > > > > Thanks. > > Oh, I see that write_msg() calls netpoll_send_udp() under > spin_lock_irqsave(), but in PREEMPT_RT this, AFAIK, does not disable > interrupts. > > So, the real question here is whether the interrupts should be indeed > disabled. And if so, -rt should replace spin_lock_irqsave() call there > with what? local_irq_save()? and get rid of the warning? > Why do we care if interrupts are disabled with PREEMPT_RT here? printk() itself has a lot of issues with PREEMPT_RT that we are working on dealing with. Right now netconsole is actually at the end of that todo list. -- Steve