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.7 required=3.0 tests=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 C8344C2BB1D for ; Fri, 17 Apr 2020 07:28:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7C2CD21973 for ; Fri, 17 Apr 2020 07:28:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C2CD21973 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 030918E0003; Fri, 17 Apr 2020 03:28:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F246F8E0001; Fri, 17 Apr 2020 03:28:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E61628E0003; Fri, 17 Apr 2020 03:28:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id CBE4C8E0001 for ; Fri, 17 Apr 2020 03:28:26 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 96DBC8245571 for ; Fri, 17 Apr 2020 07:28:26 +0000 (UTC) X-FDA: 76716519012.05.cat11_49afd28b8cf4f X-HE-Tag: cat11_49afd28b8cf4f X-Filterd-Recvd-Size: 4047 Received: from mail-ot1-f66.google.com (mail-ot1-f66.google.com [209.85.210.66]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Fri, 17 Apr 2020 07:28:26 +0000 (UTC) Received: by mail-ot1-f66.google.com with SMTP id b13so706642oti.3 for ; Fri, 17 Apr 2020 00:28:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CAlxRW45me+SFTqp2fMa5KvZpf6cMRTo76EH5fkTTvc=; b=XpPfWRDX8LLhpToh4Npf37/4JE2RFBUybh2ArB0z5hC9OqIXpZeEJN9RMIIB0F6YTM /HLWQEEuGFSCuGZFQxa09/maER/MxUaveS2O+rKR2iJOAot9Xy8cKa+Q2TBu8wt8hDpP r3US19W3HNjipWbHEoUjiHMPOJZAlQTwrs9APx/cknAGaQmYVNnL7qR33wm6vXJAMZB9 Q6lKppeb/KmxWFeTqoPAVdD3Hh3lP5wnhWKqZ2NOu0F+Y/HRD9beRRXt/WRNw6/de0kt F2XomLGVnGWpkhxYhji+N6Vsv98bOBkQPKIv14xpMHZ1JO7hhVBn/A2akQLS8SKHGsyZ DLKA== X-Gm-Message-State: AGi0PuaKYuUpIc8Na4D+de5w+p0esB/yFVHX2voakDWS83YYwtBmKBmB NlOs4xS/SNoph4UWpCkVjxbTZ82qXOBx5Jq5cH4= X-Google-Smtp-Source: APiQypK7KuRAoPktsLMQh2Me8mfNzHEYpwL9p+AMo7Mc+i20vMVMtApNzN65ngvXei2FszcvDlo15xrOTNLy+/p43Ec= X-Received: by 2002:a9d:7590:: with SMTP id s16mr1548442otk.250.1587108505576; Fri, 17 Apr 2020 00:28:25 -0700 (PDT) MIME-Version: 1.0 References: <20200416220130.13343-1-willy@infradead.org> In-Reply-To: <20200416220130.13343-1-willy@infradead.org> From: Geert Uytterhoeven Date: Fri, 17 Apr 2020 09:28:14 +0200 Message-ID: Subject: Re: [PATCH v3 00/11] Make PageWriteback use the PageLocked optimisation To: Matthew Wilcox 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 Content-Type: text/plain; charset="UTF-8" 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, On Fri, Apr 17, 2020 at 12:01 AM Matthew Wilcox wrote: > 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 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 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? 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. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds