Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3806056pxb; Mon, 1 Feb 2021 05:21:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3h16/u8rf0YQ+5X4nEpix0gCzTLCM1bxtlkQIUSBln2xoKQ3Haw9gIbMYUIBKO623YhOl X-Received: by 2002:a17:906:80d1:: with SMTP id a17mr11442339ejx.93.1612185707790; Mon, 01 Feb 2021 05:21:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612185707; cv=none; d=google.com; s=arc-20160816; b=v0236vP9nOanHnS4ruVrB0Ake1nLOJ83XcUJrARZEh3wKXuyYqoWagsQHLnTjYT5Zu dGdHiGknTCNwgVfU8PpnBAHBiMpnGTLd/J+PGSZ9zAbRyAYTeM3zCHniyns4VSHqx1eG eBuuC97ZRPeKzBKDYJcQIEvU31ZfOwYL0Tdl8b4U5oZqVchMn3GLqG/y4fcmULHAA3Fl 51mJW/qdJrJa2uLVSezM00KN1wur1Ne/KsxvQsSAb4yqw2eswaC04h9i36VQ3FVMzH16 zDwuHJcNyeab1CZl6jJTpvSSFKgWXW4Q++cA9YNc+5EhXSsLY5FdNvbhQkdtdJEj7mNl BKVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5lqS3u+NhmZnlbr2J2yI9qILI3OSg7IBw22MBGIPeSs=; b=KZqHrxnv50laiVXZ/sEj8+nrlAEeG5VhRFyOaGJ470WBrHjt2ihEKdhdrT7BBSyvfy nxc1JX6faVgc9raL28ze2wh/nSZBCiFctw+7W3oSZQQzn2AbLWgSNZLUdgn8TB0cvfRE eNceNOEZIPxw5586Hv76f4Q/wrvyCZww1OUaxjgbTHB/BlFEbJgGgoGlvk6e1EH0yUAw 4mIl3awmSVav552FtZppaRmuRl6WdevMQnasczo+Ugpma5lj7h/Aai6UG4ghr7aMqcAt xTQhV1KRz1ALicZc2WHJmrwjMuqqLZnHW+VlxZLFv6vnMeyv8l2lKRzu4p4mCmkotZ6S +yQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=BfrKchf8; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s10si9715468ejr.714.2021.02.01.05.21.20; Mon, 01 Feb 2021 05:21:47 -0800 (PST) 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; dkim=pass header.i=@suse.com header.s=susede1 header.b=BfrKchf8; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232042AbhBANTf (ORCPT + 99 others); Mon, 1 Feb 2021 08:19:35 -0500 Received: from mx2.suse.de ([195.135.220.15]:45394 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231875AbhBANSF (ORCPT ); Mon, 1 Feb 2021 08:18:05 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1612185438; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5lqS3u+NhmZnlbr2J2yI9qILI3OSg7IBw22MBGIPeSs=; b=BfrKchf81WLzvoeZVSbFZNoqSgmkDG24zj5z5dv3v82jlRVYWUCsT3CmSCF0qhLM/dloXx WkqDZbXEheO99V6KOVKwcbEeGG+WJOmHgkOcblnIOSm1+NoU4rgmA7QwqdrQry/N+c+yj7 i+KvEcAcEJDEUzgZ6fpqQVcVC/J+vWo= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 13216AB92; Mon, 1 Feb 2021 13:17:18 +0000 (UTC) Date: Mon, 1 Feb 2021 14:17:17 +0100 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH printk-rework 08/12] printk: introduce a kmsg_dump iterator Message-ID: References: <20210126211551.26536-1-john.ogness@linutronix.de> <20210126211551.26536-9-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210126211551.26536-9-john.ogness@linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2021-01-26 22:21:47, John Ogness wrote: > Rather than store the iterator information into the registered > kmsg_dump structure, create a separate iterator structure. The > kmsg_dump_iter structure can reside on the stack of the caller, > thus allowing lockless use of the kmsg_dump functions. > > This is in preparation for removal of @logbuf_lock. > diff --git a/include/linux/kmsg_dump.h b/include/linux/kmsg_dump.h > index 76cc4122d08e..ecc98f549d93 100644 > --- a/include/linux/kmsg_dump.h > +++ b/include/linux/kmsg_dump.h > @@ -29,6 +29,18 @@ enum kmsg_dump_reason { > KMSG_DUMP_MAX > }; > > +/** > + * struct kmsg_dumper_iter - iterator for kernel crash message dumper > + * @active: Flag that specifies if this is currently dumping > + * @cur_seq: The record to dump (private) > + * @next_seq: The first record of the next block (private) Just to be sure. This description should get update if you agree with the alternative one in the 1st patch. > + */ > +struct kmsg_dumper_iter { > + bool active; > + u64 cur_seq; > + u64 next_seq; > +}; > + Otherwise, I like this change. Best Regards, Petr