lkml.org 
[lkml]   [2009]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] hvc_console: returning 0 from put_chars is not an error
Christian Borntraeger wrote:
> Hmmm, if we are ok with having both options, we should let the hvc backend
> decide if it wants to drain or to discard.
>
> If we just busy loop, it actually does not matter how we let hvc_console react
> on 0, as long as we adopt all backends to use that interface consistent.
>
> On the other hand, backends might want to do special magic on congestion so I
> personally tend to let the backend loop instead of hvc_console. But I am really
> not sure.

The reason that we're asking for this change is that I have an hvc client driver that drops characters during heavy printk() output. hvc calls my driver, but the output buffer is still full, so the driver just returns 0.

If I add a spin-loop in the driver, then we don't need to change hvc, but now the driver is blocking during user-space print operations (via hvc_write and hvc_push).

--
Timur Tabi
Linux kernel developer at Freescale


\
 
 \ /
  Last update: 2009-10-15 21:01    [W:1.676 / U:1.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site