[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpon2xQxSqeOCTb=noki=QUH=Cf9Aggsd_uAv34TNfyC0FA@mail.gmail.com>
Date: Sun, 30 Sep 2012 17:46:45 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Tejun Heo <tj@...nel.org>
Cc: linux-kernel@...r.kernel.org, pjt@...gle.com,
paul.mckenney@...aro.org, tglx@...utronix.de,
suresh.b.siddha@...el.com, venki@...gle.com, mingo@...hat.com,
peterz@...radead.org, robin.randhawa@....com,
Steve.Bannister@....com, Arvind.Chauhan@....com,
amit.kucheria@...aro.org, vincent.guittot@...aro.org,
linaro-dev@...ts.linaro.org, patches@...aro.org
Subject: Re: [PATCH V2 3/3] workqueue: Schedule work on non-idle cpu instead
of current one
On 30 September 2012 14:24, Tejun Heo <tj@...nel.org> wrote:
> On Thu, Sep 27, 2012 at 02:34:05PM +0530, Viresh Kumar wrote:
>> - A cpu has programmed a timer and is IDLE now.
>> - CPU gets into interrupt handler due to timer and queues a work. As the CPU is
>> currently IDLE, we can queue this work to some other CPU.
>
> I'm still a bit confused, if the CPU is already running the IRQ
> handler, the CPU is not idle by definition. What am I missing here?
Hi Tejun,
For the scheduler CPU is idle, if all below are true:
- current task is idle task
- nr_running == 0
- wake_list is empty
And during these conditions, there can be a timer running in background.
And when we reach its interrupt handler, then also these conditions hold true
and local cpu is idle.
--
Viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists