From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E074FC6195 for ; Fri, 8 Nov 2019 18:44:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DAACF21882 for ; Fri, 8 Nov 2019 18:44:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="InBJStpZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAACF21882 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5E6656B0003; Fri, 8 Nov 2019 13:44:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5966A6B0006; Fri, 8 Nov 2019 13:44:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4852B6B0007; Fri, 8 Nov 2019 13:44:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0156.hostedemail.com [216.40.44.156]) by kanga.kvack.org (Postfix) with ESMTP id 2E8E86B0003 for ; Fri, 8 Nov 2019 13:44:39 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id D0A92180AD81F for ; Fri, 8 Nov 2019 18:44:38 +0000 (UTC) X-FDA: 76133986236.19.ice06_62b7e29303613 X-HE-Tag: ice06_62b7e29303613 X-Filterd-Recvd-Size: 3711 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 Nov 2019 18:44:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573238677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=54brm5rGO/mYSNJW+nP1TupX0Iz3rREdtgTrvEffbAQ=; b=InBJStpZKratbdVI3qfT9ZKJ3CoL4+OdYoWwb6F8/KqSc8LyMEUoe13p6jdxFEkb0TNvS/ 4Gx5VaP9w1dx5zyt/Dxb1/aesEN2+NVKSFCkaJoznlXhiVSkdyRMZEtcaPbDvyhiISXET0 6zVJKvFzP0WyufzHjSq5ryFv+yNzju0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-114-I9VUoG5xOYmly9AOkUWPiw-1; Fri, 08 Nov 2019 13:44:34 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2C0E4477; Fri, 8 Nov 2019 18:44:33 +0000 (UTC) Received: from llong.remote.csb (dhcp-17-59.bos.redhat.com [10.18.17.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42962600C9; Fri, 8 Nov 2019 18:44:32 +0000 (UTC) Subject: Re: [PATCH v2] hugetlbfs: Take read_lock on i_mmap for PMD sharing To: Mike Kravetz , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Peter Zijlstra , Ingo Molnar , Will Deacon , Matthew Wilcox References: <20191107211809.9539-1-longman@redhat.com> <20191108020337.pyf3ry3zsioh2ghz@linux-p48b> From: Waiman Long Organization: Red Hat Message-ID: <9c114cb4-cd93-41b5-f123-13815871d659@redhat.com> Date: Fri, 8 Nov 2019 13:44:31 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20191108020337.pyf3ry3zsioh2ghz@linux-p48b> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: I9VUoG5xOYmly9AOkUWPiw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 11/7/19 9:03 PM, Davidlohr Bueso wrote: > On Thu, 07 Nov 2019, Waiman Long wrote: >> With this patch applied, the customer is seeing significant performance >> improvement over the unpatched kernel. > > Could you give more details here?=20 Red Hat has a customer that is running a transactional database workload. In this particular case, about ~500-1500GB of static hugepages are allocated.=C2=A0 The database then allocates a single large shared memo= ry segment in those hugepages to use primarily as a database buffer for 8kB blocks from disk (there are also other database structures in that shared memory, but it's mostly for buffer).=C2=A0 Then thousands of separat= e processes reference and load data into that buffer. They were seeing multi-second pauses when starting up the database. I first gave them a patched kernel that disabled PMD sharing. That fixed their problem. After that, I gave them another test kernel that contained this patch. They said there were significant improved compared with the unpatched kernel. There is still some degradation compared to the kernel with huge shared pmd disabled entirely, but they're pretty close in performance. Cheer, Longman