Messages in this thread Patch in this message | | | Date | Fri, 8 Jun 2007 11:16:13 -0700 (PDT) | From | Christoph Lameter <> | Subject | Re: [patch 00/12] Slab defragmentation V3 |
| |
On Fri, 8 Jun 2007, Michal Piotrowski wrote:
> bash shared mapping + your script in a loop > while true; do sudo ./run.sh; done > res3.txt
Hmmmm... Seems to be triggered from the reclaim path kmem_cache_defrag rather than the manual triggered one from the script. Taking the slub_lock on the reclaim path is an issue it seems.
Maybe we need to do a trylock in kmem_cache_defrag to defuse the situation? This is after all an optimization so we can bug out.
Does this fix it?
--- mm/slub.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Index: slub/mm/slub.c =================================================================== --- slub.orig/mm/slub.c 2007-06-08 11:12:40.000000000 -0700 +++ slub/mm/slub.c 2007-06-08 11:14:34.000000000 -0700 @@ -2738,7 +2738,9 @@ int kmem_cache_defrag(int percent, int n unsigned long pages = 0; void *scratch; - down_read(&slub_lock); + if (!down_read_trylock(&slub_lock)) + return 0; + list_for_each_entry(s, &slab_caches, list) { /*
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |