Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp148847ybr; Fri, 22 May 2020 03:17:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNM+PjLJG6AplkzK6vck+Q0aQG4zD7f/RkXl3w6U7lQ4oydtaXSBGHBO9PT+PUCceo6q46 X-Received: by 2002:a17:906:a8d:: with SMTP id y13mr7125149ejf.455.1590142673183; Fri, 22 May 2020 03:17:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590142673; cv=none; d=google.com; s=arc-20160816; b=DEes3mTYAuifgrENSERz3c7NqbXWavcSI0ItLO6LJ4Geh2sIHxKFN9nPWmp7825xEy QuBwvsyNjTChyFB/uKMvy1/M5nION/yQKHfSwrne9aw7aA85fdzo1/laIzC31NZMIq7U e6z7CnB1gPN5hFHCUVwqbWLNnHM2EIpUo3QOlQB+n2pjBR2fhitYW/mQg0E5Tb232hDN tK61ATe0/sy03mJAgnO9rr4tNiKJhxfX7eEgeqQhn+q/WPGK+h8VJ0fgD4rhj9RhGgyy OJhHUka/WtLeeyEMWgxhIJj+evUIFmarw/UghtjflgVATlOCzOwlgcesHtG5xjAd6W2b aIIg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=NmRgYtkZAmWnEcdlboN4wzvwS5QkbB4xi/2ocVCgPy4=; b=CYbR9vS93xbC7mgnZBI+Ad28IBCELdluMb4wKrlUQAuzjp58S/O2yx8jvAy0YeruN5 Q1Zb0mTY3dF3D1qKq+hKJNsKZQAEhgFvCte2qwy3rzfLdZ7YpI7GD8M83DMDEqarWYzf uC1NFdM5beWv29aDXPWXK6OrUVwas+MyNvEKpTVw81EvsuwiyoZhz5LpoxLbnRJEzWU/ 8IFH0VA8U3I1/EMaUndS6bs5ePXk+79FSuhah0G0ygBQmd5UT0tCNI1J4BF040M2W1EM wQS9KPWyLbnkiRBBGEXSbbNYPLjs8w+67cNxOwYT6mXAfP7gW4p/ykxWIj/vq7YXEwf1 r+cA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lu16si4841007ejb.600.2020.05.22.03.17.30; Fri, 22 May 2020 03:17:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729952AbgEVKPO (ORCPT + 99 others); Fri, 22 May 2020 06:15:14 -0400 Received: from mx2.suse.de ([195.135.220.15]:45462 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729908AbgEVKPK (ORCPT ); Fri, 22 May 2020 06:15:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6AA25AC52; Fri, 22 May 2020 10:15:11 +0000 (UTC) Date: Fri, 22 May 2020 12:15:07 +0200 From: Petr Mladek To: root Cc: sergey.senozhatsky@gmail.com, rostedt@goodmis.org, linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn, jiang.xuexin@zte.com.cn, =?utf-8?B?5rGq5YuHMTAyNjk1NjY=?= , John Ogness Subject: Re: [PATCH] [PATCH]Fixed: line break of pr_cont not take effect in linux-rt Message-ID: <20200522101507.GI3464@linux-b0ei> References: <1590025064-14433-1-git-send-email-wang.yi59@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1590025064-14433-1-git-send-email-wang.yi59@zte.com.cn> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2020-05-21 09:37:44, root wrote: > From: 汪勇10269566 > > Line break of pr_cont not take effect. > Use several pr_cont to print continuous paragraph, it is expected to > have line break when line ends up with '\n', however the paragraph > does not have line break > -printk_kthread_func will not print info before log_store insert msg > into printk_rb, and pr_cont calls cont_add to keep data in buffer. > cont_add only when the following conditions are met insert msg to > printk_rb > 1.cpu != c->cpu_owner || !(flags & LOG_CONT) > 2.c->len + len > sizeof(c->buf) > > Signed-off-by: 汪勇10269566 > --- > kernel/printk/printk.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index 0605a74..d898f50 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -1871,6 +1871,7 @@ static void cont_add(int ctx, int cpu, u32 caller_id, int facility, int level, > // but later continuations can add a newline. > if (flags & LOG_NEWLINE) { > c->flags |= LOG_NEWLINE; > + cont_flush(ctx); What kernel sources is this patch against, please? The console_flush() call is in the current Linus' tree. It does not have any parameter there. And there is no printk_kthread_func. Is this against RT patchset? Best Regards, Petr