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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0E8ACDDE69 for ; Thu, 24 Oct 2024 09:57:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 07EC66B0083; Thu, 24 Oct 2024 05:57:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 02DD26B0085; Thu, 24 Oct 2024 05:57:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E10E86B0089; Thu, 24 Oct 2024 05:57:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id C07736B0083 for ; Thu, 24 Oct 2024 05:57:11 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id C1611C11A5 for ; Thu, 24 Oct 2024 09:56:51 +0000 (UTC) X-FDA: 82708042494.14.57D9D0E Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) by imf03.hostedemail.com (Postfix) with ESMTP id A05C820004 for ; Thu, 24 Oct 2024 09:57:00 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=QWlWgIhc; dmarc=none; spf=none (imf03.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.92.199) smtp.mailfrom=peterz@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729763717; a=rsa-sha256; cv=none; b=MXx0xZ09SqYVZ/UBWAEYIFN7wecM568w/HvLz1c4K0YtGW+Eme2KhWHvzSU4Y5YdIjrQCR I/Lh3nh/5fwnBeE5IaLW+3oh1RWmDoIplR0oWrEsComikgrJHo/xLFA1rBVBXqpE+ybBvW xa9G8yg5gX623xInRobWnyLHIuxh15c= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=QWlWgIhc; dmarc=none; spf=none (imf03.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.92.199) smtp.mailfrom=peterz@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729763717; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rzpvzquYLWtBHVgVkBB32hWAp+AI3BVUB9oT07w6q0k=; b=iS0vKkJ3Pt3hmVNZgK0L4VmouWQDZ5TI5eEhQiI1icpCnbqHb9u6bUFftilZwZTX04yfJ3 NJu2yGww1eGBpLg/r4Cj/ZQgSRegrOp2BFVPj30gpfUxBm8ZKHJY+uDXkHUuWmq88ltfBn k1+fT3rTuN/H2ZlwzVursUpxTjkRkxA= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=rzpvzquYLWtBHVgVkBB32hWAp+AI3BVUB9oT07w6q0k=; b=QWlWgIhchbPRGKHewwzWOna/4/ p/ueuwd3CjrM2/ZUlhh+eYL/Dxdn0K61jVg9/tSzMzxb2eVGvKW2BK9oixA+0CpgPP5sMu0kRrSsP mZxbEwUMev3gMfIhcWP8P6x+7Gc3/8MdOyNC20el1poSgIn5MOZof6FDGwNCQKRlIBMdFDQ1kbpOo e2OvUDgkSMJFsciLZgoVHVMoR7nYztJfaE/c6zl9oyDDG/DXUon3rgaMDkzirZd06WUsOzRUiLFq9 65NEWncjyDKBMQUa6nE0OXNgGHTIs1mcK/ohhjuuwTC2tjRybStJmWzJk0iUBwljvdxwJpnRqxpyR PKkx2SOQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1t3uaS-00000008dc2-1BLX; Thu, 24 Oct 2024 09:57:00 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 63EEB300599; Thu, 24 Oct 2024 11:56:59 +0200 (CEST) Date: Thu, 24 Oct 2024 11:56:59 +0200 From: Peter Zijlstra To: Suren Baghdasaryan Cc: Andrii Nakryiko , linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org, oleg@redhat.com, rostedt@goodmis.org, mhiramat@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, jolsa@kernel.org, paulmck@kernel.org, willy@infradead.org, akpm@linux-foundation.org, mjguzik@gmail.com, brauner@kernel.org, jannh@google.com, mhocko@kernel.org, vbabka@suse.cz, shakeel.butt@linux.dev, hannes@cmpxchg.org, Liam.Howlett@oracle.com, lorenzo.stoakes@oracle.com Subject: Re: [PATCH v3 tip/perf/core 1/4] mm: introduce mmap_lock_speculation_{start|end} Message-ID: <20241024095659.GD9767@noisy.programming.kicks-ass.net> References: <20241010205644.3831427-1-andrii@kernel.org> <20241010205644.3831427-2-andrii@kernel.org> <20241023201031.GF11151@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: A05C820004 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: wq4ejxn8u1ryru9wxmy81ifp4myfp5ok X-HE-Tag: 1729763820-656557 X-HE-Meta: U2FsdGVkX182FuKMuf1PxIUamfAEXlv/YtkNIx9ULPliBqlyO8mKysEEosZHfnoCs9nZRHgVp8akihF1AadbJHpo7oGXTFwkzLbKyrWou5tj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gzzYuABWXHpiM9o0irF8qgjag8jq8ZgDqc6whTGbbMzkJWtuJA== 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: List-Subscribe: List-Unsubscribe: On Wed, Oct 23, 2024 at 03:17:01PM -0700, Suren Baghdasaryan wrote: > > Or better yet, just use seqcount... > > Yeah, with these changes it does look a lot like seqcount now... > I can take another stab at rewriting this using seqcount_t but one > issue that Jann was concerned about is the counter being int vs long. > seqcount_t uses unsigned, so I'm not sure how to address that if I > were to use seqcount_t. Any suggestions how to address that before I > move forward with a rewrite? So if that issue is real, it is not specific to this case. Specifically preemptible seqcount will be similarly affected. So we should probably address that in the seqcount implementation.