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: <20220222121546.4a45e049@gandalf.local.home>
Date:   Tue, 22 Feb 2022 12:15:46 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Carlos Bilbao <carlos.bilbao@....com>
Cc:     peterz@...radead.org, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, mingo@...hat.com,
        dietmar.eggemann@....com, bsegall@...gle.com, mgorman@...e.de,
        bristot@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kernel/sched: Update schedstats when migrating threads

On Tue, 22 Feb 2022 10:32:32 -0600
Carlos Bilbao <carlos.bilbao@....com> wrote:

> > @@ -8765,7 +8766,14 @@ int migrate_task_to(struct task_struct *p, int target_cpu)
> >  	if (!cpumask_test_cpu(target_cpu, p->cpus_ptr))
> >  		return -EINVAL;
> >  
> > -	/* TODO: This is not properly updating schedstats */
> > +	if (schedstat_enabled()) {
> > +		forced_migrations = schedstat_val(p->stats.nr_forced_migrations);
> > +		migrations_cold = schedstat_val(p->stats.nr_migrations_cold);
> > +		memset(&p->stats, 0, sizeof(p->stats));
> > +		schedstat_set(p->stats.nr_forced_migrations, forced_migrations);
> > +		schedstat_set(p->stats.nr_migrations_cold, migrations_cold);
> > +		schedstat_inc(p->stats.nr_migrations_cold);
> > +	}
> >  
> >  	trace_sched_move_numa(p, curr_cpu, target_cpu);
> >  	return stop_one_cpu(curr_cpu, migration_cpu_stop, &arg);  
> 
> 
> I would love to hear some thoughts on this. 

I have no issues with this.

Peter?

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ