Received: by 10.223.164.221 with SMTP id h29csp20961wrb; Fri, 27 Oct 2017 13:33:12 -0700 (PDT) X-Google-Smtp-Source: ABhQp+R/OD/bhiDdZM6rnqj6EcmPMtTpR+l/0NfFk5qXTuFYJ98uo2NwwmwZRjsgVmtrxvaNmp2k X-Received: by 10.84.240.196 with SMTP id l4mr1222180plt.149.1509136392405; Fri, 27 Oct 2017 13:33:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509136392; cv=none; d=google.com; s=arc-20160816; b=WRo6vY2yhmq7vugWCF6xabgpF0Q86DRSZ1BnVCLYi212M3X56A53h9Y+2Wo4hUSGlf h3xNnPLy45ftr+XCE9m2h4n5IX4jwd0gOoarilCqO7OrSg/lhz+uo1B1oJh4BRgNDXXz xRa6dgz0WbU2CgPxXomScEHW0Slski0SHQOjjkLJkqeFMpToN1Y9qydZN/6/ykusPb2q PeL0RWGasjyWdkxFtqiTIdo5p4H/Ex+HiTr5MH2kUvNyWkkNm5tRc2UFLgA0JehkzkaC cW9ZDmC334ULTIGMHtGoaexNrHkT2+RM9iMfHXYm4QFOUNknz5Sl1pek8PEMkoGji4Aj JlEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=dp96akndzrYL49hcoaH5claoMtA4DwscUWR0bCQCZyI=; b=nO2ez4LfqRI1VtEDLImJU39LpP+XjKStKEq+bIEqHyh5O0xeH52XngOQ5uf21wqHbq 5SzbM6+HNaDDEIS2eODlJwWE4lCYXBL3LG5zrjnZK0HuyXYd+LwNphqlfeiYnsqbZLMa H56muuvBHjmKOXp3IEZLTeIWJ6bKkoHARj3Bg3dR5Z/sVNC8t6aMxiLbdjmQeLts2q2N gNURLjlx4KqVvcjJBoNYhMW4DC3pDidiAoybLJPpIW+cRx6lYYhW5WeHlhHZC1V1rNAc 73K1TEbzbyfHtCQFE5+YmQl+/co8Yh4/2/sQjRdkvymL7gE420b0WwwPWJ54y9PBDiiN 4jbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=Y3LXQmTY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=cisco.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z19si5878640pfg.7.2017.10.27.13.32.58; Fri, 27 Oct 2017 13:33:12 -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=@cisco.com header.s=iport header.b=Y3LXQmTY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=cisco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932523AbdJ0Uag (ORCPT + 99 others); Fri, 27 Oct 2017 16:30:36 -0400 Received: from rcdn-iport-3.cisco.com ([173.37.86.74]:56417 "EHLO rcdn-iport-3.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932500AbdJ0UaS (ORCPT ); Fri, 27 Oct 2017 16:30:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1949; q=dns/txt; s=iport; t=1509136218; x=1510345818; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=p2c4kv4rj8QOQa8Ryppo25B9vUdo2Shfx6YosGwZw3Y=; b=Y3LXQmTY6m8/jxZB5s4EnTBKtnXY2XOol6rsfLCQtaMbx1f80wV+tUK6 4y0pQwfDmtZw00ELgPnTGKhS4GR9yXyUjmk7Ds+lcI/kPuF7QZ+UReVF8 z/F2CI37oBhkpG3g2/49f27UsR/P+HGmB7PTW25M0bPc1BE6s33oSvG8U w=; X-IronPort-AV: E=Sophos;i="5.44,305,1505779200"; d="scan'208";a="302871685" Received: from rcdn-core-1.cisco.com ([173.37.93.152]) by rcdn-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Oct 2017 20:30:02 +0000 Received: from [10.21.101.2] (sjc-vpn1-1282.cisco.com [10.21.101.2]) by rcdn-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id v9RKTugs004392 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 27 Oct 2017 20:29:59 GMT Subject: Re: Detecting page cache trashing state To: vinayak menon Cc: Johannes Weiner , Taras Kondratiuk , Michal Hocko , "linux-mm@kvack.org" , xe-linux-external@cisco.com, linux-kernel@vger.kernel.org References: <150543458765.3781.10192373650821598320@takondra-t460s> <20170915143619.2ifgex2jxck2xt5u@dhcp22.suse.cz> <150549651001.4512.15084374619358055097@takondra-t460s> <20170918163434.GA11236@cmpxchg.org> From: "Ruslan Ruslichenko -X (rruslich - GLOBALLOGIC INC at Cisco)" Message-ID: Date: Fri, 27 Oct 2017 23:29:55 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Auto-Response-Suppress: DR, OOF, AutoReply Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/26/2017 06:53 AM, vinayak menon wrote: > On Thu, Sep 28, 2017 at 9:19 PM, Ruslan Ruslichenko -X (rruslich - > GLOBALLOGIC INC at Cisco) wrote: >> Hi Johannes, >> >> Hopefully I was able to rebase the patch on top v4.9.26 (latest supported >> version by us right now) >> and test a bit. >> The overall idea definitely looks promising, although I have one question on >> usage. >> Will it be able to account the time which processes spend on handling major >> page faults >> (including fs and iowait time) of refaulting page? >> >> As we have one big application which code space occupies big amount of place >> in page cache, >> when the system under heavy memory usage will reclaim some of it, the >> application will >> start constantly thrashing. Since it code is placed on squashfs it spends >> whole CPU time >> decompressing the pages and seem memdelay counters are not detecting this >> situation. >> Here are some counters to indicate this: >> >> 19:02:44 CPU %user %nice %system %iowait %steal %idle >> 19:02:45 all 0.00 0.00 100.00 0.00 0.00 0.00 >> >> 19:02:44 pgpgin/s pgpgout/s fault/s majflt/s pgfree/s pgscank/s >> pgscand/s pgsteal/s %vmeff >> 19:02:45 15284.00 0.00 428.00 352.00 19990.00 0.00 0.00 >> 15802.00 0.00 >> >> And as nobody actively allocating memory anymore looks like memdelay >> counters are not >> actively incremented: >> >> [:~]$ cat /proc/memdelay >> 268035776 >> 6.13 5.43 3.58 >> 1.90 1.89 1.26 >> >> Just in case, I have attached the v4.9.26 rebased patched. >> > Looks like this 4.9 version does not contain the accounting in lock_page. In v4.9 there is no wait_on_page_bit_common(), thus accounting moved to wait_on_page_bit(_killable|_killable_timeout). Related functionality around lock_page_or_retry() seem to be mostly the same in v4.9. From 1582443442633647056@xxx Fri Oct 27 20:21:08 +0000 2017 X-GM-THRID: 1578563211273176438 X-Gmail-Labels: Inbox,Category Forums