From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BA68C352BE for ; Thu, 16 Apr 2020 22:01:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D676922209 for ; Thu, 16 Apr 2020 22:01:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="JYt02rkp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D676922209 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 66EFB8E00E4; Thu, 16 Apr 2020 18:01:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6201C8E00BC; Thu, 16 Apr 2020 18:01:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 50CFD8E00E5; Thu, 16 Apr 2020 18:01:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0197.hostedemail.com [216.40.44.197]) by kanga.kvack.org (Postfix) with ESMTP id 30D3D8E00BC for ; Thu, 16 Apr 2020 18:01:34 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id EDC3D52B0 for ; Thu, 16 Apr 2020 22:01:33 +0000 (UTC) X-FDA: 76715090466.09.force45_47d8637d8a053 X-HE-Tag: force45_47d8637d8a053 X-Filterd-Recvd-Size: 4062 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Apr 2020 22:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=14Ju6mOxlL9LJIOW/FTdgj6GivNAEkcDFvA+NJF0hh4=; b=JYt02rkpIxLfSksSlE8uemCZJq N29XAVZHY7OEQvLCJGet9/lu5zO/JUGTcdn00BySeshPpZCf/rvt9a7GTwJLh6H1xxB5LRy+QyGPZ BW2AFaaBs1sem3PR6wwbngwpAztHsiQKTqy/R4L79NzCmct41xrxivbxMO7w0ZxV0ToiMGIbKnvMc 0G7gWn4xcHuLLox0Q8llw7ntoQ1JNfa4wv2md27c7fC/btqps3kYVlOAJXoqIebqSAsIjWbrpG9uo e1Yhwm0NNyim/bJtFBeTOmOQME265mnMLU9/9JVkpFsFi9XCHklAD9kSxEzpIsNYum1HMA/pfVxwO NZXY37Hw==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jPCZg-0003U8-Ca; Thu, 16 Apr 2020 22:01:32 +0000 From: Matthew Wilcox To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org Subject: [PATCH v3 00/11] Make PageWriteback use the PageLocked optimisation Date: Thu, 16 Apr 2020 15:01:19 -0700 Message-Id: <20200416220130.13343-1-willy@infradead.org> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: "Matthew Wilcox (Oracle)" PageWaiters is used by PageWriteback and PageLocked (and no other page flags), so it makes sense to use the same codepaths that have already bee= n 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(-) --=20 2.25.1