lkml.org 
[lkml]   [2005]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: performance-improvement-of-serial-console-via-virtual.patch added to -mm tree
Date
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-13 14:21    [W:0.080 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site