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: <1184739572.4178.39.camel@raven.themaw.net>
Date:	Wed, 18 Jul 2007 14:19:32 +0800
From:	Ian Kent <raven@...maw.net>
To:	Bill Davidsen <davidsen@....com>
Cc:	Ingo Molnar <mingo@...e.hu>, Chuck Ebbert <cebbert@...hat.com>,
	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [patch] CFS scheduler, -v19

On Tue, 2007-07-17 at 21:24 -0400, Bill Davidsen wrote:
> Ingo Molnar wrote:
> > * Ian Kent <raven@...maw.net> wrote:
> >
> >   
> >>> ah! It passes in a low-res time source into a high-res time interface 
> >>> (pthread_cond_timedwait()). Could you change the time(NULL) + 1 to 
> >>> time(NULL) + 2, or change it to:
> >>>
> >>> 	gettimeofday(&wait, NULL);
> >>> 	wait.tv_sec++;
> >>>       
> >> OK, I'm with you, hi-res timer.
> >> But even so, how is the time in the past after adding a second.
> >>
> >> Is it because I'm not setting tv_nsec when it's close to a second 
> >> boundary, and hence your recommendation above?
> >>     
> >
> > yeah, it looks a bit suspicious: you create a +1 second timeout out of a 
> > 1 second resolution timesource. I dont yet understand the failure mode 
> > though that results in that looping and in the 30% CPU time use - do you 
> > understand it perhaps? (and automount is still functional while this is 
> > happening, correct?)
> >   
> 
> Can't say, I have automount running because I get it by default, but I 
> have nothing using at on my test machine. Why is it looping so fast when 
> there are no mount points defined? If the config changes there's no 
> requirement to notice right away, is there?

There are two threads where this mistake is made.

One is used to trigger expire events for all automounted filesystems
which happen all the time since I need to run the expire to check if
anything is mounted and whether it needs to be umounted. The alarm
handler sleeps on a condition until the alarm list in not empty and then
sleeps on a condition until the next alarm in the list expires or an
alarm is added to the list, in which case it then checks the list again.
Since the autofs timeout granularity is one second this is a problem and
will be fixed. This isn't the source of the problem that's been
reported.

The second is the state queue handler which runs tasks such as expires,
map re-reads, shutdowns etc. for all automounted filesystems. While the
check interval could be longer it causes autofs to be slugish in
situations such as shutdowns where there are a largish number of mounts
present and I need to cancel such things as expires and the like. It's
possible I could improve this but, in fact, once the timespec is set
correctly as Ingo suggests it works fine and uses very little resource.

Ian

-
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