lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 5 Oct 2006 14:09:31 +0200
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Evgeniy Polyakov <johnpol@....mipt.ru>
Cc:	Ulrich Drepper <drepper@...il.com>,
	lkml <linux-kernel@...r.kernel.org>,
	David Miller <davem@...emloft.net>,
	Ulrich Drepper <drepper@...hat.com>,
	Andrew Morton <akpm@...l.org>, netdev <netdev@...r.kernel.org>,
	Zach Brown <zach.brown@...cle.com>,
	Christoph Hellwig <hch@...radead.org>,
	Chase Venters <chase.venters@...entec.com>,
	Johann Borck <johann.borck@...sedata.com>
Subject: Re: [take19 1/4] kevent: Core files.

On Thursday 05 October 2006 12:55, Evgeniy Polyakov wrote:
> On Thu, Oct 05, 2006 at 12:45:03PM +0200, Eric Dumazet (dada1@...mosbay.com) 
> >
> > What is missing or not obvious is : If events are skipped because of
> > overflows, What happens ? Connections stuck forever ? Hope that
> > everything will restore itself ? Is kernel able to SIGNAL this problem to
> > user land ?
>
> Exisitng  code does not overflow by design, but can consume a lot of
> memory. I talked about the case, when there will be some limit on
> number of entries put into mapped buffer.

You still dont answer my question. Please answer the question.
Recap : You have a max of XXXX events queued. A network message come and 
kernel want to add another event. It cannot because limit is reached. How the 
User Program knows that this problem was hit ?


> It is the same.
> What if reing buffer was grown upto 3 entry, and is now empty, and we
> need to put there 4 entries? Grow it again?
> It can be done, easily, but it looks like a workaround not as solution.
> And it is highly unlikely that in situation, when there are a lot of
> event, ring can be empty.

I dont speak of re-allocation of ring buffer. I dont care to allocate at 
startup a big enough buffer.

Say you have allocated a ring buffer of 1024*1024 entries.
Then you queue 100 events per second, and dequeue them immediatly.
No need to blindly use all 1024*1024 slots in the ring buffer, doing 
index = (index+1)%(1024*1024)



> epoll() does not have mmap.
> Problem is not about how many events can be put into the kernel, but how
> many of them can be put into mapped buffer.
> There is no problem if mmap is turned off.

So zap mmap() support completely, since it is not usable at all. We wont 
discuss on it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ