linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/11] Make PageWriteback use the PageLocked optimisation
@ 2020-04-16 22:01 Matthew Wilcox
  2020-04-16 22:01 ` [PATCH v3 01/11] alpha: Add clear_bit_unlock_is_negative_byte implementation Matthew Wilcox
                   ` (11 more replies)
  0 siblings, 12 replies; 15+ messages in thread
From: Matthew Wilcox @ 2020-04-16 22:01 UTC (permalink / raw)
  To: linux-mm, linux-fsdevel
  Cc: Matthew Wilcox (Oracle),
	linux-alpha, linux-ia64, linux-m68k, linux-mips, linux-riscv,
	linux-s390

From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

PageWaiters is used by PageWriteback and PageLocked (and no other page
flags), so it makes sense to use the same codepaths that have already been
optimised for PageLocked, even if there's probably no real performance
benefit to be had.

Unfortunately, clear_bit_unlock_is_negative_byte() isn't present on every
architecture, and the default implementation is only available in filemap.c
while I want to use it in page-writeback.c.  Rather than move the default
implementation to a header file, I've done optimised implementations for
alpha and ia64.  I can't figure out optimised implementations for m68k,
mips, riscv and s390, so I've just replicated the effect of the generic
implementation in them.  I leave it to the experts to fix that (... or
convert over to using asm-generic/bitops/lock.h ...)

v3:
 - Added implementations of clear_bit_unlock_is_negative_byte()
   to architectures which need it

v2: Rebased to 5.7-rc1
 - Split up patches better
 - Moved the BUG() from end_page_writeback() to __clear_page_writeback()
   as requested by Jan Kara.
 - Converted the BUG() to WARN_ON()
 - Removed TestClearPageWriteback

Matthew Wilcox (Oracle) (11):
  alpha: Add clear_bit_unlock_is_negative_byte implementation
  ia64: Add clear_bit_unlock_is_negative_byte implementation
  m68k: Add clear_bit_unlock_is_negative_byte implementation
  mips: Add clear_bit_unlock_is_negative_byte implementation
  riscv: Add clear_bit_unlock_is_negative_byte implementation
  s390: Add clear_bit_unlock_is_negative_byte implementation
  mm: Remove definition of clear_bit_unlock_is_negative_byte
  mm: Move PG_writeback into the bottom byte
  mm: Convert writeback BUG to WARN_ON
  mm: Use clear_bit_unlock_is_negative_byte for PageWriteback
  mm: Remove TestClearPageWriteback

 arch/alpha/include/asm/bitops.h | 23 ++++++++++++++++++
 arch/ia64/include/asm/bitops.h  | 20 ++++++++++++++++
 arch/m68k/include/asm/bitops.h  |  7 ++++++
 arch/mips/include/asm/bitops.h  |  7 ++++++
 arch/riscv/include/asm/bitops.h |  7 ++++++
 arch/s390/include/asm/bitops.h  |  9 +++++++
 include/linux/page-flags.h      |  8 +++----
 mm/filemap.c                    | 41 ++++----------------------------
 mm/page-writeback.c             | 42 ++++++++++++++++++++-------------
 9 files changed, 107 insertions(+), 57 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-04-23 15:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16 22:01 [PATCH v3 00/11] Make PageWriteback use the PageLocked optimisation Matthew Wilcox
2020-04-16 22:01 ` [PATCH v3 01/11] alpha: Add clear_bit_unlock_is_negative_byte implementation Matthew Wilcox
2020-04-16 22:01 ` [PATCH v3 02/11] ia64: " Matthew Wilcox
2020-04-16 22:01 ` [PATCH v3 03/11] m68k: " Matthew Wilcox
2020-04-16 22:01 ` [PATCH v3 04/11] mips: " Matthew Wilcox
2020-04-16 22:01 ` [PATCH v3 05/11] riscv: " Matthew Wilcox
2020-04-16 22:01 ` [PATCH v3 06/11] s390: " Matthew Wilcox
2020-04-16 22:01 ` [PATCH v3 07/11] mm: Remove definition of clear_bit_unlock_is_negative_byte Matthew Wilcox
2020-04-16 22:01 ` [PATCH v3 08/11] mm: Move PG_writeback into the bottom byte Matthew Wilcox
2020-04-16 22:01 ` [PATCH v3 09/11] mm: Convert writeback BUG to WARN_ON Matthew Wilcox
2020-04-23 15:58   ` Jan Kara
2020-04-16 22:01 ` [PATCH v3 10/11] mm: Use clear_bit_unlock_is_negative_byte for PageWriteback Matthew Wilcox
2020-04-16 22:01 ` [PATCH v3 11/11] mm: Remove TestClearPageWriteback Matthew Wilcox
2020-04-17  7:28 ` [PATCH v3 00/11] Make PageWriteback use the PageLocked optimisation Geert Uytterhoeven
2020-04-17 11:12   ` Matthew Wilcox

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).