lkml.org 
[lkml]   [2005]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [linux-usb-devel] Re: [PATCH 00/10] usb-serial: Switches from spin lock to atomic_t.
    On Wed, 7 Dec 2005, Arjan van de Ven wrote:

    > > On the other hand, Oliver needs to be careful about claiming too much. In
    > > general atomic_t operations _are_ superior to the spinlock approach.
    >
    > No they're not. Both are just about equally expensive cpu wise,
    > sometimes the atomic_t ones are a bit more expensive (like on parisc
    > architecture). But on x86 in either case it's a locked cycle, which is
    > just expensive no matter which side you flip the coin...

    You're overgeneralizing.

    Sure, a locked cycle has a certain expense. But it's a lot less than the
    expense of a contested spinlock. On the other hand, many times UP systems
    can eliminate spinlocks entirely. There are lots of variables and many
    possible tradeoffs.

    Alan Stern

    -
    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-12-07 17:04    [W:3.932 / U:1.912 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site