From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:39836 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751092AbdFZHBC (ORCPT ); Mon, 26 Jun 2017 03:01:02 -0400 Subject: Patch "fs/dax.c: fix inefficiency in dax_writeback_mapping_range()" has been added to the 4.9-stable tree To: jack@suse.cz, akpm@linux-foundation.org, dan.j.williams@intel.com, gregkh@linuxfoundation.org, ross.zwisler@linux.intel.com, torvalds@linux-foundation.org Cc: , From: Date: Mon, 26 Jun 2017 08:15:51 +0200 Message-ID: <14984577513933@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled fs/dax.c: fix inefficiency in dax_writeback_mapping_range() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: fs-dax.c-fix-inefficiency-in-dax_writeback_mapping_range.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 1eb643d02b21412e603b42cdd96010a2ac31c05f Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Fri, 23 Jun 2017 15:08:46 -0700 Subject: fs/dax.c: fix inefficiency in dax_writeback_mapping_range() From: Jan Kara commit 1eb643d02b21412e603b42cdd96010a2ac31c05f upstream. dax_writeback_mapping_range() fails to update iteration index when searching radix tree for entries needing cache flushing. Thus each pagevec worth of entries is searched starting from the start which is inefficient and prone to livelocks. Update index properly. Link: http://lkml.kernel.org/r/20170619124531.21491-1-jack@suse.cz Fixes: 9973c98ecfda3 ("dax: add support for fsync/sync") Signed-off-by: Jan Kara Reviewed-by: Ross Zwisler Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- fs/dax.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/dax.c +++ b/fs/dax.c @@ -895,6 +895,7 @@ int dax_fault(struct vm_area_struct *vma } else { return dax_load_hole(mapping, entry, vmf); } + start_index = indices[pvec.nr - 1] + 1; } /* Filesystem should not return unwritten buffers to us! */ Patches currently in stable-queue which might be from jack@suse.cz are queue-4.9/fs-dax.c-fix-inefficiency-in-dax_writeback_mapping_range.patch