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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F17FC3DA78 for ; Tue, 17 Jan 2023 19:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zYjt3q6JfCLngtXxmWd/3oQPNQ0CZDlWD35XOzJaVUg=; b=sV1cVxhoZPZ0+n hcMmiAm4vjBD5W1pRJuGH45CAEhQbeKRXJo51Ss/rL2Z6v0n5UNOyHNvLvwqeF/VeXAC5Mc9FmUTl fmpyKnsJqU/64i3x4//K3LFvSFVp0dyoShV4UJP6zJFB2lg9TL2YUANJqZHD5KnZMWhPrjjUaEtra vCXlJ+7Qm7steujGl6co+B0yM9kSMFUUT3ClT/J+I2ftKiFTH13XupcWNRd6/yGnu1aBYsx9o/t0W XFOMrYb7aH60cDBE+aJjTu5FGejCsSrgKvusxQ0Hc+vNvT/9ZGz88SNMwVbVsFYkX5ZyzNY61QFrY 9soirdi3IXSy9e53C9ew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHrD0-00FWj2-3n; Tue, 17 Jan 2023 19:01:22 +0000 Received: from mail-yw1-x112e.google.com ([2607:f8b0:4864:20::112e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHrCx-00FWiJ-MU for linux-arm-kernel@lists.infradead.org; Tue, 17 Jan 2023 19:01:20 +0000 Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-4d19b2686a9so308401907b3.6 for ; Tue, 17 Jan 2023 11:01:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LIZZvFyQtXHixD5sWfvEaQUvi24ljYnGZNh2fBEIyp4=; b=CjLP+GN4eJ8YGFZvjoqXnYn0mL/Nm9o57f+7WOJDJDHEjmOn/4ZZF6+enYJUFh56p6 ZjMUPNGSRgQRosE3EMtoX1RXdV9HlQD3govS4EbUA9vX5E0lvyII7jNgKbkxa9q55Ofi 5fHxRCrBasHddp+A5FhlnIGxMd1HsMsFjjUSptfu2Xn/GYum5SsgoXsfxk+bQ6S1eMxn TjquS1QRX6eEGqUoWMTLZ0Uen7LLC6vfFjMFZvmVjQlE+SMKypaTTEwOKRHnLLugiZMU Ca7UGjlXIklsuObkggD1KlRzV4LfytQE7UWnMkJIywJkawE+81OksYcPHkL0icjcL46L ZAWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LIZZvFyQtXHixD5sWfvEaQUvi24ljYnGZNh2fBEIyp4=; b=5zJBg8krV9b0x1HgJBKyJa20fZrdBT23XthZpbdlHvO5C53W5KwHTAxxEQr/yg0XA6 5aG2WvxKEyzMGjvGHqWRElVVsKdEv0rT8hEGQy6UU4jwyqaTOnpwUtEIuvMCIHvTAGML mLFDeHtL8Gtn2MDXeAi2+xplTE9ARuqsXNaO9EPyjl5IiLfO2hAIC7mGkJKJtx8IItt5 w5EwdSjuQi9V4RdTLTWbrjAB13Po3dSXQgf808wPk5ZFiggCy9mE64C+YwJOokOYu4rQ fC9BUiPndWh6u2eiaZGRKMGBmaT04RABIu18kou7PkH0wpu0DrAoldQoQLRRxv7XanXL 77pA== X-Gm-Message-State: AFqh2kqixpyUSIUT2/ayWEUiwKFu6AP1aHGxTB/nczF8YF8h4rYtfekb rBix6eWkrlHMqUTOlFmUWwX/F+SGNV3ebBOGURsWAg== X-Google-Smtp-Source: AMrXdXuXSHUCPjq8vGtgRecAo+K4qxgIc9+GydwwGOLIiPEqHLP5AyNSTg15twzR8exVpLWal97Wzf6SyesXXn7pY10= X-Received: by 2002:a81:9105:0:b0:3dc:fd91:ef89 with SMTP id i5-20020a819105000000b003dcfd91ef89mr459982ywg.347.1673982078402; Tue, 17 Jan 2023 11:01:18 -0800 (PST) MIME-Version: 1.0 References: <20230109205336.3665937-1-surenb@google.com> <20230109205336.3665937-41-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Tue, 17 Jan 2023 11:01:07 -0800 Message-ID: Subject: Re: [PATCH 40/41] mm: separate vma->lock from vm_area_struct To: Jann Horn Cc: akpm@linux-foundation.org, michel@lespinasse.org, jglisse@google.com, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@techsingularity.net, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, peterz@infradead.org, ldufour@linux.ibm.com, laurent.dufour@fr.ibm.com, paulmck@kernel.org, luto@kernel.org, songliubraving@fb.com, peterx@redhat.com, david@redhat.com, dhowells@redhat.com, hughd@google.com, bigeasy@linutronix.de, kent.overstreet@linux.dev, punit.agrawal@bytedance.com, lstoakes@gmail.com, peterjung1337@gmail.com, rientjes@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, shakeelb@google.com, tatashin@google.com, edumazet@google.com, gthelen@google.com, gurua@google.com, arjunroy@google.com, soheil@google.com, hughlynch@google.com, leewalsh@google.com, posk@google.com, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230117_110119_753485_E0792685 X-CRM114-Status: GOOD ( 14.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jan 17, 2023 at 10:34 AM Jann Horn wrote: > > On Mon, Jan 9, 2023 at 9:55 PM Suren Baghdasaryan wrote: > > vma->lock being part of the vm_area_struct causes performance regression > > during page faults because during contention its count and owner fields > > are constantly updated and having other parts of vm_area_struct used > > during page fault handling next to them causes constant cache line > > bouncing. Fix that by moving the lock outside of the vm_area_struct. > > All attempts to keep vma->lock inside vm_area_struct in a separate > > cache line still produce performance regression especially on NUMA > > machines. Smallest regression was achieved when lock is placed in the > > fourth cache line but that bloats vm_area_struct to 256 bytes. > > Just checking: When you tested putting the lock in different cache > lines, did you force the slab allocator to actually store the > vm_area_struct with cacheline alignment (by setting SLAB_HWCACHE_ALIGN > on the slab or with a ____cacheline_aligned_in_smp on the struct > definition)? Yep, I tried all these combinations and still saw noticeable regression. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel