lkml.org 
[lkml]   [2008]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] amiflop: get rid of sleep_on calls
    On Tue, Dec 09, 2008 at 09:26:08AM +0100, Joerg Dorchain wrote:
    > On Mon, Dec 08, 2008 at 04:59:38PM +0000, Andreas Bombe wrote:
    > > The replacement for the unconditional sleep_on() in fd_motor_on() is a
    > > complete_all() together with a INIT_COMPLETION() before the mod_timer()
    > > call. It appears to me that fd_motor_on() might be called concurrently
    > > and fd_select() does not guarantee mutual exclusivity in the case the
    > > same drive gets selected again.
    >
    > Selecting the same drive repeatly does not matter. The selected
    > drive is the one the next command or transfer applies to.

    I think we're not talking about the same problem. If I were to use
    complete() together with wait_for_completion() there would be a problem
    if fd_motor_on() can get as far as wait_for_completion() while a
    previous completion is yet uncompleted. This can not happen for
    different drives, as the fd_select() would block. If it could happen
    for the same drive, the complete() would allow only one task to
    continue. The complete_all() takes care of that.

    If requests are serialized for a drive so that there won't ever be two
    running at the same time for certain (thinking about it, it's probable),
    I could make it a simple complete(). It's hardly worth the risk,
    however.


    \
     
     \ /
      Last update: 2008-12-10 02:17    [W:0.020 / U:2.400 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site