Re: RFC: poll change

David S. Miller (davem@redhat.com)
Tue, 14 Aug 2001 17:16:09 -0700 (PDT)


From: Andrea Arcangeli <andrea@suse.de>
Date: Wed, 15 Aug 2001 02:11:10 +0200

On Tue, Aug 14, 2001 at 04:53:43PM -0700, Tim Hockin wrote:
> - if (nfds > NR_OPEN)
> + if (nfds > current->rlim[RLIMIT_NOFILE].rlim_cur)

Here SuS speaks about OPEN_MAX, not sure if OPEN_MAX corresponds to the
current ulimit or to the absolute maximum (to me it sounds more like our
NR_OPEN).

Right, and our equivalent is "NR_OPEN".

Ok, I think I see what you and Tim are trying to say.
I'm thinking in a select() minded way which is why I didn't
understand :-)

Yeah, the check can be removed, but anyone who cares about
performance won't pass in huge arrays of -1 entries if only
the low few pollfd entries are actually useful.

Later,
David S. Miller
davem@redhat.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/