Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-16 Thread Adrian Chadd
On 16 October 2012 00:06, Maxim Sobolev wrote: > I am working on improved version, so that in the absence of @every_second it > would revert to the previous behavior. Even though I seriously doubt that > few thousand additional CPU cycles every second would make any measurable > differences in an

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-16 Thread Maxim Sobolev
On 10/15/2012 9:40 PM, Adrian Chadd wrote: Gah, I think there's quite a lot of push back on this. Maxim, would you please consider reverting this patch? Can we have a discussion on the best way to do this, taking various things like embedded and power-saving systems into effect? I am working o

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-16 Thread Maxim Sobolev
On 10/15/2012 1:44 PM, Ian Lepore wrote: It appears to, which I don't think is a bad thing at all. But the way it waits is to wake up, do some work, and go back to sleep for an integer 1 second. That will occasionally lead to a second in which no wakeup happens, as the "do some work" part alway

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Valentin Nechayev
Mon, Oct 15, 2012 at 15:45:37, adrian wrote about "Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib": > Why not sleep for the amonut of time needed before the next event? If you do this for all events listed currently in all crontabs, you need event engine. Curr

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Adrian Chadd
Gah, I think there's quite a lot of push back on this. Maxim, would you please consider reverting this patch? Can we have a discussion on the best way to do this, taking various things like embedded and power-saving systems into effect? Thanks, Adrian __

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Pedro Giffuni
On 10/15/2012 22:01, Bruce Evans wrote: On Mon, 15 Oct 2012, Ian Lepore wrote: On Mon, 2012-10-15 at 13:52 -0700, Garrett Cooper wrote: ... In 1987 I would have been outraged at waking up at 1hz needlessly. Sitting here typing on a machine that's doing 12,000 interrupts/sec just to maintain

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Bruce Evans
On Mon, 15 Oct 2012, Ian Lepore wrote: On Mon, 2012-10-15 at 13:52 -0700, Garrett Cooper wrote: On Mon, Oct 15, 2012 at 1:44 PM, Ian Lepore wrote: On Mon, 2012-10-15 at 22:26 +0200, Pawel Jakub Dawidek wrote: On Mon, Oct 15, 2012 at 08:21:50AM +, Maxim Sobolev wrote: ... Log: Add per

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Maxim Sobolev
On 10/15/2012 4:26 PM, Adrian Chadd wrote: Maybe crontab should be using a command via a socket to reload, rather than stat'ing files.. Simple signal would do. kqueuing the file is not as easy, but this would complicate logic as you would need to look at renames, removes etc. I really doubt t

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Maxim Sobolev
On 10/15/2012 6:07 PM, Xin Li wrote: Because it's not guaranteed to work on every filesystems? But yes I think it would be a good idea to implement it and use it when all filesystems used to store crontabs supports it. I considered it, but it seems inadequate for things like: # mv /etc /etc.o

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 10/15/12 17:23, Eitan Adler wrote: > On 15 October 2012 19:26, Adrian Chadd wrote: >> On 15 October 2012 16:10, Eitan Adler >> wrote: >>> On 15 October 2012 18:45, Adrian Chadd >>> wrote: Why not sleep for the amonut of time needed before

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Eitan Adler
On 15 October 2012 19:26, Adrian Chadd wrote: > On 15 October 2012 16:10, Eitan Adler wrote: >> On 15 October 2012 18:45, Adrian Chadd wrote: >>> Why not sleep for the amonut of time needed before the next event? >> >> If the crontab changes in the meantime. If the next event is in a week, >> bu

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Bruce Cran
On 16/10/2012 00:26, Adrian Chadd wrote: Maybe crontab should be using a command via a socket to reload, rather than stat'ing files.. Or kqueue? -- Bruce Cran ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Adrian Chadd
On 15 October 2012 16:10, Eitan Adler wrote: > On 15 October 2012 18:45, Adrian Chadd wrote: >> Why not sleep for the amonut of time needed before the next event? > > If the crontab changes in the meantime. If the next event is in a week, > but you modify the crontab, you don't want to sleep unti

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Eitan Adler
On 15 October 2012 18:45, Adrian Chadd wrote: > Why not sleep for the amonut of time needed before the next event? If the crontab changes in the meantime. If the next event is in a week, but you modify the crontab, you don't want to sleep until next event. Why we stat the file every quantum inst

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Adrian Chadd
Why not sleep for the amonut of time needed before the next event? adrian On 15 October 2012 01:21, Maxim Sobolev wrote: > Author: sobomax > Date: Mon Oct 15 08:21:49 2012 > New Revision: 241576 > URL: http://svn.freebsd.org/changeset/base/241576 > > Log: > Add per-second scheduling into th

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 10/15/12 15:21, Xin Li wrote: > On 10/15/12 13:52, Garrett Cooper wrote: >> On Mon, Oct 15, 2012 at 1:44 PM, Ian Lepore >> wrote: >>> On Mon, 2012-10-15 at 22:26 +0200, Pawel Jakub Dawidek wrote: On Mon, Oct 15, 2012 at 08:21:50AM +, Ma

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Bruce Cran
On 15/10/2012 22:18, Ian Lepore wrote: In 1987 I would have been outraged at waking up at 1hz needlessly. Sitting here typing on a machine that's doing 12,000 interrupts/sec just to maintain clocks, and top shows interrupts using 0.0% cpu, it's hard to get too upset about a 1hz loop anymore. Pe

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 10/15/12 13:52, Garrett Cooper wrote: > On Mon, Oct 15, 2012 at 1:44 PM, Ian Lepore > wrote: >> On Mon, 2012-10-15 at 22:26 +0200, Pawel Jakub Dawidek wrote: >>> On Mon, Oct 15, 2012 at 08:21:50AM +, Maxim Sobolev wrote: Author: sobomax

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Garrett Cooper
On Mon, Oct 15, 2012 at 2:18 PM, Ian Lepore wrote: > On Mon, 2012-10-15 at 13:52 -0700, Garrett Cooper wrote: >> On Mon, Oct 15, 2012 at 1:44 PM, Ian Lepore >> wrote: >> > On Mon, 2012-10-15 at 22:26 +0200, Pawel Jakub Dawidek wrote: >> >> On Mon, Oct 15, 2012 at 08:21:50AM +, Maxim Sobolev w

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Ian Lepore
On Mon, 2012-10-15 at 13:52 -0700, Garrett Cooper wrote: > On Mon, Oct 15, 2012 at 1:44 PM, Ian Lepore > wrote: > > On Mon, 2012-10-15 at 22:26 +0200, Pawel Jakub Dawidek wrote: > >> On Mon, Oct 15, 2012 at 08:21:50AM +, Maxim Sobolev wrote: > >> > Author: sobomax > >> > Date: Mon Oct 15 08:21

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Garrett Cooper
On Mon, Oct 15, 2012 at 1:44 PM, Ian Lepore wrote: > On Mon, 2012-10-15 at 22:26 +0200, Pawel Jakub Dawidek wrote: >> On Mon, Oct 15, 2012 at 08:21:50AM +, Maxim Sobolev wrote: >> > Author: sobomax >> > Date: Mon Oct 15 08:21:49 2012 >> > New Revision: 241576 >> > URL: http://svn.freebsd.org/c

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Ian Lepore
On Mon, 2012-10-15 at 22:26 +0200, Pawel Jakub Dawidek wrote: > On Mon, Oct 15, 2012 at 08:21:50AM +, Maxim Sobolev wrote: > > Author: sobomax > > Date: Mon Oct 15 08:21:49 2012 > > New Revision: 241576 > > URL: http://svn.freebsd.org/changeset/base/241576 > > > > Log: > > Add per-second sch

Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Pawel Jakub Dawidek
On Mon, Oct 15, 2012 at 08:21:50AM +, Maxim Sobolev wrote: > Author: sobomax > Date: Mon Oct 15 08:21:49 2012 > New Revision: 241576 > URL: http://svn.freebsd.org/changeset/base/241576 > > Log: > Add per-second scheduling into the cron(8). Right now it's > only available via the new @every