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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux