Re: performance-improvement-of-serial-console-via-virtual.patch added to -mm tree

From: Hironobu Ishii
Date: Tue Sep 13 2005 - 07:19:16 EST


Hi Russel,

The problem is that the console write method may be called prior to
autoconfig() being run for the port in question, so tx_loadsz may be
uninitialised.

Thank you for explanation.

> * if it has been initialised
> * how much data is already contained in the FIFO

Right, we can't know how many byte exist in the FIFO.
So this patch is waiting the FIFO becomes empty at first
by calling "wait_for_xmitr(up)".
(This is the same logic with original.)

After TX FIFO become empty, we can decide the available TX FIFO depth by up->tx_loadsize.

Only if you ignore the fact that tx_loadsz may not be initialised.

OK.
Before initialization, does tx_loadsz left 0?
If so, we can easily solve the problem:

tx_loadsz = (up->tx_loadsz ? up->tx_loadsz : 1); <-----
for (i = 0; i < count; ) {
int fifo;

wait_for_xmitr(up);
fifo = tx_loadsz; <------
.
.
.


Best regards,
Hironobu Ishii
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/