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.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 DA481C43603 for ; Thu, 12 Dec 2019 01:41:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 97BCE2077B for ; Thu, 12 Dec 2019 01:41:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="KgSvodEa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97BCE2077B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0A4A36B3502; Wed, 11 Dec 2019 20:41:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0555F6B3503; Wed, 11 Dec 2019 20:41:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EADB66B3504; Wed, 11 Dec 2019 20:41:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0246.hostedemail.com [216.40.44.246]) by kanga.kvack.org (Postfix) with ESMTP id D66686B3502 for ; Wed, 11 Dec 2019 20:41:37 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 849688249980 for ; Thu, 12 Dec 2019 01:41:37 +0000 (UTC) X-FDA: 76254787434.18.lead20_8288dfd46000c X-HE-Tag: lead20_8288dfd46000c X-Filterd-Recvd-Size: 5022 Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Dec 2019 01:41:36 +0000 (UTC) Received: by mail-lj1-f194.google.com with SMTP id e10so346698ljj.6 for ; Wed, 11 Dec 2019 17:41:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qkGwL2n2COMGi/65rr06OKZlwq6a94CxCGW0s5lEfc0=; b=KgSvodEa7eLrcqdNK9kKIImqn5jEmRctWpRgCEnbVU+jw3hmZb5+262OnTWzIHVrKB 4bckfwrJrGys15oOES9fMPyMF2VG1oJxHymVlnVo7XzOorvhCUqVrbg00X+UKrC2vXFo SG8r+gelbxFlvgfg2uzQmA5lr/M+IXcQCtoKA= 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=qkGwL2n2COMGi/65rr06OKZlwq6a94CxCGW0s5lEfc0=; b=MQNwx3D8ITz1WeuQseeLwGU5D6fkZd+vbrpqM2/JIqIrNgJZl4yuUfzDlQqE7IHdkG aUx7tLEkKcllRSw9QMuDTNe3DaaPhU5rfAun6D7FDXjrRMkFrv33Y80fHiWRYweY/Hii +wCfGV5TDCrWLx2vo1oQobGWYl/SxhoG1XkbVsLIo5dw9eg3gWDCZtlFG4UwBgzGFkBs vvIVHRPqRp8yu4rF6bu7hBR2eZWCIbJGd6i/q7ZWQa+QUS+th+j7dLY/84B4ixWZftOs VwUhBZmxPRnP2Scs8rUD8oSmQmHJHMBVyB/6MEJSGlmSg+FFTJzBTphyRN25+5FGWWps 9QIw== X-Gm-Message-State: APjAAAXhPrIpYghTC9MEYZDV6+7IYLGmWBNAkQUroucP0lEO8chjjijH PI3eKjdXAfzIlpNnUqukJJp94yU6HNU= X-Google-Smtp-Source: APXvYqyp8oMM/KRLgyGgfQgefVACOlCyLBg3ZFAByAg21TgQpj0zPG+r1qTdxyj07i6CKw028HEYKA== X-Received: by 2002:a05:651c:102c:: with SMTP id w12mr4105569ljm.53.1576114894240; Wed, 11 Dec 2019 17:41:34 -0800 (PST) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id q186sm2064796ljq.30.2019.12.11.17.41.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Dec 2019 17:41:33 -0800 (PST) Received: by mail-lj1-f180.google.com with SMTP id h23so339353ljc.8 for ; Wed, 11 Dec 2019 17:41:32 -0800 (PST) X-Received: by 2002:a2e:9ad8:: with SMTP id p24mr4229397ljj.148.1576114892571; Wed, 11 Dec 2019 17:41:32 -0800 (PST) MIME-Version: 1.0 References: <20191211152943.2933-1-axboe@kernel.dk> <0d4e3954-c467-30a7-5a8e-7c4180275533@kernel.dk> <1c93194a-ed91-c3aa-deb5-a3394805defb@kernel.dk> In-Reply-To: From: Linus Torvalds Date: Wed, 11 Dec 2019 17:41:16 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCHSET v3 0/5] Support for RWF_UNCACHED To: Jens Axboe Cc: Linux-MM , linux-fsdevel , linux-block , Matthew Wilcox , Chris Mason , Dave Chinner , Johannes Weiner 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: On Wed, Dec 11, 2019 at 5:29 PM Jens Axboe wrote: > > I'd very much argue that it IS a bug, maybe just doesn't show on your > system. Oh, I agree. But I also understand why people hadn't noticed, and I don't think it's all that critical - because if you do 1M iops cached, you're doing something really really strange. I too can see xas_create using 30% CPU time, but that's when I do a perf record on just kswapd - and when I actually look at it on a system level, it looks nowhere near that bad. So I think people should look at this. Part of it might be for Willy: does that xas_create() need to be that expensive? I hate how "perf" callchains work, but it does look like it is probably page_cache_delete -> xas_store -> xas_create that is the bulk of the cost there. Replacing the real page with the shadow entry shouldn't be that big of a deal, I would really hope. Willy, that used to be a __radix_tree_lookup -> __radix_tree_replace thing, is there perhaps some simple optmization that could be done on the XArray case here? Linus