[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPM31RK6+kdEcD3xqdvu0dsvL1THkgGnJoU3f7SLx_+9uqym-Q@mail.gmail.com>
Date: Mon, 17 Jun 2013 02:49:03 -0700
From: Paul Turner <pjt@...gle.com>
To: Alex Shi <alex.shi@...el.com>
Cc: Vincent Guittot <vincent.guittot@...aro.org>,
"mingo@...hat.com" <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Borislav Petkov <bp@...en8.de>,
Namhyung Kim <namhyung@...nel.org>,
Mike Galbraith <efault@....de>,
Morten Rasmussen <morten.rasmussen@....com>,
Preeti U Murthy <preeti@...ux.vnet.ibm.com>,
Viresh Kumar <viresh.kumar@...aro.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Mel Gorman <mgorman@...e.de>, Rik van Riel <riel@...hat.com>,
Michael Wang <wangyun@...ux.vnet.ibm.com>,
Jason Low <jason.low2@...com>
Subject: Re: [RFC patch 1/4] sched: change cfs_rq load avg to unsigned long
On Fri, Jun 7, 2013 at 7:18 PM, Alex Shi <alex.shi@...el.com> wrote:
> On 06/07/2013 05:07 PM, Vincent Guittot wrote:
>> On 7 June 2013 09:29, Alex Shi <alex.shi@...el.com> wrote:
>>> > Since the 'u64 runnable_load_avg, blocked_load_avg' in cfs_rq struct are
>>> > smaller than 'unsigned long' cfs_rq->load.weight. We don't need u64
>>> > vaiables to describe them. unsigned long is more efficient and convenience.
>>> >
>> Hi Alex,
>>
>> I just want to point out that we can't have more than 48388 tasks with
>> highest priority on a runqueue with an unsigned long on a 32 bits
>> system. I don't know if we can reach such kind of limit on a 32bits
>> machine ? For sure, not on an embedded system.
This should be ok.
Note that:
runnable_load_avg = \Sum se->load_avg_contrib <= \Sum
se->load.weight = cfs_rq->load.weight
And load_weight uses unsigned longs also.
blocked_load_avg must be also safe since anything appearing in blocked
load could have appeared in runnable load and we've said that was ok
above.
Reviewed-By: Paul Turner <pjt@...gle.com>
>
> Thanks question!
> It should be a talked problem. I just remember the conclusion is when
> you get the up bound task number, you already run out the memory space
> on 32 bit.
>
> Just for kernel resource for a process, it need 2 pages stack.
> mm_struct, task_struct, task_stats, vm_area_struct, page table etc.
> these are already beyond 4 pages. so 4 * 4k * 48388 = 774MB. plus user
> level resources.
>
> So, usually the limited task number in Linux is often far lower this
> number: $ulimit -u.
>
> Anyway, at least, the runnable_load_avg is smaller then load.weight. if
> load.weight can use long type, runablle_load_avg is no reason can't.
>
> --
> Thanks
> Alex
--
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