Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1546898ybt; Thu, 25 Jun 2020 08:29:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw88OLvqLhH4vFNHe5cy5u7rzV7iwhp6qGGnVOpvlJHu3G6ngHsHFbncVrLQlrfrWLUWE/O X-Received: by 2002:a05:6402:ca3:: with SMTP id cn3mr17795014edb.64.1593098968599; Thu, 25 Jun 2020 08:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593098968; cv=none; d=google.com; s=arc-20160816; b=R5lPy7YgCZhQSc9vlDVy8V65InUq1pOiR5QxmDtjjAQv4DWIIX2NvbtdrYOlIIaZkW STiIsswLZQlh26LNJ3coEv9f4BG0tSLgKtHxYHpoB14aV6rBHJeVVfPVM6lsvN0a/NVj bSZ6dIGCCrAYJERCtFKVsXixgBNCq1hn5v/R1fAcNwPd/DFK8F1bc2mauxYPRJRLzYfK ap4E2kXBe4k8Awpv88DwR08+zHSQ6vfEsk0K2Lj+PGvoK0bsso58egSUu24rV//TgIwb XPvlCfM7p6NFe/Q3YNu7R4F2/+GnHbZFxGGmYiO6sqbrJNEbf4R6jXxNOkovCGZ1V+u/ BquA== 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=iMlLXvrYOqOr9wXF7GQWdpx18ZmNuLOMOYm8+7fo+Jc=; b=xDbahJp77oVWZCCV0QFFrpmMp+HG8GfW6/HdQ6PFVSx0wpuvoAVB/1v8urL0v35mmE uVGGwnWs+kvtVJMYICBuFNpFYxfX4H9cyqJkCeDEumrug9xILRIVDNgHt8iVZIWWpBLS wmFwMxgkRdKt53dNqYKzQHZNEbHyvEr3Jm4gtu4HwaQoA8tBvyd28amaXefT/dVd+Vxu UqVcys27Emk4ubtZv60/2C2pNZInIcFMD2t/OxvXnaMEu2xk04jDO/UvtnAlbxHGnMZ+ 5bhxsGnAm4QRPP6lS1a2EJs1nVo22bJGuQy1hegWicM/80oiK1OWsKBGZ5yg1v+GRVc0 cHnA== 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 n5si14272832edo.215.2020.06.25.08.29.04; Thu, 25 Jun 2020 08:29:28 -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 S2405802AbgFYPZZ (ORCPT + 99 others); Thu, 25 Jun 2020 11:25:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:42772 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404580AbgFYPZY (ORCPT ); Thu, 25 Jun 2020 11:25:24 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 98981AC9F; Thu, 25 Jun 2020 15:25:23 +0000 (UTC) Date: Thu, 25 Jun 2020 17:25:23 +0200 From: Petr Mladek To: John Ogness Cc: Peter Zijlstra , Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Andrea Parri , Thomas Gleixner , Paul McKenney , kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: record_printk_text tricks: was: [PATCH v3 3/3] printk: use the lockless ringbuffer Message-ID: <20200625152523.GJ8444@alley> References: <20200618144919.9806-1-john.ogness@linutronix.de> <20200618144919.9806-4-john.ogness@linutronix.de> <20200625120946.GG6156@alley> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200625120946.GG6156@alley> 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-06-25 14:09:46, Petr Mladek wrote: > On Thu 2020-06-18 16:55:19, John Ogness wrote: > > Replace the existing ringbuffer usage and implementation with > > lockless ringbuffer usage. Even though the new ringbuffer does not > > require locking, all existing locking is left in place. Therefore, > > this change is purely replacing the underlining ringbuffer. > > > --- a/kernel/printk/printk.c > > +++ b/kernel/printk/printk.c > > +static size_t record_print_text(struct printk_record *r, bool syslog, > > + bool time) [...] > > +static size_t get_record_text_size(struct printk_info *info, > > + unsigned int line_count, > > + bool syslog, bool time) > > +{ Nit: This should get called get_record_print_text_size(). It will make it more clear that it counts the prefixes added for printing. Best Regards, Petr PS: I have finished review of this 3rd patch. I am going to look at the 2nd patch the following week if I find the courage ;-)