Received: by 10.192.165.156 with SMTP id m28csp132810imm; Tue, 17 Apr 2018 07:41:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+HMeJyYiASQtmePI83RimoW1A5i5qEMDCscjps/rCRkaSHXPOcWJpdbHJ4rHJEh0zwNWrb X-Received: by 2002:a17:902:585e:: with SMTP id f30-v6mr2046128plj.50.1523976080869; Tue, 17 Apr 2018 07:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523976080; cv=none; d=google.com; s=arc-20160816; b=W5XowdMIib/qFkW1dsCuq9cJPBdeFasneOoaaB1yeuzVwoJB5DnGYKCh4QkPQ2IXRa aaGb8lJwfjzkX0JeV0abZHoIkUHmZ907Hr844A9XOrx/rx8sL9xLgFR/Ud1A55pz5IMm bh7PUyD4uGj7xexMbWFr87j2QzBx/UHcPctAuW/439zVGD5CN39dCa1/ARq0yAaV0rcn peG9s8rxhqXiUs32xXxDUAxd+c5ntSdkr6Cxh488sZXzfTfTJBtdok54Y8xF7WeZRHTy UvubLPuCBAGI69p/4BXWHzsdoRmwUHqJky7Hweq/1m9Epgc/Ctw4coyvCCNuhdZJpXg9 /OZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=CTPeO9haItLwKfk9jC8dkHVrRbQDIw2gEdRJupe2Y8c=; b=yjqOPhjVYGiP5pYtRo2/LiwmLYM57C8vjzKNy4NGBDcS0+XCzLDUONSPhx10PmCExK 9+FJFV/ckVDecoqhiAMz1CH2IDJ4IZ6Yln8WqMAyNxMRNhsQV6vJUt4pUo68E6Dac8lK GrZLyttgQ4VOCBKKyPhVndRNjBMFenRw7OhoEM1V0gNp9gxCnv3s7cwpgoxp50XXnS5d 8wKFKesru9ru5vOunZ+65u52obieZ2R8A1YFWiETZ49qHOVyyKws4ksiKckyWljfmGcZ 4nFRjsDsKY9MOPCWsNf7RejT7thRLBD8Uch2/UJY9F1zZdB5JnZykpx71K0rk2CreLGt UGTQ== 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 h33-v6si14324923plh.483.2018.04.17.07.41.06; Tue, 17 Apr 2018 07:41:20 -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 S1753896AbeDQOfG (ORCPT + 99 others); Tue, 17 Apr 2018 10:35:06 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55170 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752796AbeDQOfD (ORCPT ); Tue, 17 Apr 2018 10:35:03 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3HEStLh035192 for ; Tue, 17 Apr 2018 10:35:02 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2hdj3sav4h-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Tue, 17 Apr 2018 10:35:02 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 17 Apr 2018 15:34:59 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 17 Apr 2018 15:34:51 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3HEYoT357933856; Tue, 17 Apr 2018 14:34:50 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 89070A4053; Tue, 17 Apr 2018 15:26:59 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6173EA4040; Tue, 17 Apr 2018 15:26:57 +0100 (BST) Received: from nimbus.lab.toulouse-stg.fr.ibm.com (unknown [9.145.171.143]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 17 Apr 2018 15:26:57 +0100 (BST) From: Laurent Dufour To: akpm@linux-foundation.org, mhocko@kernel.org, peterz@infradead.org, 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.work@gmail.com, Daniel Jordan , David Rientjes , Jerome Glisse , Ganesh Mahendran Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, haren@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com, npiggin@gmail.com, bsingharora@gmail.com, paulmck@linux.vnet.ibm.com, Tim Chen , linuxppc-dev@lists.ozlabs.org, x86@kernel.org Subject: [PATCH v10 23/25] mm: add speculative page fault vmstats Date: Tue, 17 Apr 2018 16:33:29 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523975611-15978-1-git-send-email-ldufour@linux.vnet.ibm.com> References: <1523975611-15978-1-git-send-email-ldufour@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18041714-0012-0000-0000-000005CBDCE9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041714-0013-0000-0000-000019482826 Message-Id: <1523975611-15978-24-git-send-email-ldufour@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-17_07:,, 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=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804170131 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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" +#endif +#endif /* CONFIG_VM_EVENT_COUNTERS */ }; #endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA */ -- 2.7.4