[lkml]   [2005]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [linux-usb-devel] Re: [PATCH 00/10] usb-serial: Switches from spin lock to atomic_t.
    On Tue, 6 Dec 2005 23:48:14 +0100
    Oliver Neukum <> wrote:

    | Am Dienstag, 6. Dezember 2005 21:13 schrieb Eduardo Pereira Habkost:
    | > Anyway, I don't see yet why the atomic_t would make the code slower on
    | > non-smp. Is atomic_add_unless(v, 1, 1) supposed to be slower than
    | > 'if (!v) v = 1;' ?
    | spin_lock() can be dropped on UP. atomic_XXX must either use an operation
    | on main memory, meaning less efficient code generation, or must disable
    | interrupts even on UP.

    Hmmm, I didn't know about the possibility to disable interrupts.

    In the OOPS thread:

    *IIUC*, Greg told us that we could think about the possibility to drop
    the spin lock and use the semaphore instead, because URB writes are slow.

    We (me and Eduardo) didn't like it because we would be using the same
    lock for two different problems, so we suggested the atomic_t, and Greg
    agreed (IIRC).

    Isn't it right? Is the URB write so fast that switching to atomic_t
    doesn't pay-off?

    Luiz Fernando N. Capitulino
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-12-07 13:26    [W:0.020 / U:155.780 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site