[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FF1827A.7060806@jp.fujitsu.com>
Date: Mon, 02 Jul 2012 20:14:02 +0900
From: Kamezawa Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Sha Zhengju <handai.szj@...il.com>
CC: linux-mm@...ck.org, cgroups@...r.kernel.org, gthelen@...gle.com,
yinghan@...gle.com, akpm@...ux-foundation.org, mhocko@...e.cz,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
viro@...iv.linux.org.uk, linux-fsdevel@...r.kernel.org,
Sha Zhengju <handai.szj@...bao.com>
Subject: Re: [PATCH 3/7] Make TestSetPageDirty and dirty page accounting in
one func
(2012/06/28 20:01), Sha Zhengju wrote:
> From: Sha Zhengju <handai.szj@...bao.com>
>
> Commit a8e7d49a(Fix race in create_empty_buffers() vs __set_page_dirty_buffers())
> extracts TestSetPageDirty from __set_page_dirty and is far away from
> account_page_dirtied.But it's better to make the two operations in one single
> function to keep modular.So in order to avoid the potential race mentioned in
> commit a8e7d49a, we can hold private_lock until __set_page_dirty completes.
> I guess there's no deadlock between ->private_lock and ->tree_lock by quick look.
>
> It's a prepare patch for following memcg dirty page accounting patches.
>
> Signed-off-by: Sha Zhengju <handai.szj@...bao.com>
I think there is no problem with the lock order.
My small concern is the impact on the performance. IIUC, lock contention here can be
seen if multiple threads write to the same file in parallel.
Do you have any numbers before/after the patch ?
Thanks,
-Kmae
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists