| To: | "David S. Miller" <davem@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: atomic_dec_and_test for child dst needed in dst_destroy? |
| From: | Christoph Lameter <christoph@xxxxxxxxxxx> |
| Date: | Tue, 5 Apr 2005 12:47:09 -0700 (PDT) |
| Cc: | netdev@xxxxxxxxxxx |
| In-reply-to: | <20050405123438.28f02423.davem@davemloft.net> |
| References: | <Pine.LNX.4.58.0504051155260.13697@server.graphe.net> <20050405123438.28f02423.davem@davemloft.net> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Tue, 5 Apr 2005, David S. Miller wrote: > 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? > 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. 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. |
| Previous by Date: | Re: atomic_dec_and_test for child dst needed in dst_destroy?, David S. Miller |
|---|---|
| Next by Date: | Re: [PATCH] netem: account for packets in delayed queue in qlen, Patrick McHardy |
| Previous by Thread: | Re: atomic_dec_and_test for child dst needed in dst_destroy?, David S. Miller |
| Next by Thread: | Re: atomic_dec_and_test for child dst needed in dst_destroy?, David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |