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.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 CA405C18E5A for ; Mon, 9 Mar 2020 14:37:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8EEF52067C for ; Mon, 9 Mar 2020 14:37:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="TLR3iyeV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EEF52067C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=szeredi.hu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5D7A36B0005; Mon, 9 Mar 2020 10:37:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 588386B0006; Mon, 9 Mar 2020 10:37:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 49D2B6B0007; Mon, 9 Mar 2020 10:37:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0189.hostedemail.com [216.40.44.189]) by kanga.kvack.org (Postfix) with ESMTP id 2FDEB6B0005 for ; Mon, 9 Mar 2020 10:37:00 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D574AD38 for ; Mon, 9 Mar 2020 14:36:59 +0000 (UTC) X-FDA: 76576075758.22.leg16_5a1ba21543c09 X-HE-Tag: leg16_5a1ba21543c09 X-Filterd-Recvd-Size: 4238 Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Mon, 9 Mar 2020 14:36:59 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id h131so8631483iof.1 for ; Mon, 09 Mar 2020 07:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=51InxWWK77yS5DHpUHA7Fenj4mp1m4T9V+UnkAOMMZ0=; b=TLR3iyeVnSbM6bO3JpXDa5vsrJxMy0mMRwc8CL4J+V2F7yF4jQCDNGLDId5PhvQ0Zg Y3zKHJP58aR7NNkaAq59H9FJMS/60a3KttxsLMwWi5tGLWqSJ58K2v+5sJ6NpsV30KrV o7LF7+zwxo3xmDbkiVK2Cw4HtCz+/ceuWqVv4= 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:content-transfer-encoding; bh=51InxWWK77yS5DHpUHA7Fenj4mp1m4T9V+UnkAOMMZ0=; b=Ptt1/tPtsiInqehP4JhJzLDMbMp8aAqoKtPatd/efjTYf4LTGLMFWq6e0Tq/5CmKMs hL3N8rblRqRlhSbI9Uab64iThkjNooTtJdAfm8kOAX0nNkIlo2a3PBg1LQVtkNphVMCX 4+X6Q3lugIPyWRWht0zYQwYVsrZHeE07pDX4WpRd6qCG0RA070VWDiPWqh9DJodUDNWt 3XxS5vBa85yumFJVAgRI05COFamhOSMHaop0No1BtREz1PgfLPoFO+r5Htcj6uY6IMXh pTeUNtokFxPItSCYT6lFw+5ngGj8XfE9MjNjtyJ14wQt6SGcTaHUXAKhagTKlUHM/h2+ Y2IA== X-Gm-Message-State: ANhLgQ1hO5g4BiX+aus9w1YLowR66QgQL1CjCUQKM9cNwA7Rq0WJWlZY X7r80vwyH2oN/tXCH7L4rEhgzPCMkHwgWiL40FOWfytp X-Google-Smtp-Source: ADFU+vuUwyKjXTL/6WA5OX+bDXb1PydHUkWzDUGosTSn49xcylKL0bn5XvkQ1bMsSoOk2LCMLrMqVd4gBdKs0VRb3jk= X-Received: by 2002:a6b:5905:: with SMTP id n5mr2907560iob.59.1583764618197; Mon, 09 Mar 2020 07:36:58 -0700 (PDT) MIME-Version: 1.0 References: <20200303130421.GA5186@mtj.thefacebook.com> <20200303141311.GA189690@mtj.thefacebook.com> <20200303142512.GC189690@mtj.thefacebook.com> In-Reply-To: From: Miklos Szeredi Date: Mon, 9 Mar 2020 15:36:47 +0100 Message-ID: Subject: Re: [fuse-devel] Writing to FUSE via mmap extremely slow (sometimes) on some machines? To: Michael Stapelberg Cc: Tejun Heo , Jack Smith , fuse-devel , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.011744, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Mar 9, 2020 at 3:32 PM Michael Stapelberg wrote: > > Here=E2=80=99s one more thing I noticed: when polling > /sys/kernel/debug/bdi/0:93/stats, I see that BdiDirtied and BdiWritten > remain at their original values while the kernel sends FUSE read > requests, and only goes up when the kernel transitions into sending > FUSE write requests. Notably, the page dirtying throttling happens in > the read phase, which is most likely why the write bandwidth is > (correctly) measured as 0. > > Do we have any ideas on why the kernel sends FUSE reads at all? Memory writes (stores) need the memory page to be up-to-date wrt. the backing file before proceeding. This means that if the page hasn't yet been cached by the kernel, it needs to be read first. Thanks, Miklos