[PATCH] sys_poll error.
Patrick Mau
patrick en oscar.prima.de
Dom Ene 30 17:43:09 CST 2000
On Mon, Jan 31, 2000 at 12:01:17AM +0100, Manfred Spraul wrote:
> Patrick Mau wrote:
> > [sys_poll+287/1360] [sys_gettimeofday+29/148] [system_call+52/56]
> >
> > It happens every 100 msec when squid polls its fd's.
> > squid is compoiled to use 1024 filedescriptors. It's
> > just a local WWW cache for my machine.
> >
> Ok, that's Tigran's new poll patch.
> Hmm. But what fails?
>
> Could you strace squid? [strace -p <pid of squid proxy>]
> There are 2 squid processes on my server, one of them polls every few
> milliseconds
Hi Manfred, Linus, linux-kernel,
The calculation of the size of the (struct pollfd **) seems
quite wrong. Here's a patch wich works since 15 minutes ...
(Against 2.3.41)
thanks,
Patrick
------------ próxima parte ------------
--- linux-2.3.41/fs/select.c Sat Jan 29 16:05:29 2000
+++ linux-2.3.41-patch/fs/select.c Sun Jan 30 23:48:58 2000
@@ -414,9 +414,13 @@
wait = wait_table;
}
+/*
fds = (struct pollfd **)kmalloc(
(1 + (nfds - 1) / POLLFD_PER_PAGE) * sizeof(struct pollfd *),
GFP_KERNEL);
+*/
+
+ fds = (struct pollfd **)kmalloc(nfds * sizeof(struct pollfd *), GFP_KERNEL);
if (fds == NULL)
goto out;
Más información sobre la lista de distribución Ayuda