On Tue, 5 Apr 2005 12:58:15 -0700 (PDT)
Christoph Lameter <christoph@xxxxxxxxxxx> wrote:
> On Tue, 5 Apr 2005, David S. Miller wrote:
>
> > > 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?
>
> We could make refcnt into an array of pointers that point to node specific
> memory. This avoids cache line bouncing. However, you cannot atomically
> dec_and_test an array. This is the only location where a dec_and_test is
> used on dst->__refcnt.
The dst object is already too large. You have to show a serious
performance improvement to justify bloating it up further.
> We can put an explicit barier in if that is the only reason for the
> atomic_dec_and_test.
Then we lose the optimizations of those memory barriers that platforms
do in their atomic_op assembly.
Let me check out if your assertions about dst_destroy() usage are correct
first, hold on for a bit.
|