The patch titled Subject: ocfs2: do not lock/unlock() inode DLM lock has been added to the -mm tree. Its filename is ocfs2-do-not-lock-unlock-inode-dlm-lock.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ocfs2-do-not-lock-unlock-inode-dlm-lock.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-do-not-lock-unlock-inode-dlm-lock.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx> Subject: ocfs2: do not lock/unlock() inode DLM lock DLM does not cache locks. So, blocking lock and unlock will only make the performance worse where contention over the locks is high. Signed-off-by: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx> Cc: Mark Fasheh <mfasheh@xxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Cc: Junxiao Bi <junxiao.bi@xxxxxxxxxx> Cc: Joseph Qi <joseph.qi@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/dlmglue.c | 8 -------- 1 file changed, 8 deletions(-) diff -puN fs/ocfs2/dlmglue.c~ocfs2-do-not-lock-unlock-inode-dlm-lock fs/ocfs2/dlmglue.c --- a/fs/ocfs2/dlmglue.c~ocfs2-do-not-lock-unlock-inode-dlm-lock +++ a/fs/ocfs2/dlmglue.c @@ -2438,12 +2438,6 @@ bail: * done this we have to return AOP_TRUNCATED_PAGE so the aop method * that called us can bubble that back up into the VFS who will then * immediately retry the aop call. - * - * We do a blocking lock and immediate unlock before returning, though, so that - * the lock has a great chance of being cached on this node by the time the VFS - * calls back to retry the aop. This has a potential to livelock as nodes - * ping locks back and forth, but that's a risk we're willing to take to avoid - * the lock inversion simply. */ int ocfs2_inode_lock_with_page(struct inode *inode, struct buffer_head **ret_bh, @@ -2455,8 +2449,6 @@ int ocfs2_inode_lock_with_page(struct in ret = ocfs2_inode_lock_full(inode, ret_bh, ex, OCFS2_LOCK_NONBLOCK); if (ret == -EAGAIN) { unlock_page(page); - if (ocfs2_inode_lock(inode, ret_bh, ex) == 0) - ocfs2_inode_unlock(inode, ex); ret = AOP_TRUNCATED_PAGE; } _ Patches currently in -mm which might be from rgoldwyn@xxxxxxxx are ocfs2-do-not-lock-unlock-inode-dlm-lock.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html