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=-3.5 required=3.0 tests=BAYES_00,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 635A9C48BE8 for ; Wed, 16 Jun 2021 13:47:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6FF8961241 for ; Wed, 16 Jun 2021 13:47:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FF8961241 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 D907C6B0036; Wed, 16 Jun 2021 09:47:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D25116B006E; Wed, 16 Jun 2021 09:47:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B91976B0070; Wed, 16 Jun 2021 09:47:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0153.hostedemail.com [216.40.44.153]) by kanga.kvack.org (Postfix) with ESMTP id 866336B0036 for ; Wed, 16 Jun 2021 09:47:52 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 14B83180AD80F for ; Wed, 16 Jun 2021 13:47:52 +0000 (UTC) X-FDA: 78259715184.21.80841B6 Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com [209.85.217.48]) by imf30.hostedemail.com (Postfix) with ESMTP id 6E63AE000277 for ; Wed, 16 Jun 2021 13:47:44 +0000 (UTC) Received: by mail-vs1-f48.google.com with SMTP id z7so1049302vso.3 for ; Wed, 16 Jun 2021 06:47:50 -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; bh=rzh7jOfPYY3BS7Rth6BMrlZwOex7e90TciQGZWtPoX0=; b=ALzWREQUL8uWIqXU4g/KaqMfoQ/cgY2isuer19rssa3Ngs+WYEZmsh8Qi5kOucaiWM 1BBwfAXn8n68F096mX8Q5/Su+wSTtNN1DnSKVnBVzX1227E1qmLkUKLrarUSKj1cLy1g t51q6C5Kg1vnh6XLg78AoDHmAT+HRB/862jfE= 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=rzh7jOfPYY3BS7Rth6BMrlZwOex7e90TciQGZWtPoX0=; b=nCcbbjJZir28k10pSjHzPbHOksFwelC4Ga0RIgjMNvyExqEHv/0Yenhw50gUdqKFdC fdTMkXePsS68oPxAE6gWO5PfUtF5xwq+Fzs1qkoCTnJVmwicdpH5Wlk5MfsbV3N/rFfo FjsDJ1ecirzC0VFWgHlCxFKi9Jm6MRmccRHzcyGsHSfQ/tX5O7jLbqi1KQdl6623KwWP ilXRcHvWoEmtL3QM5yJB8hQ4ymY+MlYQOth2Rch5P0Aa1N4qlIITdbaH9TCx/TpEK73A xYlq4zB7JBXtitr8F6JbUxzUUORSl0PFJB2UKi1RHqZ5Mw6yt+nRKsqr9JnvkE/hyGxK tT/g== X-Gm-Message-State: AOAM532qatR3Njgi+pUDY7KfKjj3zBQ805q138DPGWooqH4plJw6VfC6 Y0EAMzAubZG53Usum5xtfctb0Xo9P3SHPJc7KKhU+g== X-Google-Smtp-Source: ABdhPJwNthpZJuF5InfK/UVVbfqlCa8mWwZIlSOk9EE2GVKGUfovydc1w9igkiJiwmBG1yGalqwZ/ghjBhT+0QhqmPM= X-Received: by 2002:a67:f659:: with SMTP id u25mr10008319vso.9.1623851270260; Wed, 16 Jun 2021 06:47:50 -0700 (PDT) MIME-Version: 1.0 References: <016b2fe2-0d52-95c9-c519-40b14480587a@gmail.com> In-Reply-To: From: Miklos Szeredi Date: Wed, 16 Jun 2021 15:47:39 +0200 Message-ID: Subject: Re: Possible bogus "fuse: trying to steal weird page" warning related to PG_workingset. To: Matthew Wilcox Cc: linux-mm , linux-fsdevel@vger.kernel.org, Thomas Lindroth , Johannes Weiner Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf30.hostedemail.com; dkim=none ("invalid DKIM record") header.d=szeredi.hu header.s=google header.b=ALzWREQU; spf=pass (imf30.hostedemail.com: domain of miklos@szeredi.hu designates 209.85.217.48 as permitted sender) smtp.mailfrom=miklos@szeredi.hu; dmarc=none X-Stat-Signature: bq5jzz14mzgneaqdxzagy5rkfgzbggt8 X-Rspamd-Queue-Id: 6E63AE000277 X-Rspamd-Server: rspam06 X-HE-Tag: 1623851264-195966 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, 16 Jun 2021 at 14:59, Matthew Wilcox wrote: > > On Wed, Jun 16, 2021 at 02:31:32PM +0200, Miklos Szeredi wrote: > > On Mon, 14 Jun 2021 at 11:56, Thomas Lindroth wrote: > > > > > > Hi. I recently upgraded to kernel series 5.10 from 4.19 and I now get warnings like > > > this in dmesg: > > > > > > page:00000000e966ec4e refcount:1 mapcount:0 mapping:0000000000000000 index:0xd3414 pfn:0x14914a > > > flags: 0x8000000000000077(locked|referenced|uptodate|lru|active|workingset) > > > raw: 8000000000000077 ffffdc7f4d312b48 ffffdc7f452452c8 0000000000000000 > > > raw: 00000000000d3414 0000000000000000 00000001ffffffff ffff8fd080123000 > > > page dumped because: fuse: trying to steal weird page > > > > > > The warning in fuse_check_page() doesn't check for PG_workingset which seems to be what > > > trips the warning. I'm not entirely sure this is a bogus warning but there used to be > > > similar bogus warnings caused by a missing PG_waiters check. The PG_workingset > > > page flag was introduced in 4.20 which explains why I get the warning now. > > > > > > I only get the new warning if I do writes to a fuse fs (mergerfs) and at the same > > > time put the system under memory pressure by running many qemu VMs. > > > > AFAICT fuse is trying to steal a pagecache page from a pipe buffer > > created by splice(2). The page looks okay, but I have no idea what > > PG_workingset means in this context. > > > > Matthew, can you please help? > > PG_workingset was introduced by Johannes: > > mm: workingset: tell cache transitions from workingset thrashing > > Refaults happen during transitions between workingsets as well as in-place > thrashing. Knowing the difference between the two has a range of > applications, including measuring the impact of memory shortage on the > system performance, as well as the ability to smarter balance pressure > between the filesystem cache and the swap-backed workingset. > > During workingset transitions, inactive cache refaults and pushes out > established active cache. When that active cache isn't stale, however, > and also ends up refaulting, that's bonafide thrashing. > > Introduce a new page flag that tells on eviction whether the page has been > active or not in its lifetime. This bit is then stored in the shadow > entry, to classify refaults as transitioning or thrashing. > > so I think it's fine for you to ignore when stealing a page. I have problem understanding what a workingset is. Is it related to swap? If so, how can such a page be part of a file mapping? Thanks, Miklos