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:	Tue, 31 May 2011 12:18:15 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Rakib Mullick <rakib.mullick@...il.com>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, Christoph Lameter <cl@...ux.com>,
	Mel Gorman <mel@....ul.ie>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Subject: Re: [PATCH] mm, vmstat: Use cond_resched only when !CONFIG_PREEMPT

On Tue, 31 May 2011 09:13:47 +0600
Rakib Mullick <rakib.mullick@...il.com> wrote:

> On Tue, May 31, 2011 at 5:38 AM, KAMEZAWA Hiroyuki
> <kamezawa.hiroyu@...fujitsu.com> wrote:
> > On Mon, 30 May 2011 22:59:04 +0600
> > Rakib Mullick <rakib.mullick@...il.com> wrote:
> >
> >> commit 468fd62ed9 (vmstats: add cond_resched() to refresh_cpu_vm_stats()) added cond_resched() in refresh_cpu_vm_stats. Purpose of that patch was to allow other threads to run in non-preemptive case. This patch, makes sure that cond_resched() gets called when !CONFIG_PREEMPT is set. In a preemptiable kernel we don't need to call cond_resched().
> >>
> >> Signed-off-by: Rakib Mullick <rakib.mullick@...il.com>
> >
> > Hmm, what benefit do we get by adding this extra #ifdef in the code directly ?
> > Other cond_resched() callers are not guilty in !CONFIG_PREEMPT ?
> >
> Well, in preemptible kernel this context will get preempted if
> requires, so we don't need cond_resched(). If you checkout the git log
> of the mentioned commit, you'll find the explanation. It says:
>         "Adding a cond_resched() to allow other threads to run in the
> non-preemptive
>     case."
> 

IOW, my question is "why only this cond_resched() should be fixed ?"
What's bad with all cond_resched() in the kernel as no-op in CONFIG_PREEMPT ?

Thanks,
-Kame


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