From: Peter Zijlstra <peterz@infradead.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] sched/core: remove get_cpu() from sched_fork()
Date: Mon, 9 Jul 2018 11:01:41 +0200 [thread overview]
Message-ID: <20180709090141.GE2476@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20180706133200.a5n47p6utvil4bvf@linutronix.de>
On Fri, Jul 06, 2018 at 03:32:00PM +0200, Sebastian Andrzej Siewior wrote:
> On 2018-07-06 15:18:08 [+0200], Peter Zijlstra wrote:
> > On Fri, Jul 06, 2018 at 03:06:15PM +0200, Sebastian Andrzej Siewior wrote:
> > > Based on this it is possible to remove get_cpu() and use
> > > smp_processor_id() for the `cpu' variable without breaking anything.
> >
> > Almost.. I think, see init_task_preempt_count().
>
> #define init_task_preempt_count(p) do { \
> task_thread_info(p)->preempt_count = FORK_PREEMPT_COUNT; \
> } while (0)
>
> and task_thread_info() references p only. It looks good, what did I
> miss?
Argh, dammit, I read that with p == current :/
Then yes, looks ok.
next prev parent reply other threads:[~2018-07-09 9:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-06 13:06 Sebastian Andrzej Siewior
2018-07-06 13:18 ` Peter Zijlstra
2018-07-06 13:32 ` Sebastian Andrzej Siewior
2018-07-09 9:01 ` Peter Zijlstra [this message]
2018-07-15 23:34 ` [tip:sched/core] sched/core: Remove " tip-bot for Sebastian Andrzej Siewior
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=20180709090141.GE2476@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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
Powered by JetHome