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]
Message-ID: <ebc9718f41b9294fe46129cafe3edffdbcc024e3.camel@linux.intel.com>
Date:   Tue, 29 Mar 2022 07:26:05 -0700
From:   Tim Chen <tim.c.chen@...ux.intel.com>
To:     Abel Wu <wuyun.abel@...edance.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Ingo Molnar <mingo@...e.hu>, Juri Lelli <juri.lelli@...hat.com>
Cc:     Yu Chen <yu.c.chen@...el.com>, Walter Mack <walter.mack@...el.com>,
        Mel Gorman <mgorman@...e.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] sched/fair: Simple runqueue order on migrate

On Tue, 2022-03-29 at 18:09 +0800, Abel Wu wrote:
> > 
> 
> >   
> > +static void place_entity_migrate(struct cfs_rq *cfs_rq, struct sched_entity *se)
> > +{
> > +	if (!sched_feat(PLACE_MIGRATE))
> > +		return;
> > +
> > +	if (cfs_rq->nr_running < se->migrated) {
> > +		/*
> > +		 * Migrated to a shorter runqueue, go first because
> > +		 * we were under-served on the old runqueue.
> > +		 */
> > +		se->vruntime = cfs_rq->min_vruntime;
> > +		return;
> > +	}
> > +
> > +	/*
> > +	 * Migrated to a longer runqueue, go last because
> > +	 * we got over-served on the old runqueue.
> > +	 */
> > +	se->vruntime = cfs_rq->min_vruntime + sched_vslice(cfs_rq, se);
> > +}
> 
> Should se->migrated be cleared after place_entity_migrate?
> 

It is cleared in update_stats_curr_start() before we actually run the task.
If the task gets migrated again before we run it, the se->migrated will also
be updated in migrate_task_rq_fair().  Looks like there is no need to
clear it here.

Tim

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ