LKML Archive on
 help / color / Atom feed
From: Sergey Senozhatsky <>
To: Petr Mladek <>
Cc: Andrew Morton <>,
	"Ahmed S. Darwish" <>,
	Sergey Senozhatsky <>,
	Steven Rostedt <>,
	John Ogness <>,
Subject: Re: [PATCH] printk: kmsg_dump: Mark registered flag as private
Date: Tue, 12 Mar 2019 18:34:35 +0900
Message-ID: <20190312093435.GA15673@jagdpanzerIV> (raw)
In-Reply-To: <>

On (03/12/19 10:18), Petr Mladek wrote:
> > >   * @max_reason:	filter for highest reason number that should be dumped
> > > - * @registered:	Flag that specifies if this is already registered
> > > + * @registered:	Flag that specifies if this is already registered (private)
> > >   */
> > >  struct kmsg_dumper {
> > >  	struct list_head list;
> > 
> This is another field in the same structure. There are 4 other fields
> that are described as private by extra comment. Thefore this patch
> might make it more consistent.

Well, no objections from my side. At the same time nothing in kmsg_dump.h
suggests that "(private)" stands for "protected by logbuf_lock". Even more,
that struct has another "private" members, which are protected by
logbuf_lock - cur_idx, next_idx, cur_srq, next_seq; except when they are
not (see kmsg_dump_get_line_nolock() and other _nolock() functions). So
"private" has conflicting meanings.

struct kmsg_dumper {
	struct list_head list;
	void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason);
	enum kmsg_dump_reason max_reason;
	bool active;
	bool registered;

	/* private state of the kmsg iterator */
	u32 cur_idx;
	u32 next_idx;
	u64 cur_seq;
	u64 next_seq;

> Well, I am not sure if it is worth it. Andrew?



  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-10 20:03 Ahmed S. Darwish
2019-03-11 12:49 ` Sergey Senozhatsky
2019-03-12  9:18   ` Petr Mladek
2019-03-12  9:34     ` Sergey Senozhatsky [this message]
2019-03-12 20:05   ` Ahmed S. Darwish

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190312093435.GA15673@jagdpanzerIV \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git
	git clone --mirror lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone