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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 0D4A7C2D0E8 for ; Thu, 26 Mar 2020 12:40:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C195020748 for ; Thu, 26 Mar 2020 12:40:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C195020748 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 56BB46B0092; Thu, 26 Mar 2020 08:40:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 51C5B6B0093; Thu, 26 Mar 2020 08:40:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 431406B0095; Thu, 26 Mar 2020 08:40:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0094.hostedemail.com [216.40.44.94]) by kanga.kvack.org (Postfix) with ESMTP id 2A3C66B0092 for ; Thu, 26 Mar 2020 08:40:50 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 1AD1C180AD81A for ; Thu, 26 Mar 2020 12:40:50 +0000 (UTC) X-FDA: 76637472660.09.sun20_41719c462a05b X-HE-Tag: sun20_41719c462a05b X-Filterd-Recvd-Size: 2131 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Mar 2020 12:40:49 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E788FAC65; Thu, 26 Mar 2020 12:40:47 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 98D2F1E10FD; Thu, 26 Mar 2020 13:40:47 +0100 (CET) Date: Thu, 26 Mar 2020 13:40:47 +0100 From: Jan Kara To: Matthew Wilcox Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 2/2] mm: Use clear_bit_unlock_is_negative_byte for PageWriteback Message-ID: <20200326124047.GA13756@quack2.suse.cz> References: <20200326122429.20710-1-willy@infradead.org> <20200326122429.20710-3-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200326122429.20710-3-willy@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) 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: On Thu 26-03-20 05:24:29, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > By moving PG_writeback down into the low bits of the page flags, we can > use clear_bit_unlock_is_negative_byte() for writeback as well as the > lock bit. wake_up_page() then has no more callers. Given the other > code being executed between the clear and the test, this is not going > to be as dramatic a win as it was for PageLocked, but symmetry between > the two is nice and lets us remove some code. > > Signed-off-by: Matthew Wilcox (Oracle) The patch looks good to me. Just one nit: > + VM_BUG_ON_PAGE(!PageWriteback(page), page); > + if (__clear_page_writeback(page)) > + wake_up_page_bit(page, PG_writeback); Since __clear_page_writeback() isn't really prepared for PageWriteback() not being set, can we move the VM_BUG_ON_PAGE() there? Otherwise feel free to add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR