On Thu, 7 Oct 2010 15:24:22 +0900 KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote: > Greg, I think clear_page_writeback() will not require _any_ locks with this patch. > But set_page_writeback() requires it... > (Maybe adding a special function for clear_page_writeback() is better rather than > adding some complex to switch() in update_page_stat()) > I'm testing a code like this. == /* pc->mem_cgroup is unstable ? */ if (unlikely(mem_cgroup_stealed(mem))) { /* take a lock against to access pc->mem_cgroup */ if (!in_interrupt()) { lock_page_cgroup(pc); need_unlock = true; mem = pc->mem_cgroup; if (!mem || !PageCgroupUsed(pc)) goto out; } else if (idx == MEMCG_NR_FILE_WRITEBACK && (val < 0)) { /* This is allowed */ } else BUG(); } == Thanks, -Kame -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>