Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-17 Thread Nishanth Aravamudan
On 17.08.2005 [12:51:17 -0700], George Anzinger wrote: > Nishanth Aravamudan wrote: > ~ > >>IMNSHO we should not get too parental with kernel only interfaces. > >>Adding 1 is easy enough for the caller and even easier to explain in the > >>instructions (i.e. this call sleeps for X jiffies

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-17 Thread George Anzinger
Nishanth Aravamudan wrote: ~ IMNSHO we should not get too parental with kernel only interfaces. Adding 1 is easy enough for the caller and even easier to explain in the instructions (i.e. this call sleeps for X jiffies edges). This allows the caller to do more if needed and, should he ever

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-17 Thread George Anzinger
Nishanth Aravamudan wrote: ~ IMNSHO we should not get too parental with kernel only interfaces. Adding 1 is easy enough for the caller and even easier to explain in the instructions (i.e. this call sleeps for X jiffies edges). This allows the caller to do more if needed and, should he ever

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-17 Thread Nishanth Aravamudan
On 17.08.2005 [12:51:17 -0700], George Anzinger wrote: Nishanth Aravamudan wrote: ~ IMNSHO we should not get too parental with kernel only interfaces. Adding 1 is easy enough for the caller and even easier to explain in the instructions (i.e. this call sleeps for X jiffies edges). This

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-16 Thread Nishanth Aravamudan
On 16.08.2005 [17:39:11 -0700], George Anzinger wrote: > Nishanth Aravamudan wrote: > >On 04.08.2005 [09:45:55 -0700], George Anzinger wrote: > > > >>Uh... PLEASE tell me you are NOT changing timespec_to_jiffies() (and > >>timeval_to_jiffies() to add 1. This is NOT the right thing to do. For >

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-16 Thread George Anzinger
Nishanth Aravamudan wrote: On 04.08.2005 [09:45:55 -0700], George Anzinger wrote: Uh... PLEASE tell me you are NOT changing timespec_to_jiffies() (and timeval_to_jiffies() to add 1. This is NOT the right thing to do. For repeating times (see setitimer code) we need the actual time as we

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-16 Thread Nishanth Aravamudan
On 04.08.2005 [09:45:55 -0700], George Anzinger wrote: > Uh... PLEASE tell me you are NOT changing timespec_to_jiffies() (and > timeval_to_jiffies() to add 1. This is NOT the right thing to do. For > repeating times (see setitimer code) we need the actual time as we KNOW > where the jiffies

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-16 Thread Nishanth Aravamudan
On 04.08.2005 [09:45:55 -0700], George Anzinger wrote: Uh... PLEASE tell me you are NOT changing timespec_to_jiffies() (and timeval_to_jiffies() to add 1. This is NOT the right thing to do. For repeating times (see setitimer code) we need the actual time as we KNOW where the jiffies edge

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-16 Thread George Anzinger
Nishanth Aravamudan wrote: On 04.08.2005 [09:45:55 -0700], George Anzinger wrote: Uh... PLEASE tell me you are NOT changing timespec_to_jiffies() (and timeval_to_jiffies() to add 1. This is NOT the right thing to do. For repeating times (see setitimer code) we need the actual time as we

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-16 Thread Nishanth Aravamudan
On 16.08.2005 [17:39:11 -0700], George Anzinger wrote: Nishanth Aravamudan wrote: On 04.08.2005 [09:45:55 -0700], George Anzinger wrote: Uh... PLEASE tell me you are NOT changing timespec_to_jiffies() (and timeval_to_jiffies() to add 1. This is NOT the right thing to do. For repeating

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-04 Thread Nish Aravamudan
On 8/4/05, George Anzinger wrote: > Nishanth Aravamudan wrote: > ~ > > Sorry, I forgot that sys_nanosleep() also always adds 1 to the request > > (to account for this same issue, I believe, as POSIX demands no early > > return from nanosleep() calls). There are some other locations where > >

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-04 Thread Nish Aravamudan
On 8/4/05, George Anzinger wrote: > Uh... PLEASE tell me you are NOT changing timespec_to_jiffies() (and > timeval_to_jiffies() to add 1. This is NOT the right thing to do. For > repeating times (see setitimer code) we need the actual time as we KNOW > where the jiffies edge is in the repeating

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-04 Thread George Anzinger
Nishanth Aravamudan wrote: ~ Sorry, I forgot that sys_nanosleep() also always adds 1 to the request (to account for this same issue, I believe, as POSIX demands no early return from nanosleep() calls). There are some other locations where similar + (t.tv_sec || t.tv_nsec) This is not

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-04 Thread George Anzinger
Uh... PLEASE tell me you are NOT changing timespec_to_jiffies() (and timeval_to_jiffies() to add 1. This is NOT the right thing to do. For repeating times (see setitimer code) we need the actual time as we KNOW where the jiffies edge is in the repeating case. The +1 is needed ONLY for the

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-04 Thread George Anzinger
Uh... PLEASE tell me you are NOT changing timespec_to_jiffies() (and timeval_to_jiffies() to add 1. This is NOT the right thing to do. For repeating times (see setitimer code) we need the actual time as we KNOW where the jiffies edge is in the repeating case. The +1 is needed ONLY for the

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-04 Thread George Anzinger
Nishanth Aravamudan wrote: ~ Sorry, I forgot that sys_nanosleep() also always adds 1 to the request (to account for this same issue, I believe, as POSIX demands no early return from nanosleep() calls). There are some other locations where similar + (t.tv_sec || t.tv_nsec) This is not

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-04 Thread Nish Aravamudan
On 8/4/05, George Anzinger george@mvista.com wrote: Uh... PLEASE tell me you are NOT changing timespec_to_jiffies() (and timeval_to_jiffies() to add 1. This is NOT the right thing to do. For repeating times (see setitimer code) we need the actual time as we KNOW where the jiffies edge is in

Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-04 Thread Nish Aravamudan
On 8/4/05, George Anzinger george@mvista.com wrote: Nishanth Aravamudan wrote: ~ Sorry, I forgot that sys_nanosleep() also always adds 1 to the request (to account for this same issue, I believe, as POSIX demands no early return from nanosleep() calls). There are some other locations where

[UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-03 Thread Nishanth Aravamudan
On 03.08.2005 [17:51:47 -0700], Nishanth Aravamudan wrote: > On 03.08.2005 [16:20:57 +0200], Roman Zippel wrote: > > Hi, > > > > On Mon, 1 Aug 2005, Nishanth Aravamudan wrote: > > > > > +unsigned int __sched schedule_timeout_msecs(unsigned int timeout_msecs) > > > +{ > > > + unsigned long

[UPDATE PATCH] push rounding up of relative request to schedule_timeout()

2005-08-03 Thread Nishanth Aravamudan
On 03.08.2005 [17:51:47 -0700], Nishanth Aravamudan wrote: On 03.08.2005 [16:20:57 +0200], Roman Zippel wrote: Hi, On Mon, 1 Aug 2005, Nishanth Aravamudan wrote: +unsigned int __sched schedule_timeout_msecs(unsigned int timeout_msecs) +{ + unsigned long expire_jifs; + +