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 B18EBEB64D7 for ; Wed, 21 Jun 2023 13:22:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3D2CB8D0005; Wed, 21 Jun 2023 09:22:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 381F88D0003; Wed, 21 Jun 2023 09:22:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 249958D0005; Wed, 21 Jun 2023 09:22:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 1221C8D0003 for ; Wed, 21 Jun 2023 09:22:35 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id DC2791606DC for ; Wed, 21 Jun 2023 13:22:34 +0000 (UTC) X-FDA: 80926819428.11.F3753CC Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf12.hostedemail.com (Postfix) with ESMTP id AFAC240010 for ; Wed, 21 Jun 2023 13:22:31 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=hQ2hemcw; spf=pass (imf12.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1687353751; 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=CC+yKpcLMxJXBu6T7SEQAY245AXU+wJ7xtJmJhzdfxo=; b=CDao3eOFhJP6MZGWGer+Vp9pouFIMzwCqRtItIiOd0vqz4Wf9d21FBDRpE8o2AHOzB0Vtg r5aM/iL3yNVjSH7m0OryE0nws+6/KImvioguJpNdhg189CwHOOmpLc9/RQyp4KhL6jGGNc /AUR+PSuLPaDuk1Wj0bHKyzKDl3uxJ0= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=hQ2hemcw; spf=pass (imf12.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687353751; a=rsa-sha256; cv=none; b=TTjhdqObHiHpQ27zQfv99s8rASWBx0nWQlOAUbbkxeTto58RWR6jLrQJZqHuZwS1V38rON RCB7OWATu2QyV1yCGP8FNufvZCU10iF6KrSisDyAg1lWGAg6DYX4wafhD9wX4ZUhASCV9e 1Ma2+qn6Yh5z3K8NMxffgEJGGD9Y1xg= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 494F721D1E; Wed, 21 Jun 2023 13:22:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1687353750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CC+yKpcLMxJXBu6T7SEQAY245AXU+wJ7xtJmJhzdfxo=; b=hQ2hemcw1HRXF8iYA0YV97cdlmzNpIGQN10o1P/OqgAOem8v8bV4f0c4hUHO7o529vWND3 /XI1+Mt141BQlGwDW9NNMztDcO0ZmDcf+r72q6KzBoXelZpbqOMFM6rgGuLJbwZN/IljW1 3IYvI202IZLpwWl7B3xuDNDHhpyPQbw= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1D261134B1; Wed, 21 Jun 2023 13:22:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 1PvQBJb5kmTLZQAAMHmgww (envelope-from ); Wed, 21 Jun 2023 13:22:30 +0000 Date: Wed, 21 Jun 2023 15:22:29 +0200 From: Michal Hocko To: Sebastian Andrzej Siewior Cc: linux-mm@kvack.org, "Luis Claudio R. Goncalves" , Andrew Morton , Mel Gorman , Tetsuo Handa , Thomas Gleixner Subject: Re: [PATCH] mm/page_alloc: Use write_seqlock_irqsave() instead write_seqlock() + local_irq_save(). Message-ID: References: <20230621104034.HT6QnNkQ@linutronix.de> <20230621111636.92RxISzY@linutronix.de> <20230621131125.XC2Pgojw@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230621131125.XC2Pgojw@linutronix.de> X-Rspamd-Queue-Id: AFAC240010 X-Rspam-User: X-Stat-Signature: rme7fe7yxfg1cssicgn68aiopn46e9hu X-Rspamd-Server: rspam01 X-HE-Tag: 1687353751-822309 X-HE-Meta: U2FsdGVkX1+AYlOfVBPcaxiWZfN0Aq8988679hIYP6tMUZqk6OCawOyucrEUOIeeeiL4s8czP0JBWu1QcW+66RF/6x2wL+o4gDTAHmSAJqNSv7W+rZOLgbidosevCESb+n7HtO3VhOBA45TNnQ1Eo4taHZ/iXQCndU1gmm8ycPviWATMXE5F67LY3j7YhuYKb9uSt29skCDRl4/LcgsMbFlob69A0h1SpY/Up3BNb7yVfTIrDUooYXmAbWpBR+MJHYUcCZUBdomfBh12qCioD/7On/2M0AZzbkHKTaGXjuzqS/xm8SOvk3uP8tIL8fjak+Q1xkz1+YvYRc9z8jUjto7lAUDHHfTMBUGUdqlC5wmybdLXcW/HbHftjDmJB6zH/TgDZrys0hVA6f4tX2KI9FDegn1QAvrdQYgv6dsoPPhM+g2YjqwDOmtmozIuyFq0waniaePacBA8KOQp5vSkASlVa7eXl3WX23tl8oDgX7sJAXKwHjhH622Kmi167ENhwzocH+BhlwVu3GxJZbSPnF5SP2EX6Q6JwIRR3EzJq679IOL0EPtxMBqE9V2TnOo0S51CCVOnPcFUSvqQVE6KcLhjcaCsoeHCgQFom4Kaba5GUoEQGSMn2AXgNBN14TgN/+qOQlQ9EP83/3vnzdENiCyFc0ZIP9IsdC+3DOmLu9YP/naJWKqUqmzYan/gvgP9ahrIGlY88telH4ZVnlt7QivSDW3iugi4yymL/1lf9cDqCFfUi7+3+ow7ehpcl7QsfEtVF8pRklqpv8EcmZAoG5Kn4sRTswEr+uLNR183scAQLcgAnz9ptbMi1o2ES7DDyFN7HTDsAFrbww5mjHGwoBwmryoyadSE+TsKelnSUpmZkmNZBSYBVkEMzOxxmSTqVOIoZSCAUOtkAC/Gp0Jm3ZTk0L7N0K+vqQq9ZD19UH4NXZUe3nraz3ma8FoCC2Be6lgJ+uhMIlCmyFJHI8y PFe7GrNT WwhbF0Qb7XrQwitXgOHTdmWJW8Af008zVaMUjsVZ8RY6NFQdiXcpt8p0sZMAP249gle7EY3K/GsE61r38biVRO3g+sn8xXEu4eO5txXrOFok3IxdbVxoR6FEoNN3Fia7lezEEe367oW9d5dZ3yjPMG89C8FLbVogyM93dVYNu8sX56FykVgVcrGOzEUCxptXHeyuSsjFo//1im3c= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000032, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed 21-06-23 15:11:25, Sebastian Andrzej Siewior wrote: > On 2023-06-21 13:49:06 [+0200], Michal Hocko wrote: > > > On PREEMPT_RT what you can happen is that the writer is preempted by a > > > high-priority reader which then deadlocks because the reader spins while > > > waiting and the writer is blocked. For this issue we have lock + unlock > > > in the seq reader to PI boost the seq writer so it can make progress. > > > > Please state the the problem explicitly in the changelog. You are > > marking this patch as a fix so the underlying issue should be stated. > > The problem is the "local_irq_save()" which I believe I stated. The lock > + unlock story was just a side story and is already covered. I really > need just the local_irq_save() invocation to be part of the seqlock API > so it can be substituted away. I really do not want to nitpick but your changelog states: "This is troublesome and leads to problems on PREEMPT_RT because the inner spinlock_t is now acquired with disabled interrupts." I believe it would be benefitial to state why htis is troublesome because not everybody has insight into PREEMPT_RT and all the consequences. Thanks! -- Michal Hocko SUSE Labs