lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 24 Jan 2011 07:54:00 +0200
From:	Pekka Enberg <penberg@...nel.org>
To:	Yong Zhang <yong.zhang0@...il.com>
Cc:	linux-kernel@...r.kernel.org, mfwitten@...il.com,
	christian@...dbynature.de, a.p.zijlstra@...llo.nl,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	Mike Galbraith <efault@....de>
Subject: Re: [PATCH V2] sched: fix autogroup nice tune on UP

Hi!

On Mon, Jan 24, 2011 at 7:40 AM, Yong Zhang <yong.zhang0@...il.com> wrote:
> +static void update_cfs_shares(struct cfs_rq *cfs_rq, long weight_delta)
> +{
> +       struct task_group *tg;
> +       struct sched_entity *se;
> +
> +       if (!cfs_rq)
> +               return;
> +
> +       tg = cfs_rq->tg;
> +       se = tg->se[0];
> +       if (!se)
> +               return;
> +       if (likely(se->load.weight == tg->shares))
> +               return;
> +       reweight_entity(cfs_rq_of(se), se, tg->shares);
> +}

Wouldn't it be cleaner if we'd separate the shares calculation in a
separate helper function that's just

  return tg->shares;

for UP and extract the current logic for the SMP version?
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ