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 47228C433EF for ; Thu, 10 Feb 2022 04:37:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7E95C6B0073; Wed, 9 Feb 2022 23:37:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 799596B0074; Wed, 9 Feb 2022 23:37:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6608B6B0075; Wed, 9 Feb 2022 23:37:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0184.hostedemail.com [216.40.44.184]) by kanga.kvack.org (Postfix) with ESMTP id 569FF6B0073 for ; Wed, 9 Feb 2022 23:37:34 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 035B895278 for ; Thu, 10 Feb 2022 04:37:33 +0000 (UTC) X-FDA: 79125611586.25.1F05C15 Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) by imf04.hostedemail.com (Postfix) with ESMTP id 92FEF4000A for ; Thu, 10 Feb 2022 04:37:33 +0000 (UTC) Received: by mail-qv1-f51.google.com with SMTP id d7so3809381qvk.2 for ; Wed, 09 Feb 2022 20:37:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=Yn6D5zszKlFFTj2ppKQupmnyQ5qIo8Lc60YvIthRsEY=; b=qW92ZoTcKqckRiGPMTxt23+m9OqS4N94afHcq9j/4BRKnlwh8S/OxBT5OZ/yJZhkg+ wXMBKMIhHrYjR++xkkK2a0vFPdhpK25q8eVdi5fnPRFDmrJojRhj9FeqlFbSxWGVsuri NTT1MzCBARnAUBH+7hGwqe1Ui8V3nXhoUwKKHDDzDr92rr1CVDQusOrqh3UZgyjmBgjQ TPCnLg6i9mgNh8Avx5fy11ERWw77IzlyGY0Ssd6BGVE52BB+yuAhlOeMkdSzl1gaF0W+ O1o9z9w5qvsqPXB/7XCoCJPysXUj5ZsZZJU8IpwwHDuU6de2OHPCdGCwPUxplt4heCBl PKEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=Yn6D5zszKlFFTj2ppKQupmnyQ5qIo8Lc60YvIthRsEY=; b=Lx9E9+c+vRshWmZIsinJU3Xbr00J8aUGD/YrlVeSBpZDGS9hAvj/94xOn1iWqU+DbH MkZByi0rv6kill2LjzsH8nPUswJXLBcaXVTUSicuGN/EmY/g2WTjUg0TiBn37Hd2ANxX u00YCmpFOZvgYt3i+2uAOLZP12CCJY7botmsQfGv0Pi6GyptHYxY3ky4K/KK4DGsxxzO CYTYsIBEGCFIORXq3h/9/78etLKplT0s4Vnagi5x4EY8lQWik9c74DO3F1ClKy2GgOU7 uHSW4x5krnmReMVH3VAlBJxbgdmpeePKPJCtHsa+Y2eu2tcSJ2oBoE3TIwlQS8Gv3vvk 7lZw== X-Gm-Message-State: AOAM530XZKwfS7uSw4+HI0ACmfuSaPMIcDfVUBNdrDLTJRiQDIrhPHvI Ab6v6UspR6WcnlSZOxmdJOMnZA== X-Google-Smtp-Source: ABdhPJxuuIgMQDhC4FYhTpD5F+jZXdAdK+z59w4/q95HooTGaDUbGSqm89h2112MIthns8qBBeCe/A== X-Received: by 2002:a05:6214:1bce:: with SMTP id m14mr3865403qvc.102.1644467852786; Wed, 09 Feb 2022 20:37:32 -0800 (PST) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id p10sm8941203qtx.62.2022.02.09.20.37.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 20:37:31 -0800 (PST) Date: Wed, 9 Feb 2022 20:37:16 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@ripple.anvils To: Geert Uytterhoeven cc: Hugh Dickins , SeongJae Park , Andrew Morton , Linux MM , Linux Kernel Mailing List Subject: Re: [PATCH for-mm 1/2] mm/internal: Implement no-op mlock_page_drain() for !CONFIG_MMU In-Reply-To: Message-ID: References: <20220209094158.21941-1-sj@kernel.org> <20220209094158.21941-2-sj@kernel.org> <715a8b2e-1048-c098-8b89-bcf3c13cbd75@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=qW92ZoTc; spf=pass (imf04.hostedemail.com: domain of hughd@google.com designates 209.85.219.51 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com X-Stat-Signature: s9p1zoxf4nh4rcrp59h3x3hqigfn8eba X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 92FEF4000A X-Rspam-User: X-HE-Tag: 1644467853-829883 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 Wed, 9 Feb 2022, Geert Uytterhoeven wrote: > On Wed, Feb 9, 2022 at 4:38 PM Hugh Dickins wrote: > > The thing is, SeongJae's patch makes me wonder, why did it not need a > > !CONFIG_MMU definition for need_mlock_page_drain() too? That's because > > mm/swap.c's call to it is under an #ifdef CONFIG_SMP, and I imagine that > > CONFIG_MMU=n usually goes along with (but does not necessarily imply?) > > CONFIG_SMP=n. It'll be safer to add a need_mlock_page_drain() stub too. > > RISC-V K210 is SMP without MMU. Thanks Geert, that makes it very clear that we also want the stub for need_mlock_page_drain(). I'll follow now with update of SeongJae's patch. My fear of wider implications of not having CONFIG_SMP turned out to be a false alarm. The UP lru_add_drain_cpu() calls mlock_page_drain() just like the SMP one does: the difference between them is merely that the UP case doesn't need an efficient way for asking in advance whether drain on another cpu will be needed. Hugh