All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Shi <alex.shi@intel.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: "mingo@redhat.com" <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Borislav Petkov <bp@alien8.de>, Paul Turner <pjt@google.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Mike Galbraith <efault@gmx.de>,
	Morten Rasmussen <morten.rasmussen@arm.com>,
	Preeti U Murthy <preeti@linux.vnet.ibm.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Mel Gorman <mgorman@suse.de>,
	riel@redhat.com, Michael Wang <wangyun@linux.vnet.ibm.com>,
	Jason Low <jason.low2@hp.com>
Subject: Re: [RFC patch 1/4] sched: change cfs_rq load avg to unsigned long
Date: Sat, 08 Jun 2013 10:18:50 +0800	[thread overview]
Message-ID: <51B2948A.60309@intel.com> (raw)
In-Reply-To: <CAKfTPtA=pVQ69pfv97kgcdawgHbQbkbXW4sFGN6_bAzZcD9b9Q@mail.gmail.com>

On 06/07/2013 05:07 PM, Vincent Guittot wrote:
> On 7 June 2013 09:29, Alex Shi <alex.shi@intel.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.

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

  reply	other threads:[~2013-06-08  2:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-07  7:29 [RFC patch 0/4] change 64 bit variables to long type Alex Shi
2013-06-07  7:29 ` [RFC patch 1/4] sched: change cfs_rq load avg to unsigned long Alex Shi
2013-06-07  9:07   ` Vincent Guittot
2013-06-08  2:18     ` Alex Shi [this message]
2013-06-17  9:49       ` Paul Turner
2013-06-17  9:59         ` Alex Shi
2013-06-17  9:54       ` Vincent Guittot
2013-06-17  9:58         ` Alex Shi
2013-06-18  4:56   ` Alex Shi
2013-06-07  7:29 ` [RFC patch 2/4] sched/tg: use 'unsigned long' for load variable in task group Alex Shi
2013-06-17 12:25   ` Paul Turner
2013-06-17 15:26     ` Alex Shi
2013-06-07  7:29 ` [RFC patch 3/4] sched/cfs_rq: change atomic64_t removed_load to atomic_long_t Alex Shi
2013-06-17 10:19   ` Paul Turner
2013-06-07  7:29 ` [RFC patch 4/4] sched/tg: remove tg.load_weight Alex Shi
2013-06-17 12:22   ` Paul Turner
2013-06-10  2:20 ` [RFC patch 0/4] change 64 bit variables to long type Alex Shi
2013-06-11  6:13   ` Alex Shi
2013-06-14 14:20 ` Alex Shi
2013-06-17  1:01   ` Alex Shi

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=51B2948A.60309@intel.com \
    --to=alex.shi@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=efault@gmx.de \
    --cc=jason.low2@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=morten.rasmussen@arm.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=riel@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=wangyun@linux.vnet.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.