lkml.org 
[lkml]   [1998]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: uniform input device packets?
On 1998.06.25, Albert D. Cahalan <acahalan@cs.uml.edu> wrote:
> Oh, the bitfields are insane. This is local kernel --> app data
> transfer, caused by a human. It's not networking over a modem.
> It is better to just make everything 32-bit. If performance is
> really an issue, think about all the bitshifting you can avoid.

Well, let me put forth the question - what's more expensive
computationally, a bitshift or bitwise-and, or a 4-byte
read/memcopy?

I'd rather read 2 bytes and mangle their bits around rather than
having to, say, read 16 bytes to obtain the same amount of data.
Unless, you can tell me that it's faster to just read the 16
bytes.

Also, since we'll need to buffer these events in memory until
they're drained from the queue - having to queue 16 bytes per
event is *SO* wasteful of system resources (especially with
a large number of devices in this system). Say each device
queue is 16-events large (I *believe* this is what the PC
keyboard BIOS driver does, somewhere around 16 events). At
16-bytes an event, you're allocating a whole 256 bytes to
this queue. At 3 or even 4 bytes per event, you're only
using like 64 bytes per queue. Sounds like small numbers,
but depending on how large each event is, it adds up.

-Dossy

--
URL: http://www.panoptic.com/~dossy -< BORK BORK! >- E-MAIL: dossy@panoptic.com
Now I'm who I want to be, where I want to be, doing what I've always said I
would and yet I feel I haven't won at all... (Aug 9, 95: Goodbye, JG.)
"You should change your .sig; not that the world revolves around me." -s. sadie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.073 / U:0.384 seconds]
©2003-2014 Jasper Spaans. Advertise on this site