Subject: Re: q_to_b() question
To: Jaromír Dolecek <dolecek@ibis.cz>
From: Chris G. Demetriou <cgd@sibyte.com>
List: tech-kern
Date: 09/20/2000 08:40:38
dolecek@ibis.cz (Jaromír Dolecek) writes:
> Would it make sense to add uio-aware versions of those
> two functions (either add new q_to_u() and u_to_q()), so that
> the I/O would happen directly to/from userland and
> one memory-to-memory copy would be avoided ? This would primarily
> have some effect for pty's, but might also save a few cycles
> in the keyboard/mouse drivers.

Premature optimization is the root of all evil.

I'd suggest actually demonstrating that this coding style has some
measurable, non-trivial cost before going off and optimizing it...
and then actually commiting any optimization if there's measurable
improvement.

It's not like applications you quote are often considered
"bandwidth-intensive" drivers, though you could potentially push a
bunch of data through PTYs.


Anyway, the point is: "sense" in this case shouldn't be initially
determined by a few voices on this mailing list.  Rather it should be
first determined by performance measurement and analysis.



cgd