Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2043885imm; Thu, 2 Aug 2018 05:27:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfvFNL1ZQ+wDAa7hEIqCtVaQP3yCyPZh6/fXf8fwc+xd6za7OhlxeV6AcXkiHkwjWdkT/Hk X-Received: by 2002:a63:5421:: with SMTP id i33-v6mr2598471pgb.417.1533212839507; Thu, 02 Aug 2018 05:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533212839; cv=none; d=google.com; s=arc-20160816; b=sU71OsTWVZ7EzImltn6RdQQCyF03JM/GCn0cmqdroDTO7jPS4yMBLG+NZeq/ICZGq/ E6/pT2JE8vNfbGztAfPH9UmEyvl+FUADvYuwVW4bPFH+B3ur27/vJ7n+3BtbLgs7OsOG WEHMNf/YJvTA5Om3K6ZPACWSBs8YkjHmlLmbfKciXaJOypetOku0IkXceHm/8JZPod+R 00I9FZoGIKCBwPSkh92KyVIg5C9ELaFgKz9BM4g/rFdc4IjTSCRk7wqY7CroOQCFlDu6 2yEXaVxY8SaZwJmkhpx9hXx9UUCR8RtgYIehpTrvYnF5kZJTRLxdPYw0Y+vj6GbT/mI/ mH2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=DCMyHA3qkDdppqTw/RcH7oFWVcJjBHKC8GDSBWiqQtM=; b=KGIS1GvcfjYIGghL5n30DOMFmm1WBDC0t38qcyv+q6I+tWzvRQHozOeixkNBODnl01 85cBPa5H7s9drhzC0qUzIh1z8t7WC3YYAxVMi7FV76sZfBej6c4fudeusUVcs7GHWN8W s1u3PNSacemvoCjO+0E/ws+ZyJUTUH7JpqfIpK11D1PCWnozexb4BorkDWPBb9WTpC1F 02+3wJf7deFmZn795XqSQV3RzjSGGuHEFDcHZV0XJ1x1gVF4DoYR3NjAIYEW5Zf7pICz NmCrkfeL9bFfm5wdS9l0RV8FcgctVyIhqL6uMv/owT2dVwp9pUGFl6KeOAon0HSgy1hi vr4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=ukNRTZQV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a7-v6si2001248pfg.200.2018.08.02.05.27.04; Thu, 02 Aug 2018 05:27:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=ukNRTZQV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732350AbeHBOQy (ORCPT + 99 others); Thu, 2 Aug 2018 10:16:54 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:41971 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732233AbeHBOQy (ORCPT ); Thu, 2 Aug 2018 10:16:54 -0400 Received: by mail-qk0-f193.google.com with SMTP id n85-v6so1209965qke.8 for ; Thu, 02 Aug 2018 05:25:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=DCMyHA3qkDdppqTw/RcH7oFWVcJjBHKC8GDSBWiqQtM=; b=ukNRTZQVT3U4Phez9QF72NZQmJs6CgsjhoRmbbZKycNnC/voOfHJkjpyd53ruz9v04 hQ83p9QjGY8DQog19IU5iTY9h61fl9V83yRFODCdbN0JPyxpt8yti9dr1QGBZfRXrV6P 6Tw8v11zZPi7HkpZneIGe6pq60NH4eass6rp5kgnIg548A4Fcw3TDTkDihjy+x7F6Y89 lqaUGBpUb/cIr2VufX2V5yf64YN/wm9G1j0lVTg7hD3nspwktFdmzi1EbY9HFCR3mmHW s3meXnysNjPPTF6ygSEK/3eyTG7PUKAP+eIZjvE+EyQsJ+IcPmJWe1vJjRZWqprdwaQB BENA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=DCMyHA3qkDdppqTw/RcH7oFWVcJjBHKC8GDSBWiqQtM=; b=doY7+GqsU86QRlDJMYJFq6TFSN0ojquaLQfAwRbuFlo4SzXX24qublLLR5Roi0ayzq 46vTl7F28ijSliUQIOdK2r5rIlVXY4qBl3H3DWolfcQh6nflLPtCmTZTB2P8ju/AtdmZ oP4eEpbSJJZdDQss9nR6o40O/+5M9EYTJoBPg5JC4EJvSDDGITfniAQgSkp4UFDuVTmc Y7+hkPxCHx/7XuA3zWd8MO3ttY24HbNU4xOWqGTEFSiYTL/3Lb85JWgL/wfwo3TTcSzL +LfsKv0uSkf54aKglufaWbGVz5sFMoC51MRkRVKMIJ8jPqWUze+YFBH0WQWhwUMSgj6J HyZg== X-Gm-Message-State: AOUpUlFXHQ+4YCmj2U+H2CtG1hrvZuJaslFDyuq5v0xhHA0Y7WQaGQg0 xLlq7lHO5ZkcS7LXPeZs4yIa1Q== X-Received: by 2002:a37:dc41:: with SMTP id v62-v6mr2134824qki.109.1533212757132; Thu, 02 Aug 2018 05:25:57 -0700 (PDT) Received: from localhost (pool-96-246-38-36.nycmny.fios.verizon.net. [96.246.38.36]) by smtp.gmail.com with ESMTPSA id k38-v6sm1571918qtc.45.2018.08.02.05.25.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Aug 2018 05:25:56 -0700 (PDT) Date: Thu, 2 Aug 2018 08:28:52 -0400 From: Johannes Weiner To: Suren Baghdasaryan Cc: Ingo Molnar , Peter Zijlstra , Andrew Morton , Linus Torvalds , Tejun Heo , Daniel Drake , Vinayak Menon , Christopher Lameter , Mike Galbraith , Shakeel Butt , Peter Enderborg , linux-mm , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 2/9] mm: workingset: tell cache transitions from workingset thrashing Message-ID: <20180802122852.GA17974@cmpxchg.org> References: <20180801151958.32590-1-hannes@cmpxchg.org> <20180801151958.32590-3-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Suren, On Wed, Aug 01, 2018 at 02:56:27PM -0700, Suren Baghdasaryan wrote: > On Wed, Aug 1, 2018 at 8:19 AM, Johannes Weiner wrote: > > /* > > - * The unsigned subtraction here gives an accurate distance > > - * across inactive_age overflows in most cases. > > + * Calculate the refault distance > > * > > - * There is a special case: usually, shadow entries have a > > - * short lifetime and are either refaulted or reclaimed along > > - * with the inode before they get too old. But it is not > > - * impossible for the inactive_age to lap a shadow entry in > > - * the field, which can then can result in a false small > > - * refault distance, leading to a false activation should this > > - * old entry actually refault again. However, earlier kernels > > - * used to deactivate unconditionally with *every* reclaim > > - * invocation for the longest time, so the occasional > > - * inappropriate activation leading to pressure on the active > > - * list is not a problem. > > + * The unsigned subtraction here gives an accurate distance > > + * across inactive_age overflows in most cases. There is a > > + * special case: usually, shadow entries have a short lifetime > > + * and are either refaulted or reclaimed along with the inode > > + * before they get too old. But it is not impossible for the > > + * inactive_age to lap a shadow entry in the field, which can > > + * then can result in a false small refault distance, leading > > "which can then can" - please remove one of the "can". Good catch, will fix.