public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: Mike Galbraith <efault@gmx.de>
Cc: Ingo Molnar <mingo@elte.hu>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Sam Vilain <sam@vilain.net>,
	linux-kernel@vger.kernel.org, Kirill Korotaev <dev@openvz.org>,
	Balbir Singh <balbir@in.ibm.com>,
	sekharan@us.ibm.com, Andrew Morton <akpm@osdl.org>,
	nagar@watson.ibm.com, matthltc@us.ibm.com, dipankar@in.ibm.com
Subject: Re: [PATCH 0/7] CPU controller - V1
Date: Mon, 21 Aug 2006 22:15:53 +0530	[thread overview]
Message-ID: <20060821164553.GA21130@in.ibm.com> (raw)
In-Reply-To: <1156180241.6582.69.camel@Homer.simpson.net>

On Mon, Aug 21, 2006 at 05:10:41PM +0000, Mike Galbraith wrote:
> I must be missing something.  If current and awakening tasks have
> separate runqueues, task_rq(awakening)->curr != current.  We won't look
> at current->prio, so won't resched(current).

Ok ..we have two types of runqueues here:

1. struct task_grp_rq
	per-task-group-per-cpu runqueue, which holds ready-to-run tasks 
	belonging to the group in active and expired arrays.

2. struct rq
	per-cpu runqueue, which holds ready-to-run task-groups in active and 
	expired arrays. This structure also holds some members like
	curr, nr_running etc which more or less have the same significance as 
	the current runqueue members.

task_rq(tsk) still extracts "struct rq", while
task_grp(tsk)->rq[task_cpu(tsk)] extracts "struct task_grp_rq".

Hence task_rq(awakening)->curr == current, which should be sufficient to 
resched(current), although I think there is a bug in current code 
(irrespective of these patches):

try_to_wake_up() :
	
	...

        if (!sync || cpu != this_cpu) {
                if (TASK_PREEMPTS_CURR(p, rq))
                        resched_task(rq->curr);
        }
        success = 1;

	...

TASK_PREEMPTS_CURR() is examined and resched_task() is called only if 
(cpu != this_cpu). What about the case (cpu == this_cpu) - who will
call resched_task() on current? I had expected the back-end of interrupt
handling to do that, but didnt find any code to do so.

-- 
Regards,
vatsa

  reply	other threads:[~2006-08-21 16:46 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-20 17:40 [PATCH 0/7] CPU controller - V1 Srivatsa Vaddagiri
2006-08-20 17:41 ` [PATCH 1/7] CPU controller V1 - split runqueue Srivatsa Vaddagiri
2006-08-25 12:38   ` Kirill Korotaev
2006-08-28  3:33     ` Srivatsa Vaddagiri
2006-08-28  8:15       ` Kirill Korotaev
2006-08-28 11:03         ` Srivatsa Vaddagiri
2006-08-28 12:31           ` Nick Piggin
2006-08-28 12:52             ` Srivatsa Vaddagiri
2006-08-20 17:42 ` [PATCH 2/7] CPU controller V1 - define group operations Srivatsa Vaddagiri
2006-08-20 17:44 ` [PATCH 3/7] CPU controller V1 - deal with movement of tasks Srivatsa Vaddagiri
2006-08-20 17:45 ` [PATCH 4/7] CPU controller V1 - Handle dont care groups Srivatsa Vaddagiri
2006-08-20 17:46 ` [PATCH 5/7] CPU controller V1 - Extend smpnice to be task-group aware Srivatsa Vaddagiri
2006-08-20 17:47 ` [PATCH 6/7] CPU controller V1 - task_cpu(p) needs to be correct always Srivatsa Vaddagiri
2006-08-20 17:48 ` [PATCH 7/7] CPU controller V1 - (temporary) cpuset interface Srivatsa Vaddagiri
2006-08-20 20:48   ` Paul Jackson
2006-08-21 17:49     ` Srivatsa Vaddagiri
2006-08-28  1:50       ` Paul Jackson
2006-08-22 11:10   ` Mike Galbraith
2006-08-22 10:10     ` Srivatsa Vaddagiri
2006-08-22 14:41       ` Mike Galbraith
2006-08-22 15:23         ` Mike Galbraith
2006-08-22 14:01           ` Srivatsa Vaddagiri
2006-08-22 18:01             ` Mike Galbraith
2006-08-22 15:58               ` Srivatsa Vaddagiri
2006-08-22 18:55               ` Paul Jackson
2006-08-22 15:45           ` Mike Galbraith
2006-08-22 13:50             ` Srivatsa Vaddagiri
2006-08-22 18:05               ` Mike Galbraith
2006-08-22 16:02                 ` Srivatsa Vaddagiri
2006-08-22 19:09                   ` Mike Galbraith
2006-08-23  9:43   ` Mike Galbraith
2006-08-23 15:24     ` Mike Galbraith
2006-08-23 13:25       ` Srivatsa Vaddagiri
2006-08-21 10:42 ` [PATCH 0/7] CPU controller - V1 Mike Galbraith
2006-08-21 12:48   ` Srivatsa Vaddagiri
2006-08-21 17:10     ` Mike Galbraith
2006-08-21 16:45       ` Srivatsa Vaddagiri [this message]
2006-08-21 20:33         ` Mike Galbraith
2006-08-21 18:36           ` Srivatsa Vaddagiri

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=20060821164553.GA21130@in.ibm.com \
    --to=vatsa@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=balbir@in.ibm.com \
    --cc=dev@openvz.org \
    --cc=dipankar@in.ibm.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthltc@us.ibm.com \
    --cc=mingo@elte.hu \
    --cc=nagar@watson.ibm.com \
    --cc=nickpiggin@yahoo.com.au \
    --cc=sam@vilain.net \
    --cc=sekharan@us.ibm.com \
    /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