hvconsole.c : possible problem

Hollis Blanchard hollisb at us.ibm.com
Sat May 1 04:15:13 EST 2004


On Apr 30, 2004, at 1:11 PM, Hollis Blanchard wrote:
>
> One more problem: let's say we have three of the four ring descriptors
> filled already. Then we do a read, and get three packets in 16 bytes.
> Then we have nowhere to put the remaining two.
>
> This could happen regardless of the size of the ring... I see only two
> solutions:
> - only do the read if three descriptors are available. Actually
> technically four, since we can fit the first byte of the fourth packet
> in a single read. I think we'd need to at least double the size of the
> ring in this case (adding another 1KB to BSS). Seems like a waste.
> - kmalloc ring descriptors as needed (264 bytes each). At least adding
> some complexity. Sigh.

... except I can't kmalloc() at initialization time because it's before
mem_init().

--
Hollis Blanchard
IBM Linux Technology Center


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list