Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751633AbdFIP0B (ORCPT ); Fri, 9 Jun 2017 11:26:01 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55496 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751545AbdFIP0A (ORCPT ); Fri, 9 Jun 2017 11:26:00 -0400 Subject: Re: [RFC v4 00/20] Speculative page faults To: Michal Hocko Cc: paulmck@linux.vnet.ibm.com, peterz@infradead.org, akpm@linux-foundation.org, kirill@shutemov.name, ak@linux.intel.com, dave@stgolabs.net, jack@suse.cz, Matthew Wilcox , 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 References: <1497018069-17790-1-git-send-email-ldufour@linux.vnet.ibm.com> <20170609150126.GI21764@dhcp22.suse.cz> From: Laurent Dufour Date: Fri, 9 Jun 2017 17:25:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170609150126.GI21764@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17060915-0020-0000-0000-0000038465A9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17060915-0021-0000-0000-000042009C1A Message-Id: <83cf1566-3e76-d3fa-10a8-d83bbf9fd568@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-09_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706090268 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2503 Lines: 59 On 09/06/2017 17:01, Michal Hocko wrote: > On Fri 09-06-17 16:20:49, Laurent Dufour wrote: >> This is a port on kernel 4.12 of the work done by Peter Zijlstra to >> handle page fault without holding the mm semaphore. >> >> http://linux-kernel.2935.n7.nabble.com/RFC-PATCH-0-6-Another-go-at-speculative-page-faults-tt965642.html#none >> >> Compared to the Peter initial work, this series introduce a try spin >> lock when dealing with speculative page fault. This is required to >> avoid dead lock when handling a page fault while a TLB invalidate is >> requested by an other CPU holding the PTE. Another change due to a >> lock dependency issue with mapping->i_mmap_rwsem. >> >> This series also protect changes to VMA's data which are read or >> change by the page fault handler. The protections is done through the >> VMA's sequence number. >> >> This series is functional on x86 and PowerPC. >> >> It's building on top of v4.12-rc4 and relies on the change done by >> Paul McKenney to the SRCU code allowing better performance by >> maintaining per-CPU callback lists: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=da915ad5cf25b5f5d358dd3670c3378d8ae8c03e >> >> Tests have been made using a large commercial in-memory database on a >> PowerPC system with 752 CPUs. The results are very encouraging since >> the loading of the 2TB database was faster by 20% with the speculative >> page fault. >> >> Since tests are encouraging and running test suite didn't raise any >> issue, I'd like this request for comment series to move to a patch >> series soon. So please feel free to comment. > > What other testing have you done? Other benchmarks (some numbers)? What > about some standard worklaods like kbench? This is a pretty invasive > change so I would expect much more numbers. Thanks Michal for your feedback. I mostly focused on this database workload since this is the one where we hit the mmap_sem bottleneck when running on big node. On my usual victim node, I checked for basic usage like kernel build time, but I agree that's clearly not enough. I try to find details about the 'kbench' you mentioned, but I didn't get any valid entry. Would you please point me on this or any other bench tool you think will be useful here ? > > It would also help to describe the highlevel design of the change here > in the cover letter. This would make the review of specifics much > easier. You're right, I'll try to make a highlevel design. Thanks, Laurent.