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 E8247C433F5 for ; Tue, 22 Feb 2022 15:21:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 735668D0002; Tue, 22 Feb 2022 10:21:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6BE348D0001; Tue, 22 Feb 2022 10:21:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 538568D0002; Tue, 22 Feb 2022 10:21:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 3E59F8D0001 for ; Tue, 22 Feb 2022 10:21:32 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 06D1B60FAA for ; Tue, 22 Feb 2022 15:21:32 +0000 (UTC) X-FDA: 79170780024.01.6124E1F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf25.hostedemail.com (Postfix) with ESMTP id 53F0EA0009 for ; Tue, 22 Feb 2022 15:21:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645543290; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t8l5PJCPnTCzVePHoOuB/aOhZkhMEfR0E0RLaLQlVdg=; b=AXxHIW1owQOPKQDBCftf6a/Vkw1GtI2kXdQaqDyCVD1jzjYVQWojf1tCKZyQ09wXgBsyEX zHOLJLDdO7Fn6vAv7fQcquayl6tVEOAtFY2etszfDtY6/aWo/QBrhNnbR3CPTyo4LKnRAt glfAJXx5kiC/ugA8cbZNTEAif9fYNGI= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-526-ioYf7AliOceB1hlRxGCQfg-1; Tue, 22 Feb 2022 10:21:29 -0500 X-MC-Unique: ioYf7AliOceB1hlRxGCQfg-1 Received: by mail-wm1-f70.google.com with SMTP id ay41-20020a05600c1e2900b0037c5168b3c4so985157wmb.7 for ; Tue, 22 Feb 2022 07:21:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=t8l5PJCPnTCzVePHoOuB/aOhZkhMEfR0E0RLaLQlVdg=; b=FOnlrvSWlGOYA9Z9l/k/0q9AghDgQqwiPwG8p0DJdmygqlzWOxiBDCJiijoxMydWGy UCuUYMRnhHzQdXEnwyR6muVkNPQxGkETbkgo4ztPXn8bSzIx7sSPuHz2hhWt5B3jgwTf sZZ3l/fRh+Z689BSgNEAhb8IJxvKpIqmJWVD4dctGu96DjibjEGUevYFWFRcnhuxzLi9 NAPMaQH28erEgpVFpdfnJiHGYa/FGVXfnnldGDI3UFOdRhnB7EMKJFvuODl/20zhVrZP ZjE2sAXQlzpWqC2v9aBSP8j7rJ0+VoroIqS2P+OqhKq8ZRxIepT4UYQzDa4qXYbf4E5U LDSQ== X-Gm-Message-State: AOAM533ltbyg2tgLJHYPIC6ndUHVi8LcK9lAOfxIhiGB7OWQq420GD1l 6KX+Tr7/a+Sx116jdyz+wJ2wdgo0v4fL189YNaaxU/M6WWQcpjfvt7Gn5NT1e228KYD1xNdQthv J90aBy7KX9wc= X-Received: by 2002:adf:df12:0:b0:1ea:973f:9890 with SMTP id y18-20020adfdf12000000b001ea973f9890mr2341664wrl.65.1645543288132; Tue, 22 Feb 2022 07:21:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzqJF32bzLsgYury03YWH5n07dggag/D6Bjoypm5aoTerwO+vp29KtNOGH1QDLtFs89EHtnDQ== X-Received: by 2002:adf:df12:0:b0:1ea:973f:9890 with SMTP id y18-20020adfdf12000000b001ea973f9890mr2341646wrl.65.1645543287955; Tue, 22 Feb 2022 07:21:27 -0800 (PST) Received: from ?IPv6:2a0c:5a80:1204:1500:37e7:8150:d9df:36f? ([2a0c:5a80:1204:1500:37e7:8150:d9df:36f]) by smtp.gmail.com with ESMTPSA id d14-20020a05600c34ce00b0037bdd89e3a5sm4306164wmq.3.2022.02.22.07.21.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Feb 2022 07:21:27 -0800 (PST) Message-ID: <5f96c7e306546af4604cfaddb895a089811cb99b.camel@redhat.com> Subject: Re: [patch 1/2] mm: protect local lock sections with rcu_read_lock (on RT) From: Nicolas Saenz Julienne To: Marcelo Tosatti , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, Minchan Kim , Matthew Wilcox , Mel Gorman , Juri Lelli , Thomas Gleixner , Sebastian Andrzej Siewior , "Paul E. McKenney" Date: Tue, 22 Feb 2022 16:21:26 +0100 In-Reply-To: <20220222144907.023121407@redhat.com> References: <20220222144706.937848439@redhat.com> <20220222144907.023121407@redhat.com> User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 53F0EA0009 X-Stat-Signature: rh7zieefu4puky8cm7odp9xjijzoqhc1 Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=AXxHIW1o; spf=none (imf25.hostedemail.com: domain of nsaenzju@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=nsaenzju@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-HE-Tag: 1645543291-818307 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 Tue, 2022-02-22 at 11:47 -0300, Marcelo Tosatti wrote: > For the per-CPU LRU page vectors, augment the local lock protected > code sections with rcu_read_lock. > > This makes it possible to replace the queueing of work items on all > CPUs by synchronize_rcu (which is necessary to run FIFO:1 applications > uninterrupted on isolated CPUs). I don't think this is needed. In RT local_locks use a spinlock. See kernel/locking/spinlock_rt.c: "The RT [spinlock] substitutions explicitly disable migration and take rcu_read_lock() across the lock held section." Regards, -- Nicolás Sáenz