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] [day] [month] [year] [list]
Date:	Thu, 8 Mar 2007 00:40:56 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Jiri Kosina <jikos@...os.cz>, Jon Ringle <JRingle@...tical.com>,
	linux-kernel@...r.kernel.org
Subject: Re: tiny tty driver sample

> > Unless data_size can be very large and high speed then you can replace the
> > lot with
> > 
> > 	if (tty_insert_flip_string(tty, data, data_size))
> > 		tty_flip_buffer_push(tty);
> > 
> 
> What does "very large and high speed" mean in this context?

The default behaviour is to generate buffers based upon perceived need
and then cycle them, so you tend to get chunks of 512 bytes or so. The
logic is abstracted into tty_buffer_find() so can easily be changed.

Some hardware at high speeds with big FIFOs (or virtualised interfaces)
produces big chunks of data in blocks with the size known at read time (eg
that with large fifos and 100 polls/sec) - for those you can avoid
generating a series of allocations or buffers by using the request_room
interface to hint the size of the buffer you will actually need.

-
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