Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1599795imm; Tue, 15 May 2018 23:43:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqhQqyOg7AQY9GaHd0ROBSGtI10XegWADU+qqasKW6x4+XFsP9UlhcZnfIqKvhK9fHtvJwZ X-Received: by 2002:a62:c987:: with SMTP id l7-v6mr18198134pfk.221.1526453011456; Tue, 15 May 2018 23:43:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526453011; cv=none; d=google.com; s=arc-20160816; b=1JRH2N756uG8W/l4lVano0q+SHpCjoyBh1FXpus3wHC7Jv7X/UgY+E1tfJmYcrA2u+ JMqQvuQO3ycvr9/KRFv6wWFSZiTMqRlgfZCt3K6PhxkY5FbdkyJtibss7+9onVVyfShK ptU6UaEgNXoN2S1a941M91umA3JnpYVuOSSx1RDTTmiZ8nWnOtHDfWubRy1xgMdHlpNl RvvLKoC3sECr7EfsMiz25+QBqUtCju+lTZGef3vQuKAdnxEAlnMjkLC3NZ+35Z/jJuy9 HN7THAs55JqaYGAtl13A7D2rIn3w7MP1OFjyAK2IPMSPz6EVAGhcTgADdDIoer6oralq OHVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:arc-authentication-results; bh=WEq7VqW15ghZT2/hlSi6kDqO+paAtHqww7Rb3KD9Be0=; b=ISwdkijoijzcwcK/KeOZdrgwb2617gshwUt6C8O8L9WxkZoChcgYMv5dSUw5O6JFZm rZ8nu8GX+21G7LW9IlfoYdjaNtlg2Y03tEJz2dctaJXKBWPfwvgRbLqPxWIcY77Bjauq dHiP7VJifChpQcrdiwFFcsBAYfjilsRsdWRkf1ZNdmKHVR4eynetBnCDiIE+gU8WFcYM yJG2xHN0aO3wrMmOOVOklcTi7cEBSBhWG0Z3EKPoqFmaZyfSPapp+RDXervROINLydRx EnXB3XSEnnaRNy8FLHT3K/jaEKcF4SmRTTRLO4qkHCtcGQ1XIN3T6a2F2EmVXoOLAPs0 xWJQ== ARC-Authentication-Results: i=1; mx.google.com; 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si1985837pld.450.2018.05.15.23.43.17; Tue, 15 May 2018 23:43:31 -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; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752574AbeEPGm7 (ORCPT + 99 others); Wed, 16 May 2018 02:42:59 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49322 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751859AbeEPGm5 (ORCPT ); Wed, 16 May 2018 02:42:57 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4G6ePth059883 for ; Wed, 16 May 2018 02:42:56 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2j0fgur99q-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 16 May 2018 02:42:56 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 16 May 2018 07:42:54 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 16 May 2018 07:42:46 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4G6gk4t10486032; Wed, 16 May 2018 06:42:46 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9363BA4059; Wed, 16 May 2018 07:34:16 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3CCAFA4040; Wed, 16 May 2018 07:34:14 +0100 (BST) Received: from [9.145.45.79] (unknown [9.145.45.79]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 16 May 2018 07:34:14 +0100 (BST) Subject: Re: [PATCH v10 23/25] mm: add speculative page fault vmstats To: Ganesh Mahendran Cc: Andrew Morton , Michal Hocko , Peter Zijlstra , kirill@shutemov.name, ak@linux.intel.com, dave@stgolabs.net, jack@suse.cz, Matthew Wilcox , benh@kernel.crashing.org, mpe@ellerman.id.au, paulus@samba.org, Thomas Gleixner , Ingo Molnar , hpa@zytor.com, Will Deacon , Sergey Senozhatsky , Andrea Arcangeli , Alexei Starovoitov , kemi.wang@intel.com, Sergey Senozhatsky , Daniel Jordan , David Rientjes , Jerome Glisse , linux-kernel , Linux-MM , haren@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com, npiggin@gmail.com, Balbir Singh , Paul McKenney , Tim Chen , linuxppc-dev@lists.ozlabs.org, x86@kernel.org References: <1523975611-15978-1-git-send-email-ldufour@linux.vnet.ibm.com> <1523975611-15978-24-git-send-email-ldufour@linux.vnet.ibm.com> From: Laurent Dufour Date: Wed, 16 May 2018 08:42:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18051606-0020-0000-0000-0000041DACAC X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051606-0021-0000-0000-000042B2C6D3 Message-Id: <5e98d70e-5eb0-32d0-f370-f0946fd17b49@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-16_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805160068 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/05/2018 04:50, Ganesh Mahendran wrote: > 2018-04-17 22:33 GMT+08:00 Laurent Dufour : >> Add speculative_pgfault vmstat counter to count successful speculative page >> fault handling. >> >> Also fixing a minor typo in include/linux/vm_event_item.h. >> >> Signed-off-by: Laurent Dufour >> --- >> include/linux/vm_event_item.h | 3 +++ >> mm/memory.c | 1 + >> mm/vmstat.c | 5 ++++- >> 3 files changed, 8 insertions(+), 1 deletion(-) >> >> diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h >> index 5c7f010676a7..a240acc09684 100644 >> --- a/include/linux/vm_event_item.h >> +++ b/include/linux/vm_event_item.h >> @@ -111,6 +111,9 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, >> SWAP_RA, >> SWAP_RA_HIT, >> #endif >> +#ifdef CONFIG_SPECULATIVE_PAGE_FAULT >> + SPECULATIVE_PGFAULT, >> +#endif >> NR_VM_EVENT_ITEMS >> }; >> >> diff --git a/mm/memory.c b/mm/memory.c >> index 425f07e0bf38..1cd5bc000643 100644 >> --- a/mm/memory.c >> +++ b/mm/memory.c >> @@ -4508,6 +4508,7 @@ int __handle_speculative_fault(struct mm_struct *mm, unsigned long address, >> * If there is no need to retry, don't return the vma to the caller. >> */ >> if (ret != VM_FAULT_RETRY) { >> + count_vm_event(SPECULATIVE_PGFAULT); >> put_vma(vmf.vma); >> *vma = NULL; >> } >> diff --git a/mm/vmstat.c b/mm/vmstat.c >> index 536332e988b8..c6b49bfa8139 100644 >> --- a/mm/vmstat.c >> +++ b/mm/vmstat.c >> @@ -1289,7 +1289,10 @@ const char * const vmstat_text[] = { >> "swap_ra", >> "swap_ra_hit", >> #endif >> -#endif /* CONFIG_VM_EVENTS_COUNTERS */ >> +#ifdef CONFIG_SPECULATIVE_PAGE_FAULT >> + "speculative_pgfault" > > "speculative_pgfault", > will be better. :) Sure ! Thanks. > >> +#endif >> +#endif /* CONFIG_VM_EVENT_COUNTERS */ >> }; >> #endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA */ >> >> -- >> 2.7.4 >> >