Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3816007pxb; Mon, 1 Feb 2021 05:36:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEbOuS4eHwOwB2JJDnbgsJauNbzZHR+tTV7C+ENMU2RsgEsY9CcpNZtl5eXAOF89NoBuHn X-Received: by 2002:aa7:c418:: with SMTP id j24mr6053891edq.293.1612186601308; Mon, 01 Feb 2021 05:36:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612186601; cv=none; d=google.com; s=arc-20160816; b=O4Xnddj20ZNcBcb1+sw0rMqOhWQ3I3l4w1buk/ZkeyCAZ9bGX+MhYFpn4imqFFZHJO 2+d7kHOKfw4lFwM2IlAH7FPL6M1ayii64wxEORTgjQRgXA1h71ounIbZghBAyrWExAgg xVZ2pMsqdAd66i7Nq2pY+6a7JTjm/nimlhtkBvQjnuA6XpJSiuv8GkbWfINXufOgli9K LUyBq6Uv1lc02rFRfiaU+gbzZSzmNQOin8ItvE+85EQSAkeatCOOzAE3MnZAzMRhZwCq juHR+Zmj6jsIjHq9ygM1B2mHO2K1B/TCC33z3lDOeqDXxXlnhSSB2RK23WDbSFGI0YMa WJVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=r82uxta4XDi55BkAqxOkhqSJhZBf6cvt5RLzHkBDbNg=; b=eYcViy2lgbPv68WhWZE2YrXYuqEWOrtHoTtcQRgqm96ON9i6FsYq3Qe96Np70Z05jZ VreHyK7PVv3vZRqFGQDZEr9u/gjkBRpJiq6U8RYMT4cTdl5rQG+Spl/glHU28AG4DWsU tusexlu5gEgiuGILE1reWkrsl7mpiEHNWj9TCd4buxqpeI/MwlNGyrXrrCt5IJO7EZOw zSQ8r3xZhqN7mXuWbHcVzPM+N9+A3Y62ypQdyN98qcT3it40iEttU/tNuJpZ/5581V1L KrZcaDKEMSzzUF0fA9fEWoN6fCC2BXtT4v7FVw14ZCkwjHFtcle8JVUa3fLMFSChgXfr W+7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=L3Hwt1ob; dkim=neutral (no key) header.i=@linutronix.de; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pj26si9915567ejb.261.2021.02.01.05.36.17; Mon, 01 Feb 2021 05:36:41 -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=@linutronix.de header.s=2020 header.b=L3Hwt1ob; dkim=neutral (no key) header.i=@linutronix.de; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231493AbhBANdd (ORCPT + 99 others); Mon, 1 Feb 2021 08:33:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229872AbhBANdZ (ORCPT ); Mon, 1 Feb 2021 08:33:25 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1267EC06174A for ; Mon, 1 Feb 2021 05:32:44 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1612186363; h=from:from:reply-to:subject:subject: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=r82uxta4XDi55BkAqxOkhqSJhZBf6cvt5RLzHkBDbNg=; b=L3Hwt1obaxZ2YsvL6Iv2YkOKkaIdBeoc/wumawwA0H7jWvoZmY7to222JOU+IPafapdyd7 HxXyFglPecAXPjl0Tef2zulm5q0PBfFTPD97pzqRrXRdcqLBUNvAUTyX3wKkJEbUBHm08t 6wbd/WKZe6S1OYJoELWe5TvBAoIwodLl5xZlQ0RsZkKPEUGci7KlXweD1XRHdVdwQ3OgLW pGNIOCsnUKDujFEurKfFs+b9W4/uUzyYMjqHqXGkGRpsrGQkdvaEmXPWK8QrXmy6cL/Ja4 UoEc0K6wnDhplLduuMUTjex0EaWLsnsx4cD2wDtqzlRjTLK/aFgEAddSTtYX/w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1612186363; h=from:from:reply-to:subject:subject: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=r82uxta4XDi55BkAqxOkhqSJhZBf6cvt5RLzHkBDbNg=; b=VP85MJaV5fcPyRmMx/JdQFus53ncdvLjCLdUCkYZWj0AYdlj90RiDLsj4NiSmnZRsSqFbe tEWp06yJWZ5d2RBQ== To: Petr Mladek 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 In-Reply-To: References: <20210126211551.26536-1-john.ogness@linutronix.de> <20210126211551.26536-9-john.ogness@linutronix.de> Date: Mon, 01 Feb 2021 14:38:42 +0106 Message-ID: <87eehzkj5x.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-02-01, Petr Mladek 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. Yes, I assumed so and adjusted my preparation-v2 series accordingly. John