Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1299572ybt; Thu, 25 Jun 2020 02:43:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJya/WS0RYldMx+mT7RIEhJY2UQg7OqUodo/EHPVMmjb5/7ARMa63cTazAGs6vL4WWHEd4Cn X-Received: by 2002:a17:906:ca0e:: with SMTP id jt14mr28090624ejb.325.1593078229948; Thu, 25 Jun 2020 02:43:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593078229; cv=none; d=google.com; s=arc-20160816; b=Im+fN18+Mq6WdZjmkS3zfep7we2jDeYiU2RzI6f0qZDc43fWnBc3JtjbtN1Ar47aPy Iyl4NvVXomFcfbR4aB02qqOx3MR8i4PYEpg8sppCyu5qZ8msj4eSoBlAwhWw8nEE6lz2 5/JP5LsezOb5of6lyPwtSYIm0s+23ZWV8WrmuyPHDvugPU+3rXXwQjSLdct77iz7vLs7 6OeDblAK6eiKDYcHrTmVJGaMUnr2ax8gk7LggrjT9j+yT6S9zPGipGTKrvFi2d1CdxFQ /uz+6it8aKOZ5J6rG5Z5tBi7r+80k0gcx338uloOJjo0+caYqXfv6F3sFHTgNSYh7S+m re9Q== 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; bh=zb/dYGHsa6x02/2o8mIgLXZPcYxsnbsRnyGZqV57/oU=; b=0dy+uTnKraS8APZwySRKlJtio/GnWo0uT0gik06/iRpUaSN6RCHkrzMqDsu8Sv4+Xq K5w5Iw+O76essmP1czaYlza59gvNaiP86y26wZfz0+Jgc5rb77MaT+nMZHGVi9+XYVIC 53vnl2um+CA/RneJDmgI1j9s/zskvr5F/2FAhanib+bNvvhyPuw63sYE2npiutxqs0Cp yoVTDlvjlqTPWnd+BHHQsBsXF3CYtmll3nhutRSduJlYieye0Exh1EpADzX+hIIzTZ8P Wix4kerD/DrL/CS9PpKuagypgbQmSs67pxHrtmhqWjlp0XmXeQrJTM+Bmkac0lb8LX8x 1VWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q13si14506679edn.496.2020.06.25.02.43.26; Thu, 25 Jun 2020 02:43:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390683AbgFYIbR (ORCPT + 99 others); Thu, 25 Jun 2020 04:31:17 -0400 Received: from elvis.franken.de ([193.175.24.41]:36835 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390597AbgFYIbQ (ORCPT ); Thu, 25 Jun 2020 04:31:16 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1joNHt-0001Gi-04; Thu, 25 Jun 2020 10:31:13 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id C8607C06F9; Thu, 25 Jun 2020 10:28:37 +0200 (CEST) Date: Thu, 25 Jun 2020 10:28:37 +0200 From: Thomas Bogendoerfer To: Peter Xu Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Gerald Schaefer , Andrew Morton , Andrea Arcangeli , Will Deacon , Michael Ellerman , Linus Torvalds , linux-mips@vger.kernel.org Subject: Re: [PATCH 11/26] mm/mips: Use general page fault accounting Message-ID: <20200625082837.GD6319@alpha.franken.de> References: <20200619160538.8641-1-peterx@redhat.com> <20200619160538.8641-12-peterx@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200619160538.8641-12-peterx@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 19, 2020 at 12:05:23PM -0400, Peter Xu wrote: > Use the general page fault accounting by passing regs into handle_mm_fault(). > It naturally solve the issue of multiple page fault accounting when page fault > retry happened. > > Fix PERF_COUNT_SW_PAGE_FAULTS perf event manually for page fault retries, by > moving it before taking mmap_sem. > > CC: Thomas Bogendoerfer > CC: linux-mips@vger.kernel.org > Signed-off-by: Peter Xu > --- > arch/mips/mm/fault.c | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) Acked-by: Thomas Bogendoerfer Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]