Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5592116pxb; Mon, 14 Feb 2022 02:54:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqc2+zK/UDb80jYGE2Gmj5Ff/1fOMQPrBGTv2TpVnik4o0fKF5GrNYTAGxYMVs9PlmT/9W X-Received: by 2002:a17:90a:e553:: with SMTP id ei19mr14119597pjb.177.1644836091853; Mon, 14 Feb 2022 02:54:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644836091; cv=none; d=google.com; s=arc-20160816; b=mvgt6lJkYWbQF9euHby9puoCIEi0dMEpZW3py/prnftZBu2h9UAya4exXHLRuPmJhj ZO71fRmVQhLmbk82FiP7tbm/nDdrE7fcdUx8cj9WOyr1Wr+azxuF3E1XtNnLcLfOOwR+ olChPI6kG4t08xTVvPXK8ZAD1+AGPnbLZ3e938KynhasrhWDpuJarkqjrHNeH/ivQ4kP LK4TjgczB1HaSPfqv/0WRH1nvzIJvpWb3HickadtHkV2GEwBafjUJZkVtKJMH13rqkY+ fZh9CqYCOr1DGrudr+w9k8nr3Modq4gY/U2TjBwqKZkdypzQIxZ2R7kw63jjkaMbhQhv vrbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=mgDBiAgrDE+HzdrWiW9X6X5k1U05FMaVyhBfS9IYqQk=; b=Ifw/YZeqn0eb5/EJnKZouE8hB0/r5LtITQE8AOM1BIA3l6P5/IhZRhrwc+23d1y1A9 CsjqMRH55fiWuwhWoH9qjJDZAtZ5Q/PYplMNbHwJzZyt1O9N9TK43wKAD491Cn3BOzIO mBSl+ROgdXMzS8BXCQBNbfjoH4trXuJ5JhHp3i841+miC3yO374ogJSzpKWRsG3u5uUT oK0UNUwptwICSOl+DHHt+ItNQcq8By2h6gndJIdTKjy1+U3OJSD1SbJE8Kba9FB5cdCQ PpWa8CxLZObE2nYacduGZPhzgvJobF12TVYk+FL34VhhvubmbZTOialPXfE0wqDk4DlW v6FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=hyBPt5rx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n2si13474752plf.378.2022.02.14.02.54.37; Mon, 14 Feb 2022 02:54:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=hyBPt5rx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232438AbiBNFnD (ORCPT + 99 others); Mon, 14 Feb 2022 00:43:03 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:41010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229854AbiBNFnB (ORCPT ); Mon, 14 Feb 2022 00:43:01 -0500 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E2974EA1B for ; Sun, 13 Feb 2022 21:42:54 -0800 (PST) Received: by mail-qk1-x729.google.com with SMTP id 200so13577550qki.2 for ; Sun, 13 Feb 2022 21:42:54 -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=r6BNK/T5QLmAx2ap/YwLqaJGNdGw9Prah0vntRY+6m1E9oudVT3wz0fwInf8KVSUNO RqHuPxWn23LgfwY+oZuTdQVSq4vjwl83vqLRQaGtPADpvhgg44IUEe8Pkm3ss7c5gjtC rHANs/KaQkqpZQcAcEwjDYHgrhbU7Chc6Rhei3ajJNGv1ank/sO9wiWVsR4NWg/1lv7W wXkFPIvSEMARzYUDwDIDbOy7EZrywLjg1rmj9WXGHt2xMuZEm+ghaaOAbwNxzXWfbY2J 2WKzHlrsecmT2UQbx6Bs6vnai0DYks9KVteqOCK2ja4iu31v+1p6zyanqv458arapzba rZTA== X-Gm-Message-State: AOAM533vP30ZifLw6CVVgHSnpOTuvJLh+c09sML/xHnxx64XaoGr7OGV Y4dt5APv5AaohI/MVd5r2xQNlg== 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-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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