Hello, On Tue, Aug 13, 2013 at 11:46:29PM -0700, Andrew Morton wrote: > What does "nest" mean? lru_add_drain_all() calls itself recursively, > presumably via some ghastly alloc_percpu()->alloc_pages(GFP_KERNEL) > route? If that ever happens then we'd certainly want to know about it. > Hopefully PF_MEMALLOC would prevent infinite recursion. > > If "nest" means something else then please enlighten me! > > As for "doing it simultaneously", I assume we're referring to > concurrent execution from separate threads. If so, why would that "buy > us anything"? Confused. As long as each thread sees "all pages which > were in pagevecs at the time I called lru_add_drain_all() get spilled > onto the LRU" then we're good. afaict the implementation will do this.
I was wondering whether we can avoid all allocations by just pre-allocating all resources. If it can't call itself if we get rid of all allocations && running multiple instances of them doesn't buy us anything, the best solution would be allocating work items statically and synchronize their use using a mutex. That way the whole thing wouldn't need any allocation. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/