Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3667937imc; Thu, 14 Mar 2019 02:28:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeqHJsTqBFWiC/8v3UAdXRlUkgSGclQxzvBmjdino0D78WmHB9eF7R5A9c+vmT6H/Ezxeu X-Received: by 2002:a62:1611:: with SMTP id 17mr2223689pfw.139.1552555702353; Thu, 14 Mar 2019 02:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552555702; cv=none; d=google.com; s=arc-20160816; b=n8rvwH0qqooZH4b2fVqVBd/R02C9wl97qIL6Mh33gHW9KrD0Nx9v3BBlGcbZnCjrQY 46sDWK25DsvAsIQO/TTldgZotLyNfbN4GwNGJ1eCyqLpkorJGDfyYPYkFEfTTP/YHvKn TOKHzxR1yNRVvsvUJ2QsPlxT9v9pVVFP4hWLGnONClXaKBYS+oNUAuAEF5iKJqD9hjXJ llnuNvIHXEjb7gB7QzEi+stJBDYqcMxPqvqMEPAyhxuz2WDwJdIGB1J0WomPIbk4Zgb4 E1eh6TSz42sUna2lIdpvl1GUm3cTSpUQGckYv8ZL+OF7VOdiGfsNkYJn1x16uuNir9h+ dUSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=au/bCX7C146v9KjC7nVubv6LEqphxrAkrXqLi7ut+0g=; b=ZsyerIODnJ5C6GxywkZMLZUGpp6at5tASg1DU8825Kc4vb77Yim0B5At/4jcI1TyKd KmTfSUoLUaL9+7ei4YQskfxU3W9VYxSEZPRU2lugvePoEt1+nQI+hTolZPRk+nIvofj0 A+ZcRKcHafpsBvxpKQfnVRDa3/KqqsWFrPeD57QJyASOo0eFaOtbgIQo4yNL0nTzy3/w kipVmzWzW8lQuOYOTdETVztckKUxhpyP6GbJLuCvsivuO+ldVxIscH0h3N9t+Hu99UV5 t8yHofzvGPSF0nw6kc0V7ALt+Y7bpm/FRmIqib75T1HkG1o0vq8LxTCU5l2dkXANjGdv ifcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si12098333pgm.426.2019.03.14.02.28.06; Thu, 14 Mar 2019 02:28:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726828AbfCNJ1a (ORCPT + 99 others); Thu, 14 Mar 2019 05:27:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:59420 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726689AbfCNJ13 (ORCPT ); Thu, 14 Mar 2019 05:27:29 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7DA27AF61; Thu, 14 Mar 2019 09:27:28 +0000 (UTC) Date: Thu, 14 Mar 2019 10:27:27 +0100 From: Petr Mladek To: Sergey Senozhatsky Cc: Sebastian Siewior , John Ogness , linux-kernel@vger.kernel.org, Peter Zijlstra , Steven Rostedt , Daniel Wang , Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , Alan Cox , Jiri Slaby , Peter Feiner , linux-serial@vger.kernel.org, Sergey Senozhatsky Subject: Re: [RFC PATCH v1 00/25] printk: new implementation Message-ID: <20190314092727.m37frq3jszz6mh4g@pathway.suse.cz> References: <874l9721hf.fsf@linutronix.de> <20190304052335.GA6648@jagdpanzerIV> <87lg1rggcz.fsf@linutronix.de> <20190311105411.GA368@jagdpanzerIV> <20190312123857.juatd6fwtfmqajze@pathway.suse.cz> <874l8815uc.fsf@linutronix.de> <20190313021534.GB783@jagdpanzerIV> <87d0mv9off.fsf@linutronix.de> <20190313084028.f2m4qhxd5sjzzawr@linutronix.de> <20190313092759.GA10060@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190313092759.GA10060@jagdpanzerIV> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2019-03-13 18:27:59, Sergey Senozhatsky wrote: > On (03/13/19 09:40), Sebastian Siewior wrote: > > On 2019-03-13 09:19:32 [+0100], John Ogness wrote: > > > recursive situation. As you are pointing out, the notification/wake > > > component of printk_safe will still be needed. I will leave that (small) > > > part in printk_safe.c. > > > > Does this mean we keep irq_work part or we bury it and solve it by other > > means? > > *May be* we can take a closer look and find cases when ->atomic > consoles don't really depend on console_sem. And *may be* we can > split the console drivers list and somehow forbid removal and > modification (ioctl) of ->atomic consoles under us. Assuming that > this is doable we then can start iterating ->atomic consoles list > with unlocked console_sem. I believe that this is actually the plan. Atomic consoles depending on console_sem would not be a real step forward. > Non->atomic consoles or consoles which depend on console_sem (VT, > fbcon and so on) will stay in another list, and we will take > console_sem before we iterate that list and invoke those drivers. This might be also needed for "less" important messages that people would not want to get to the console atomically because it would serialize CPUs and slow down the entire system. I think that we would still need irq_work for this mode. But it should be necessary only for messages from NMI context and printk() recursion. It means that it should be a rare situation and the amount of messages should get limited. It should not be much worse than handling few printk() calls from any irq handler. Best Regards, Petr