mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + fs-bufferc-add-checking-buffer-head-stat-before-clear.patch added to -mm tree
@ 2021-02-05 23:47 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-02-05 23:47 UTC (permalink / raw)
  To: guoyang2, mm-commits, npiggin, viro, zhangshaokun


The patch titled
     Subject: fs/buffer.c: add checking buffer head stat before clear
has been added to the -mm tree.  Its filename is
     fs-bufferc-add-checking-buffer-head-stat-before-clear.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/fs-bufferc-add-checking-buffer-head-stat-before-clear.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/fs-bufferc-add-checking-buffer-head-stat-before-clear.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/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Yang Guo <guoyang2@huawei.com>
Subject: fs/buffer.c: add checking buffer head stat before clear

clear_buffer_new() is used to clear buffer new stat.  When PAGE_SIZE is
64K, most buffer heads in the list are not needed to clear. 
clear_buffer_new() has an enpensive atomic modification operation, Let's
add checking buffer head before clear it as __block_write_begin_int does
which is good for performance.

Link: https://lkml.kernel.org/r/1612332890-57918-1-git-send-email-zhangshaokun@hisilicon.com
Signed-off-by: Yang Guo <guoyang2@huawei.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/buffer.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/buffer.c~fs-bufferc-add-checking-buffer-head-stat-before-clear
+++ a/fs/buffer.c
@@ -2083,7 +2083,8 @@ static int __block_commit_write(struct i
 			set_buffer_uptodate(bh);
 			mark_buffer_dirty(bh);
 		}
-		clear_buffer_new(bh);
+		if (buffer_new(bh))
+			clear_buffer_new(bh);
 
 		block_start = block_end;
 		bh = bh->b_this_page;
_

Patches currently in -mm which might be from guoyang2@huawei.com are

fs-bufferc-add-checking-buffer-head-stat-before-clear.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-06  2:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 23:47 + fs-bufferc-add-checking-buffer-head-stat-before-clear.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).