Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp544772imm; Thu, 31 May 2018 05:22:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJM8Jzlr7Ua6gzeGxQjQVEHtMLH4JSll3ArrsdM6p8Eh7P4NLY8MZv4+SMJrIDBGX2/ff3N X-Received: by 2002:a65:5807:: with SMTP id g7-v6mr5311464pgr.409.1527769327997; Thu, 31 May 2018 05:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527769327; cv=none; d=google.com; s=arc-20160816; b=xGx6y/qgrKL3ckjCo4afiUVHjtx1rrZ8RQJ+9Pu0Yk7xPGxXJqShpicjVjX5MkItGU NijOAXaxpdbpS5bjJlf8/07VR59uQWAuSDccU0pAO0mINiymbaVZYMfTAAgTKajtna5L SWWpaqmUlJnjHHsqf+iREDi2n2IRmqSSJVv9sQAHgfDvpqyotvyfIPcOKP7N5mfAUrJs CpGwSPFOvamMggVU63Smg2D5zmA+KBdFjVZ1kqS/FuDy70jCkm6Swein64xOirtBTgWC AsAGnLXhJphUrc3bCcKwcbLWf0sSlch1rRHVhyrT0gi2j5uwL/LfxQl4csABqoFy4YaA tm9g== 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:arc-authentication-results; bh=skBH7EcX+EW8qU68vgvg4t+akI1weY7fX7L3vMiTjco=; b=AerOGFhbOKZ7+31aGbNCIHYbUoSo0XdAEFSPl+LqersWXWfR5A0BDqhVUsfVfAJLHb pB0WS+qPgiEsHNBCbRgZcMocDyA284gGu42Mg9IVgXpvtmZghmxfWsw+bdcyPLjo+uq+ zpJlKiMLw/ckX48g6dXDrry3H+gniISSJduzAvIvbgcGyvC9i3HzAQ+iwWzmZvwERO4G j1Rzqi7JV97ZlHc+ai1S3mTwaEi2+ghQUMRCyMuJhhgUZ0oipjFwg9vZ23e9hQEhyz/n lPZivygfZcnch9dNRR19dfmYpewY63EsqeTup5yCx2y4VBu8mfthjIRzjepL5YZK5nbd hISw== 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 g2-v6si19972820pgu.48.2018.05.31.05.21.53; Thu, 31 May 2018 05:22:07 -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 S1754865AbeEaMVP (ORCPT + 99 others); Thu, 31 May 2018 08:21:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:46885 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754197AbeEaMVO (ORCPT ); Thu, 31 May 2018 08:21:14 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 061CDAEAD; Thu, 31 May 2018 12:21:13 +0000 (UTC) Date: Thu, 31 May 2018 14:21:12 +0200 From: Petr Mladek To: Sergey Senozhatsky Cc: Maninder Singh , sergey.senozhatsky@gmail.com, rostedt@goodmis.org, linux-kernel@vger.kernel.org, a.sahrawat@samsung.com, pankaj.m@samsung.com, v.narang@samsung.com Subject: Re: [PATCH 2/2] printk: make sure to print log on console. Message-ID: <20180531122112.bfeqtmwpl2qc67a5@pathway.suse.cz> References: <20180531102246epcas5p2f1cbc6ff217172e12e2f78bb88eb4a7e~zs5h59tMh2250222502epcas5p2S@epcas5p2.samsung.com> <20180531105215.GF477@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180531105215.GF477@jagdpanzerIV> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2018-05-31 19:52:15, Sergey Senozhatsky wrote: > On (05/31/18 15:49), Maninder Singh wrote: > > > > This patch make sure printing of log if loglevel at time of storing > > log is greater than current console loglevel. > > > > @why > > In case of async printk, printk thread can miss logs because it checks > > current log level at time of console_unlock. > > Upstream printk has no printing kthread. And we also run > printk()->console_unlock() with disabled preemption. Yes, the comment was wrong but the problem is real. The console handling is asynchronous even without the kthread. The current console_lock owner is responsible for handling messages also from other CPUs. Best Regards, Petr