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 1386DC433F5 for ; Mon, 14 Feb 2022 05:42:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3084F6B0072; Mon, 14 Feb 2022 00:42:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2B7626B0073; Mon, 14 Feb 2022 00:42:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A6616B0078; Mon, 14 Feb 2022 00:42:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0026.hostedemail.com [216.40.44.26]) by kanga.kvack.org (Postfix) with ESMTP id 0885D6B0072 for ; Mon, 14 Feb 2022 00:42:55 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id AA3E49CD4D for ; Mon, 14 Feb 2022 05:42:54 +0000 (UTC) X-FDA: 79140291468.10.00D7C28 Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by imf03.hostedemail.com (Postfix) with ESMTP id 3CC8120003 for ; Mon, 14 Feb 2022 05:42:54 +0000 (UTC) Received: by mail-qk1-f175.google.com with SMTP id w8so13549009qkw.8 for ; Sun, 13 Feb 2022 21:42:53 -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=mgDBiAgrDE+HzdrWiW9X6X5k1U05FMaVyhBfS9IYqQk=; b=hyBPt5rxqBrVtpTfh1GbduDPv1o+7rezTszUd0x9z+uTt8/brT5CqtxuiuFhRP+BEi SQQS8iL7lt9v7yDR+sjnGpXCUrqAuDoiNeopGu7hvV+JNIzKUcrSlqMy+AYy+yZFAroZ uUOtWdSD4vlu51XKZohNmk8KZWs1iQXWoxfdk4XtQmHp95WSw5IEx2/ggNK/6vZerb9l +Yn8lXMkVsSRnLMTPMHPWlRmku1ziQLfDp+aSTxWO8Km5KHPr5sa4SlHaETlYb2a1pe3 W9xRhX1KnHTNdUiJfG/SuKRPQhGjy+TWpmdBgUF2+CNUfCTbb1W5RD/wMk1k8FshKVC8 rHQg== 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=mgDBiAgrDE+HzdrWiW9X6X5k1U05FMaVyhBfS9IYqQk=; b=uLD0Kt0ycBwUDGmSG+4oYt7zYAJp2mGOxebjHvWXAbRR+PqW3i55Zp/Ml6T9+4cNu2 V1rNXX/IKQTll3VH1SwY5DkDUELav/Hn6e+JWWiHK/FTAy/hOgfJ0h160TiTXKBTqIKp WfYtxzNL7PijWhDN95jQ9V5gtzQgJBVzNY1tO48VpL2i2c3RoMiAmqpEWp5HWiJq+Idt 0MOyltfPnb4nzgoOXwwyfswuCgJAKU6miiEcqdfKMtDLuAttp35bMCoHYE88VIr+btp1 Z9Mq1ho9NEKYswgo0igQbfBa2C5CbRQWptLiG1FiPfKCieySQAu9t40vogU7aFdZrj1Q 4ePw== X-Gm-Message-State: AOAM531LFaci/qGY8RAWjicgjoerPCJhCJJlx91Nh31+5mZ8//JHdO0Z 5Dx5SNqs7RtGx2DYpwb14s1vBg== X-Google-Smtp-Source: ABdhPJy3dq7YiFDBVxyQp92TqbStWUS0h8WxS19ewftiosU5Eyqx7PxENsx2f/Yw7ifyCPDm4x6lLQ== X-Received: by 2002:ae9:eb4f:: with SMTP id b76mr6187977qkg.690.1644817373328; Sun, 13 Feb 2022 21:42:53 -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 j14sm16111320qko.10.2022.02.13.21.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Feb 2022 21:42:52 -0800 (PST) Date: Sun, 13 Feb 2022 21:42:49 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@ripple.anvils To: Vlastimil Babka cc: Hugh Dickins , Andrew Morton , Michal Hocko , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Alistair Popple , Johannes Weiner , Rik van Riel , Suren Baghdasaryan , Yu Zhao , Greg Thelen , Shakeel Butt , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 06/13] mm/munlock: maintain page->mlock_count while unevictable In-Reply-To: <826e69d0-c81c-06c1-c675-b54bd4557ff3@suse.cz> Message-ID: References: <8e4356d-9622-a7f0-b2c-f116b5f2efea@google.com> <3d204af4-664f-e4b0-4781-16718a2efb9c@google.com> <826e69d0-c81c-06c1-c675-b54bd4557ff3@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 3CC8120003 X-Rspam-User: Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=hyBPt5rx; spf=pass (imf03.hostedemail.com: domain of hughd@google.com designates 209.85.222.175 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com X-Stat-Signature: muy51yjb7s4j66jmtohs7cky8nnemubm X-Rspamd-Server: rspam11 X-HE-Tag: 1644817374-126607 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 Fri, 11 Feb 2022, Vlastimil Babka wrote: > On 2/6/22 22:40, Hugh Dickins wrote: > > @@ -115,6 +116,7 @@ void lruvec_add_folio_tail(struct lruvec *lruvec, struct folio *folio) > > > > update_lru_size(lruvec, lru, folio_zonenum(folio), > > folio_nr_pages(folio)); > > + /* This is not expected to be used on LRU_UNEVICTABLE */ > > Felt uneasy about this at first because it's just a _tail version of > lruvec_add_folio, and there's probably nothing fundamental about the users > of _tail to not encounter unevictable pages. But if the assumption is ever > violated, the poisoned list head should make it immediately clear, so I > guess that's fine. Yes, I could have made that one check against LRU_UNEVICTABLE too, but thought we would rather see the crash on the poisoned list head: since specifically choosing the tail of an unordered (and imaginary) list raises questions - it might turn out to be best permitted, it might turn out to require a rethink; but until there is a case, let's crash on it. Hugh