Skip to content

Make PageWriteback use the PageLocked optimisation

Matthew Wilcox linux-alpha linux-fsdevel linux-ia64 linux-m68k linux-mips linux-mm linux-riscv linux-s390 oe-kbuild-all 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest11 patches 4 repliesIn review
  2. v25 patches 2 repliesSuperseded
  3. v12 patches 7 repliesSuperseded

Changes in v3 from the cover letter

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

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11alpha: Add clear_bit_unlock_is_negative_byte implementationarch/alpha/include/asm/bitops.h+23 -00 replies
2/11ia64: Add clear_bit_unlock_is_negative_byte implementationarch/ia64/include/asm/bitops.h+20 -01 reply
3/11m68k: Add clear_bit_unlock_is_negative_byte implementationarch/m68k/include/asm/bitops.h+7 -00 replies
4/11mips: Add clear_bit_unlock_is_negative_byte implementationarch/mips/include/asm/bitops.h+7 -00 replies
5/11riscv: Add clear_bit_unlock_is_negative_byte implementationarch/riscv/include/asm/bitops.h+7 -00 replies
6/11s390: Add clear_bit_unlock_is_negative_byte implementationarch/s390/include/asm/bitops.h+9 -00 replies
7/11mm: Remove definition of clear_bit_unlock_is_negative_bytemm/filemap.c+0 -230 replies
8/11mm: Move PG_writeback into the bottom byteinclude/linux/page-flags.h mm/filemap.c+5 -30 replies
9/11mm: Convert writeback BUG to WARN_ONmm/filemap.c mm/page-writeback.c+6 -31 reply
10/11mm: Use clear_bit_unlock_is_negative_byte for PageWritebackinclude/linux/page-flags.h mm/filemap.c mm/page-writeback.c+23 -280 replies
11/11mm: Remove TestClearPageWritebackinclude/linux/page-flags.h+1 -10 replies

Reviews trailers per patch

3 of 11 patches have a Reviewed-by or Acked-by.

PatchWilliam KucharskiJan Kara
1/11
2/11
3/11
4/11
5/11
6/11
7/11R-b
8/11R-b R-b
9/11
10/11R-b R-b
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/11] Make PageWriteback use the PageLocked optimisation

From: "Matthew Wilcox (Oracle)" <[email protected]>

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(-)
Signature · 1 line
2.25.1