linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rakib Mullick <rakib.mullick@gmail.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
	mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: At sched_fork use __set_task_cpu().
Date: Wed, 1 Feb 2012 23:07:20 +0600	[thread overview]
Message-ID: <CADZ9YHjQXdeFkCbn9A81+Eo+udZoG8vF_1=N7hM4iZo_3uD3nA@mail.gmail.com> (raw)
In-Reply-To: <1328104527.2662.4.camel@laptop>

On Wed, Feb 1, 2012 at 7:55 PM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> On Tue, 2012-01-31 at 14:18 +0530, Kamalesh Babulal wrote:
>> * Rakib Mullick <rakib.mullick@gmail.com> [2012-01-29 22:34:37]:
>>
>> >  We don't use select_task_rq() from sched_fork() anymore and no chance of task gets migrated at
>> > this point. Therefore, we can avoid task migration related checking/accounting, so use
>> > __set_task_cpu() instead of set_task_cpu().
>> >
>> > Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
>>   Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
>
> Since we call sched_fork() with preemption enabled _long_ after the
> child is copied from the parent who is to say we (parent) didn't migrate
> away and are now setting a different cpu?
>
If parent gets migrated that should be accounted as parents migration
count not for child offcourse. And if we're counting child's
nr_migration count for parent's getting migrated, we're simply
screwing childs migration count. Isn't it?

> One could argue that that might not be a real migration from the child's
> POV, maybe, but nobody seems to be making that argument.
>
But I'm not seeing it from child's or parent's POV. I'm simply
addressing the point of a task's migration counter
(p->se.nr_migrations), simply this task wasn't moved.

> I really don't see the point of this..
>
I'm hoping, you'll rethink...

Thanks,
Rakib

      reply	other threads:[~2012-02-01 17:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-29 16:34 [PATCH] sched: At sched_fork use __set_task_cpu() Rakib Mullick
2012-01-31  8:48 ` Kamalesh Babulal
2012-02-01 13:55   ` Peter Zijlstra
2012-02-01 17:07     ` Rakib Mullick [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='CADZ9YHjQXdeFkCbn9A81+Eo+udZoG8vF_1=N7hM4iZo_3uD3nA@mail.gmail.com' \
    --to=rakib.mullick@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=kamalesh@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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).