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=-5.2 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 88051C48BE6 for ; Wed, 16 Jun 2021 16:48:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 28498613B9 for ; Wed, 16 Jun 2021 16:48:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28498613B9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 99F826B0036; Wed, 16 Jun 2021 12:48:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 93C996B006C; Wed, 16 Jun 2021 12:48:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7B62D6B0070; Wed, 16 Jun 2021 12:48:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0053.hostedemail.com [216.40.44.53]) by kanga.kvack.org (Postfix) with ESMTP id 4A79D6B0036 for ; Wed, 16 Jun 2021 12:48:37 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D21309079 for ; Wed, 16 Jun 2021 16:48:36 +0000 (UTC) X-FDA: 78260170632.30.492ABA8 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf16.hostedemail.com (Postfix) with ESMTP id 78C8B8019375 for ; Wed, 16 Jun 2021 16:48:26 +0000 (UTC) Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 315401FD47; Wed, 16 Jun 2021 16:48:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623862115; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hQ+D0zwBmN0mr2rj4VUIzQYymZvSbOwJk8/LO7m/rRg=; b=lnuKje7YJATKsMcZ9TUxqvYwWIs2ujbdHxPtbnmnoT31qMwdu2Gtw3GcXoMbTV7gnrsczE aW3sEz2N7wrrC4VvxA33w+VRy9MO852dRszst4TOaTKTgOBDMheWTdi9jnlqglBdt3j71/ jh9lwqhECCnElgtZq5fBytdmlkWb1KM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623862115; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hQ+D0zwBmN0mr2rj4VUIzQYymZvSbOwJk8/LO7m/rRg=; b=KY6j1qi6O455vws1B6eBSbGBqOnvyMrTJCrhpjrdhgrQGMmzmklDF3lobbeEK7+xfGq6M1 xh20PzXRbW688WDg== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 18FE2118DD; Wed, 16 Jun 2021 16:48:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623862115; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hQ+D0zwBmN0mr2rj4VUIzQYymZvSbOwJk8/LO7m/rRg=; b=lnuKje7YJATKsMcZ9TUxqvYwWIs2ujbdHxPtbnmnoT31qMwdu2Gtw3GcXoMbTV7gnrsczE aW3sEz2N7wrrC4VvxA33w+VRy9MO852dRszst4TOaTKTgOBDMheWTdi9jnlqglBdt3j71/ jh9lwqhECCnElgtZq5fBytdmlkWb1KM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623862115; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hQ+D0zwBmN0mr2rj4VUIzQYymZvSbOwJk8/LO7m/rRg=; b=KY6j1qi6O455vws1B6eBSbGBqOnvyMrTJCrhpjrdhgrQGMmzmklDF3lobbeEK7+xfGq6M1 xh20PzXRbW688WDg== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id 3ll2BWMrymApKAAALh3uQQ (envelope-from ); Wed, 16 Jun 2021 16:48:35 +0000 To: Miklos Szeredi , Matthew Wilcox Cc: linux-mm , linux-fsdevel@vger.kernel.org, Thomas Lindroth , Johannes Weiner References: <016b2fe2-0d52-95c9-c519-40b14480587a@gmail.com> From: Vlastimil Babka Subject: Re: Possible bogus "fuse: trying to steal weird page" warning related to PG_workingset. Message-ID: <029095d9-399a-e323-15f3-b665e9852eb3@suse.cz> Date: Wed, 16 Jun 2021 18:48:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=lnuKje7Y; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=KY6j1qi6; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=lnuKje7Y; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=KY6j1qi6; dmarc=none; spf=pass (imf16.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Stat-Signature: 4bic5srqpy1gz8qegiuhy5qx611h8qxo X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 78C8B8019375 X-HE-Tag: 1623862106-645426 Content-Transfer-Encoding: quoted-printable 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 6/16/21 3:47 PM, Miklos Szeredi wrote: > On Wed, 16 Jun 2021 at 14:59, Matthew Wilcox wrot= e: >> >> > 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 wha= t >> > 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 pres= sure >> 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, how= ever, >> 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 sha= dow >> entry, to classify refaults as transitioning or thrashing. >> >> so I think it's fine for you to ignore when stealing a page. >=20 > I have problem understanding what a workingset is. Is it related to "working set" is the notion of the set of pages that the workload needs t= o access at the moment/relatively short time window, and it would be benefi= cial if all of it could fit in the RAM. PG_workinsgset is part of the mechanism that tries to estimate this ideal= set of pages, and especially when the workload shifts to another set of pages, i= n order to guide reclaim better. See the big comment at the top of mm/workingset.= c for details > swap? If so, how can such a page be part of a file mapping? Not related to swap. It was actually first implemented only for file page= s (page cache), but then extended to anonymous pages by aae466b0052e ("mm/swap: implement workingset detection for anonymous LRU") > Thanks, > Miklos >=20