linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Tejun Heo <tj@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	joel@joelfernandes.org, mathieu.desnoyers@efficios.com,
	peterz@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] Make call_srcu() available during very early boot
Date: Fri, 17 Aug 2018 09:31:43 -0700	[thread overview]
Message-ID: <20180817163143.GX24813@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180817160842.GK3978217@devbig004.ftw2.facebook.com>

On Fri, Aug 17, 2018 at 09:08:42AM -0700, Tejun Heo wrote:
> Hello,
> 
> On Tue, Aug 14, 2018 at 10:06:18AM -0700, Paul E. McKenney wrote:
> > > Is there a way we could make a union, or reuse one of the other fields,
> > > as we know that synchronize_srcu() can't be used yet (and if it is,
> > > either warn, or just make it a nop). And when we call srcu_init() and
> > > remove the srcu_struct from the list, we can then initialize whatever
> > > we used as the temporary boot up list field.
> > 
> > I will take a look.  If nothing else, I could union it with the
> > struct work_struct, since it cannot be used that early anyway.  ;-)
> > 
> > Or I could just use the work_struct that is already inside the struct
> > work_struct.  Tejun, would you be OK with that?
> 
> Hmm... not super against it given how specialized the whole thing is
> but maybe just making it a union is cleaner?

The problem with making it be a union is that I cannnot determine how
to initialize it due to the possibility that someone will initialize it
early, but not use it until much later.  For example, if I initialize my
side of the union, but they don't actually use it until after rcu_init()
is invoked, I will end up passing a bogus work_struct to you.

In theory, I could straighten all this out at rcu_init() time, but that
would require linking all srcu_struct instances initialized at that
point, including the compile-time-initialized instances.  This can of
course be done, but not simply.

Or am I missing a trick here somewhere?

							Thanx, Paul


      reply	other threads:[~2018-08-17 16:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-14 16:24 [PATCH RFC] Make call_srcu() available during very early boot Paul E. McKenney
2018-08-14 16:49 ` Steven Rostedt
2018-08-14 17:06   ` Paul E. McKenney
2018-08-14 17:24     ` Steven Rostedt
2018-08-14 17:44       ` Paul E. McKenney
2018-08-14 18:34         ` Steven Rostedt
2018-08-14 18:41           ` Paul E. McKenney
2018-08-14 21:02     ` Paul E. McKenney
2018-08-17 16:08     ` Tejun Heo
2018-08-17 16:31       ` Paul E. McKenney [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20180817163143.GX24813@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).