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: <20150317081302.GA28462@gmail.com>
Date:	Tue, 17 Mar 2015 09:13:02 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Wanpeng Li <wanpeng.li@...ux.intel.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Juri Lelli <juri.lelli@....com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND v10] sched/deadline: support dl task migration
 during cpu hotplug


* Wanpeng Li <wanpeng.li@...ux.intel.com> wrote:

> Hi Ingo,
> On Tue, Mar 17, 2015 at 09:06:13AM +0100, Ingo Molnar wrote:
> >
> >* Wanpeng Li <wanpeng.li@...ux.intel.com> wrote:
> >
> >> Hi Ingo,
> >> On Mon, Mar 16, 2015 at 04:01:02PM +0100, Ingo Molnar wrote:
> >> >> +
> >> >> +			/*
> >> >> +			 * If cannot preempt any rq, fallback to pick any
> >> >> +			 * online cpu.
> >> >
> >> >s/If cannot/If we cannot
> >> >s/fallback/fall back
> >> 
> >> Will do.
> >> 
> >> >
> >> >> +			 */
> >> >> +			fallback = true;
> >> >> +			cpu = cpumask_any_and(cpu_active_mask,
> >> >> +						tsk_cpus_allowed(p));
> >> >
> >> >shouldn't be on separate lines - but this is also a sign that the guts 
> >> 
> >> Otherwise there is a "WARNING: line over 80 characters".
> >
> >Yes, but did your reaction to that tool's warning improve the code? I 
> >don't think so. If do what I suggested and reduce indentation a bit, 
> >you'll fix the warning _and_ improve the code. Win-win.
> 
> Cool, will do.
> 
> >
> >> > of this new code should be in a helper function, not inside 
> >> > several layers of branches.
> >> 
> >> Do you mean the whole patch should be in a helper function?
> >
> >Probably.
> 
> Will do.
> 
> >
> >> >> +			if (cpu >= nr_cpu_ids) {
> >> >> +				if (dl_bandwidth_enabled()) {
> >> >> +					/*
> >> >> +					 * Fail to find any suitable cpu.
> >> >> +					 * The task will never come back!
> >> >> +					 */
> >> >> +					WARN_ON(1);
> >> >
> >> > Can this condition happen to users with a non-buggy kernel?
> >> 
> >> What do you prefer? ;-)
> >
> >That was a yes/no question: can this condition trigger on correctly 
> >working kernels?
> 
> How about add unlikely() here? 

Please answer my question: can this condition trigger on correctly 
working kernels? I think so, but maybe I'm wrong?

Yes/no.

Thanks,

	Ingo
--
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