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:50:14 -0700
Cc: netdev@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.58.0504051238390.14264@xxxxxxxxxxxxxxxxx>
References: <Pine.LNX.4.58.0504051155260.13697@xxxxxxxxxxxxxxxxx> <20050405123438.28f02423.davem@xxxxxxxxxxxxx> <Pine.LNX.4.58.0504051238390.14264@xxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Tue, 5 Apr 2005 12:47:09 -0700 (PDT)
Christoph Lameter <christoph@xxxxxxxxxxx> wrote:

> Correct that applies in general. But what could go wrong if the atomic_dec
> is separated from the atomic_read in this specific location?
> 
> I fail to see what the point of having a single instance of
> atomic_dec_and_test for __refcnt is. In particular since the upper layers
> guarantee that dst_destroy is not called multiple times for the same dst
> entry.

If this is true, what performance improvement could you possibly be
seeing from this change?

I know you are making this change for performance reasons, yet you
aren't mentioning any details about this.  That information is
part of what we need to know to judge this change.

I've very hesistant to undo atomic operation memory barriers, after
all of the weird problems we had in the neighbour cache.

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