Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2885416ybx; Fri, 8 Nov 2019 10:45:48 -0800 (PST) X-Google-Smtp-Source: APXvYqyGzK08kX4zdOQkqB3ZtMnnlsJqBYTEWP2TiiFsaxA88jDT+uQG213UVJMa2HKDOuO0wBjl X-Received: by 2002:a05:6402:339:: with SMTP id q25mr12289278edw.80.1573238748259; Fri, 08 Nov 2019 10:45:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573238748; cv=none; d=google.com; s=arc-20160816; b=mAwoR6R8osNkEhVzn0wcxODWmuL+AH3JaMA/yUw4wdecnqC0OK7sUn6UNfeetVli8Z mXrQukezPv8s/3JoHOKRY8kN3N3RzH83BgmofT4SU6v8T+pKMZzmsObkmN8l0zQucxu+ y/vr81tgp4Gn9AYTThhpP5RXorrA025dohQNi4BvqnWKXLg567Q4t+QtQRozNwiWaRKe 37MXSRK3knMRguM89JYG4jfBIzFDxXE4eiaLob1HoKHPHiI+Qc6cvzHdQPFqHSUOiwtx xfElH+II45OzZPXXAluJj7n3mb2/4rhOV1Y39McnTpu7KTi3uT/7fEUkb2h79HiLwWX+ TDBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:to:subject:dkim-signature; bh=54brm5rGO/mYSNJW+nP1TupX0Iz3rREdtgTrvEffbAQ=; b=uOCVGWwYzdlzf99C0n0znk3Sze1NnQ/RdZ6NLB0zacJy4PZA+twNslDb0cWm8+Xk/D tVSeKo3v52X2NvphB0YR7LnkK2etcUV7fgGJ5FWme0HgG0EEdp4Q0SWR6YBjNXuuX/xa EAgpjeYgqloK89HW76pPasTsY5p3GEbCbIb08weLZ8mXrQO0XfjOxpJ81qw7+rVv1RmT 5nnawhiPH0ISmjWpmkYOQVxZg8s5n3iJ9wPW+3ulLQ2Ijv3PQggodKQmh4+62brvH6J+ n9SxPptAHDPnpsgQXOS7rLIFPYI4E6aEt1eBmGm0fPml4AflhCSCl3i3JzcCqgoAVbcv zLmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gKnbjs0l; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l16si4368400ejc.171.2019.11.08.10.45.24; Fri, 08 Nov 2019 10:45:48 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=gKnbjs0l; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730009AbfKHSoh (ORCPT + 99 others); Fri, 8 Nov 2019 13:44:37 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:53362 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726670AbfKHSoh (ORCPT ); Fri, 8 Nov 2019 13:44:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573238675; 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=gKnbjs0lQvO0s+ic/t+TdtYL+khDntP3tpZcSIaN9Uuk9azcEDV9sP8mWHI39hniqlMHGc 89wEkgBfXShAYAfm67/NJ+OOqi3qbha56qA7uNDPYRScfu+kxw6JFwmAXRK82zfIEkREIR z6L18hGhg6PsLC4221AAgYXt1tVT1m8= 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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