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=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 11DE4C352BE for ; Thu, 16 Apr 2020 12:45:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CABC921D7E for ; Thu, 16 Apr 2020 12:45:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="zeXvRYDp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CABC921D7E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5C44F8E00AC; Thu, 16 Apr 2020 08:45:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 575118E0001; Thu, 16 Apr 2020 08:45:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 48B818E00AC; Thu, 16 Apr 2020 08:45:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0095.hostedemail.com [216.40.44.95]) by kanga.kvack.org (Postfix) with ESMTP id 2C34D8E0001 for ; Thu, 16 Apr 2020 08:45:45 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id D5A763A9B for ; Thu, 16 Apr 2020 12:45:44 +0000 (UTC) X-FDA: 76713689808.07.ball04_15074e057642c X-HE-Tag: ball04_15074e057642c X-Filterd-Recvd-Size: 3506 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Apr 2020 12:45:44 +0000 (UTC) Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BC457208E4; Thu, 16 Apr 2020 12:45:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587041143; bh=3KyXh0MP4mZkOqfe5RfSHynnSjW05VbwhqHccC5ChQc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=zeXvRYDpN5hER0ZYWmDihR/9Gyu/Tnb6knJ230KQEP4f8kvJmf59qXXNT1MPZaiZv vXln21iBv+OLcLG6INd/tUlvSZxH/MzlL0SROgo3XICa4569hBblXzQxcc+0Z/pitO ALxF2uK40XUPBwsEcwYbS6Q7RggxXG9Vp9HAXPSY= Date: Thu, 16 Apr 2020 13:45:39 +0100 From: Will Deacon To: Matthew Wilcox Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Will Deacon Subject: Re: [PATCH 1/2] mm: Remove definition of clear_bit_unlock_is_negative_byte Message-ID: <20200416124536.GA32565@willie-the-truck> References: <20200326122429.20710-1-willy@infradead.org> <20200326122429.20710-2-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200326122429.20710-2-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: Hi Matthew, Sorry I missed this, I'm over on @kernel.org now and don't have access to my old @arm.com address anymore. On Thu, Mar 26, 2020 at 05:24:28AM -0700, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > This local definition hasn't been used since commit 84c6591103db > ("locking/atomics, asm-generic/bitops/lock.h: Rewrite using > atomic_fetch_*()") which provided a default definition. > > Signed-off-by: Matthew Wilcox (Oracle) > Cc: Will Deacon > --- > mm/filemap.c | 23 ----------------------- > 1 file changed, 23 deletions(-) > > diff --git a/mm/filemap.c b/mm/filemap.c > index 80f7e1ae744c..312afbfcb49a 100644 > --- a/mm/filemap.c > +++ b/mm/filemap.c > @@ -1248,29 +1248,6 @@ void add_page_wait_queue(struct page *page, wait_queue_entry_t *waiter) > } > EXPORT_SYMBOL_GPL(add_page_wait_queue); > > -#ifndef clear_bit_unlock_is_negative_byte > - > -/* > - * PG_waiters is the high bit in the same byte as PG_lock. > - * > - * On x86 (and on many other architectures), we can clear PG_lock and > - * test the sign bit at the same time. But if the architecture does > - * not support that special operation, we just do this all by hand > - * instead. > - * > - * The read of PG_waiters has to be after (or concurrently with) PG_locked > - * being cleared, but a memory barrier should be unneccssary since it is > - * in the same byte as PG_locked. > - */ > -static inline bool clear_bit_unlock_is_negative_byte(long nr, volatile void *mem) > -{ > - clear_bit_unlock(nr, mem); > - /* smp_mb__after_atomic(); */ > - return test_bit(PG_waiters, mem); > -} > - > -#endif > - I'd really like to do this, but I worry that the generic definition still isn't available on all architectures depending on how they pull together their bitops.h. Have you tried building for alpha or s390? At a quick glance, they look like they might fall apart :( Will