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=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 D7A0EC352BE for ; Fri, 17 Apr 2020 11:12:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7F040221EA for ; Fri, 17 Apr 2020 11:12:40 +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="YYrgq/hv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F040221EA 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 CCFDD8E000B; Fri, 17 Apr 2020 07:12:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C80C68E0001; Fri, 17 Apr 2020 07:12:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B96678E000B; Fri, 17 Apr 2020 07:12:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0245.hostedemail.com [216.40.44.245]) by kanga.kvack.org (Postfix) with ESMTP id A62D38E0001 for ; Fri, 17 Apr 2020 07:12:39 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5656768A5 for ; Fri, 17 Apr 2020 11:12:39 +0000 (UTC) X-FDA: 76717084038.24.hose59_8b8ab60031335 X-HE-Tag: hose59_8b8ab60031335 X-Filterd-Recvd-Size: 3172 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Fri, 17 Apr 2020 11:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=8sFIV+/8fWUY1Zbo7nie6mENpkyN/bnZv7/UFlj2FCU=; b=YYrgq/hvPgReVdxVWoGhcDq5OH bTtip9uQNfhfbbmBEukbzi+TjuaHGEoFqG47UgzsbLv240p6s/vtR8k6s1thPihwHGajzkKlVVXpb nTTfBMJZn8WTuTDH4+oh/r6SS4ofu22zRjXRhVOqlSJKl6Mz6q3qvnI+JsCN1nx3obijkON7+ZOYG 5B53aEmaqbpH41A0CRp9eYifRtoWPLrLG/9sLsiac6odvXQ9wBPqGH5QZSR6Ui9lTNY5WmIpcj0Oc RVS1FKCoO8b2LZuXy4Lj1EXODCGwav1Un8/U+rzwjHrv5kedEqM/tsdpghQBno3bTfzS/+mjkfCm7 Z6SzouSw==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jPOvB-0006uy-Fk; Fri, 17 Apr 2020 11:12:33 +0000 Date: Fri, 17 Apr 2020 04:12:33 -0700 From: Matthew Wilcox To: Geert Uytterhoeven Cc: Linux MM , Linux FS Devel , linux-s390 , "linux-ia64@vger.kernel.org" , "open list:BROADCOM NVRAM DRIVER" , linux-m68k , alpha , linux-riscv@lists.infradead.org Subject: Re: [PATCH v3 00/11] Make PageWriteback use the PageLocked optimisation Message-ID: <20200417111233.GL5820@bombadil.infradead.org> References: <20200416220130.13343-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Fri, Apr 17, 2020 at 09:28:14AM +0200, Geert Uytterhoeven wrote: > On Fri, Apr 17, 2020 at 12:01 AM Matthew Wilcox wrote: > > v3: > > - Added implementations of clear_bit_unlock_is_negative_byte() > > to architectures which need it > > I have two questions here? > 1. Why not implement arch_clear_bit_unlock_is_negative_byte() > instead, so the kasan check in asm-generic is used everywhere? That would be a larger change. As I understand it (and I may misunderstand it), I would need to rename all the clear_bit(), __clear_bit(), change_bit(), ... functions to have an 'arch_' prefix and then include instrumented-lock.h > 2. Why not add the default implementation to > include/asm-generic/bitops/instrumented-lock.h, in case an arch_*() > variant is not provided yet? > > Note that you did 1 for s390. Well, s390 already uses instrumented-lock.h so I followed along with what they're doing. I don't think instrumented-lock.h is used at all on these other architectures, but the whole bitops header files are such a mess that I could easily have built a completely wrong mental model of what's going on.