Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1412032imm; Tue, 15 May 2018 19:50:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrB7p8q4zqHYOoeuHCccosmEPhZUesNF+adLwll6jhtZ684caWRa0M1wgqt9lVbGgPW4cTK X-Received: by 2002:a62:89db:: with SMTP id n88-v6mr17681069pfk.11.1526439038260; Tue, 15 May 2018 19:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526439038; cv=none; d=google.com; s=arc-20160816; b=X34xd9EXQyy+h4xvC5VNBCa2v8Ho2UjbA8yoyJgDN93anJkOJRQASpd9AURS6dLktg SHnjfKCb63OWUP9Bh3bPw08VwrBDquPzYYm9wwksVr2+CsWjEP6Pm0z+030yXWdaWed/ I9DRGFmcz6W8bWG6soO66z5oZm/EZZS4ONLZ/zOKsKoD7TqKLaT9pm/RGxIZfJnZj+Er D9dXKUg1MRtieW7KVu2he2edUsxULhakCY++TTu2EdtSlvUhG+pXO3WES5/LAi8E1jNf eHyXhZhPwPn9SqJ+K4SeZ9qKx2et6aY9aCYoZkTMD0G3DcIWFvhdzdSsoRemJyuH5Gx4 7TgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Qek8oI8/7WS+jsV+lC9ZXwA5lMNOI9/6wM7mIzpzyu8=; b=jX42aDhan1HBrxmhmCu0OcgFVkBgkgByaBaPgbqS8ELElWxQ4fmhGQ92h9qzUE9PJT 77dVHukBKIJRoLq9Tv7BZLHBs8WtCBWHmyZfwFTHZugP3HmSyCIG1B6q3scH+WZySNt7 dMnIYUNpveucSowcVa97+axMIFD7whLLHGVZuvuPfXDptTuELkP+bGAXr9BwNL8dNPSP IzuYLgFnWFeZRvtj9vUJUI6z3SqEUGKClERKytboX2YpiLKfhcc+dAPFWhV+vKtKpZbo EcWPNJm0hD63RyFL0A5MfpLFCRk6tlRXws3ebo895tyV8E63nD444Dj+1si69/leqW3y HLSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZLuUeyMH; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5-v6si1233761pgs.317.2018.05.15.19.50.24; Tue, 15 May 2018 19:50:38 -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=@gmail.com header.s=20161025 header.b=ZLuUeyMH; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752304AbeEPCuF (ORCPT + 99 others); Tue, 15 May 2018 22:50:05 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:56221 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752038AbeEPCuE (ORCPT ); Tue, 15 May 2018 22:50:04 -0400 Received: by mail-it0-f65.google.com with SMTP id 144-v6so6816067iti.5 for ; Tue, 15 May 2018 19:50:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Qek8oI8/7WS+jsV+lC9ZXwA5lMNOI9/6wM7mIzpzyu8=; b=ZLuUeyMH64UhlBGxUWuvKqmuz1IlesmSPG2rRffG34/zQh9uJ//rChtqX+vL6od1eS PitI+m4jg6M1+3StHMfbrp7vi9JDeSxEWgAwUxlHENqXxy1l9cp9mAfHI6Mak6FTO57Q K1niZy1n48BkjcXSWnqJOgf+BDa7UOhH8C8A1k31lRQtF7gK3dc6DitsSFCbtzdfD1p0 zXLhpe4AwO5oXaYB41eXDVi8r5lpcEgQDOKy79Q50tTQFMQ519F3GHzY0s3HMxflWWrf 901+jZ6bf2E+XJZL1hs4SOMI+cTh9qWi/YoqLtxqTHrk+AyFz8TyWHEsTa6JcnO60moj iGpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Qek8oI8/7WS+jsV+lC9ZXwA5lMNOI9/6wM7mIzpzyu8=; b=FB2QQYXZK3tpAKCqOnLYJPxxwEKo5aOThf0b66W2IGPeMHRI/1keGL5qrVQXw4BxGw nbtK9sYaoKbv895t1IAR+Q07iOkfF2UBosoznZRrG43GCfceqfdpoKGNBE3qJMvaX5wT rM98BNgMjPzL/C/391m20gw9hgQLZeQ2Zl20Igf5g7yhMluXsDotF8nAYp9T1aQMdLrc uVHNm2rC3NLaCWQscOGqptP/PdlnNaO/Vu7Rdv/1vrb/p+jGjZApjFY/UbZGo0jGn662 1E3RwoRcQtHqkjRSzaLpacdEEOxJvmOHQR5zrd79oymaKaqOkRTxHDbUGR+sho+OaxjE OR6w== X-Gm-Message-State: ALKqPwdHVWM9yDghosqRdOLvUtOCahLbtnTmfW1P4Xw7xWJxMymjK/wN fc/Ch4hMVRV2bFZaFi7DVlqP3F57hrIG5Dhgy70= X-Received: by 2002:a24:e08f:: with SMTP id c137-v6mr676428ith.114.1526439003361; Tue, 15 May 2018 19:50:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.140.23 with HTTP; Tue, 15 May 2018 19:50:02 -0700 (PDT) In-Reply-To: <1523975611-15978-24-git-send-email-ldufour@linux.vnet.ibm.com> References: <1523975611-15978-1-git-send-email-ldufour@linux.vnet.ibm.com> <1523975611-15978-24-git-send-email-ldufour@linux.vnet.ibm.com> From: Ganesh Mahendran Date: Wed, 16 May 2018 10:50:02 +0800 Message-ID: Subject: Re: [PATCH v10 23/25] mm: add speculative page fault vmstats To: Laurent Dufour 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. :) > +#endif > +#endif /* CONFIG_VM_EVENT_COUNTERS */ > }; > #endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA */ > > -- > 2.7.4 >