Search String: Display: Description: Sort:

Results:

References: [ +subject:/^(?:^\s*(re|sv|fwd|fw)[\[\]\d]*[:>-]+\s*)*atomic_dec_and_test\s+for\s+child\s+dst\s+needed\s+in\s+dst_destroy\?\s*$/: 48 ]

Total 48 documents matching your query.

1. atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Christoph Lameter <christoph@xxxxxxxxxxx>
Date: Tue, 5 Apr 2005 11:55:45 -0700 (PDT)
It seems that the atomic_dec_and_test for the child dst in net/core/dst.c is really not needed since dst_destroy cannot be called simultanously for the same dst (frees dst unconditionally via kmem_ca
/archives/netdev/2005-04/msg00254.html (9,812 bytes)

2. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Tue, 5 Apr 2005 12:34:38 -0700
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 alon
/archives/netdev/2005-04/msg00256.html (9,416 bytes)

3. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Christoph Lameter <christoph@xxxxxxxxxxx>
Date: Tue, 5 Apr 2005 12:47:09 -0700 (PDT)
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 ato
/archives/netdev/2005-04/msg00257.html (10,109 bytes)

4. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Tue, 5 Apr 2005 12:50:14 -0700
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 thi
/archives/netdev/2005-04/msg00259.html (10,349 bytes)

5. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Christoph Lameter <christoph@xxxxxxxxxxx>
Date: Tue, 5 Apr 2005 12:58:15 -0700 (PDT)
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 whe
/archives/netdev/2005-04/msg00262.html (11,070 bytes)

6. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Tue, 5 Apr 2005 13:12:59 -0700
The dst object is already too large. You have to show a serious performance improvement to justify bloating it up further. Then we lose the optimizations of those memory barriers that platforms do in
/archives/netdev/2005-04/msg00264.html (11,361 bytes)

7. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 06 Apr 2005 07:45:06 +1000
This is racy (albeit very unlikely) because dst may be freed by dst_run_gc after the atomic_dec. When we are not the real parent of the dst (e.g., when we're xfrm_dst and the child is an rtentry), it
/archives/netdev/2005-04/msg00270.html (12,304 bytes)

8. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Tue, 5 Apr 2005 14:48:53 -0700
Good catch Herbert, I'll apply this.
/archives/netdev/2005-04/msg00271.html (10,424 bytes)

9. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Christoph Lameter <christoph@xxxxxxxxxxx>
Date: Tue, 5 Apr 2005 15:14:26 -0700 (PDT)
If that is so then it is also possible that the gc frees after atomic_dec_and_test: cpu0 dst_destroy cpu1 dst_run_gc atomic_dec_and_test(refcnt) if (atomic_read(refcnt)) ... .. dst_destroy(dst) kmem_
/archives/netdev/2005-04/msg00272.html (10,689 bytes)

10. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 06 Apr 2005 12:19:12 +1000
No this is prevented by the nohash check. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP
/archives/netdev/2005-04/msg00276.html (10,801 bytes)

11. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Christoph Lameter <christoph@xxxxxxxxxxx>
Date: Tue, 5 Apr 2005 20:19:55 -0700 (PDT)
Ok then the purpose of this whole thing is to decrement the usage counter and at the same time figure out if this is the last child on an unhashed entry. That unhashed entry is not handled by the gar
/archives/netdev/2005-04/msg00279.html (10,961 bytes)

12. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 06 Apr 2005 18:32:54 +1000
Yep you're totally correct. In fact, the atomic_dec_and_test is really only needed for unhashed entries (i.e., IPsec). So we could do something like this so that all hashed entries undergo atomic_dec
/archives/netdev/2005-04/msg00285.html (12,744 bytes)

13. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Wed, 6 Apr 2005 11:17:21 -0700
See his other emails in this thread. If it can be converted to atomic_dec() then he wants to change the counter into an array of counters on NUMA systems. But his trick only works if the atomic_dec_a
/archives/netdev/2005-04/msg00306.html (11,278 bytes)

14. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Christoph Lameter <christoph@xxxxxxxxxxx>
Date: Wed, 6 Apr 2005 11:48:50 -0700 (PDT)
Correct. Some changes to the way locking is done between the garbage collector and dst_destroy would be necessary. Lets see if the author of the patch can come up with a solution to this.
/archives/netdev/2005-04/msg00309.html (11,140 bytes)

15. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Apr 2005 21:07:24 +1000
OK I've thought more about this and indeed it is possible to get rid of atomic_dec_and_test. As you can see from my previous patch, it is possible to restrict the use of atomic_dec_and_test to the NO
/archives/netdev/2005-04/msg00325.html (12,437 bytes)

16. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Christoph Lameter <christoph@xxxxxxxxxxx>
Date: Thu, 7 Apr 2005 09:00:51 -0700 (PDT)
In an earlier email you said that there was a slight chance that child entries (typically NOHASH from what I can see in the code) could be on the gc list. If its not on the hash table and not on the
/archives/netdev/2005-04/msg00337.html (12,167 bytes)

17. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 8 Apr 2005 07:25:04 +1000
Only child entries with NOHASH unset can be on the GC list. For NOHASH entries refcnt can be greater than one due to dst_pop. Of course concurrent access is possible. However, the important thing is
/archives/netdev/2005-04/msg00354.html (13,138 bytes)

18. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Christoph Lameter <christoph@xxxxxxxxxxx>
Date: Thu, 7 Apr 2005 15:30:28 -0700 (PDT)
So in case f.e. the refcnt was 2 for a child NOHASH entry, then we decrement the refcnt for the child but do not free it. However after dst_destroy the parent is gone and presumably some skb->dst are
/archives/netdev/2005-04/msg00361.html (12,113 bytes)

19. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 8 Apr 2005 09:07:38 +1000
If the refcnt is non-zero after the atomic_dec and the entry is NOHASH, we return it and the caller will add it to the GC list. See the relevant section in dst_run_gc and dst_free. Cheers, -- Visit O
/archives/netdev/2005-04/msg00363.html (12,319 bytes)

20. Re: atomic_dec_and_test for child dst needed in dst_destroy? (score: 1)
Author: Christoph Lameter <christoph@xxxxxxxxxxx>
Date: Thu, 7 Apr 2005 22:45:02 -0700 (PDT)
That was just some C code to explain what I meant. Here is a patch against 2.6.12-rc2 with explanations as to what exactly is going on with __refcnt so that we can avoid future confusion about this p
/archives/netdev/2005-04/msg00393.html (14,585 bytes)


This search system is powered by Namazu