Re: [UPDATE PATCH][Bug 5132] fix sys_poll() large timeout handling

Nishanth Aravamudan
2005-09-12T16:07:00Z

On 12.09.2005 [11:19:32 -0400], Peter Staubach wrote:
> Nishanth Aravamudan wrote:
>
> >
> >I don't think the embedded folks are going to be ok with adding a 64-bit
> >div in the poll() common-path... But otherwise the patch looks pretty
> >sane, except I think you want s64, not int64_t? I can't ever remember
> >myself :)
> >
> >
>
> Oops, I missed an include which is required. The updated patch is attached.

Could you update your patch against 2.6.13-mm3? Andrew has aleady pulled
in the patch I sent with his changes. It should make your pactch a
little smaller (and only need to touch fs/select.c).

> A 64 bit quantity divided by a 32 bit quantity seems to be a standard
> interface in the kernel and is used fairly widely, so I suspect that
> the embedded folks have already done the work.

I understand that the interface is common enough, but I'm not sure how
appreciated it is :)

> I don't know which should be used, s64 or int64_t. I chose int64_t
> because then it would (more or less) match the interface of do_div().

Yes, I'll leave this to someone else to figure out...

> >I agree the interface mght be mis-defined. And changing timeout_msecs()
> >to an integer is consistent with the size of millisecond-unit variables
> >used elsewhere in the kernel.
> >
>
> Yes, it also makes the kernel definition for sys_poll() match the user level
> definition for poll(2) found in <poll.h>.

Yup, sounds good to me.

Thanks,
Nish