netdev
[Top] [All Lists]

Re: atomic_dec_and_test for child dst needed in dst_destroy?

To: Christoph Lameter <christoph@xxxxxxxxxxx>
Subject: Re: atomic_dec_and_test for child dst needed in dst_destroy?
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Tue, 5 Apr 2005 12:34:38 -0700
Cc: netdev@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.58.0504051155260.13697@xxxxxxxxxxxxxxxxx>
References: <Pine.LNX.4.58.0504051155260.13697@xxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Tue, 5 Apr 2005 11:55:45 -0700 (PDT)
Christoph Lameter <christoph@xxxxxxxxxxx> wrote:

> Is the atomic_dec_and_test in dst_destroy just there to join two atomic
> operations into one without being necessary for the correctness of freeing
> dsts?

Otimizing big SGI NUM systems again, are you?  :-)

atomic_dec() has no memory ordering guarentees, only the atomic
routines returning values do the proper SMP memory barriers.
So, based upon this alone I don't think your change is valid.

I've even documented this fully, see Documentation/atomic_ops.txt

<Prev in Thread] Current Thread [Next in Thread>