From patchwork Mon Mar 28 19:57:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 12794157 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 88030C433EF for ; Mon, 28 Mar 2022 19:57:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 035408D0002; Mon, 28 Mar 2022 15:57:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EFC6D8D0001; Mon, 28 Mar 2022 15:57:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D76448D0002; Mon, 28 Mar 2022 15:57:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id C02DD8D0001 for ; Mon, 28 Mar 2022 15:57:24 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 8A9D023D32 for ; Mon, 28 Mar 2022 19:57:24 +0000 (UTC) X-FDA: 79294854408.03.E66F1CC Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) by imf12.hostedemail.com (Postfix) with ESMTP id 0ED5140043 for ; Mon, 28 Mar 2022 19:57:23 +0000 (UTC) Received: by mail-qt1-f174.google.com with SMTP id bp39so13393104qtb.6 for ; Mon, 28 Mar 2022 12:57:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version; bh=NGspnAFOzJSoDZcuTuDayNTMlf+9yY8D8Ve789Ll0sM=; b=jkm+7pi2evYjUioD24kEJ4jw5PSVqdjUsYal52RTsLOFxeM/JoTW0tmGWK/fsDGF9b dW5MW3VY0ParUG+jUCsp9i2mofXCCMhyHbESxtxK+Tf/4iKI91/RWDhdDQu8Ec4i5DGW G9B+Re0ozD0/P1U02GKOGXSrp/SL59FyJ+Q7vwpVp1Nb4BgnW/I6wwdgXUTOXwVD8UoJ GFlAJXjk5bip6TuZEryLoRVUdgTkXFWPW4aD4OzJ7uqRbqMu7DLajDrviY7g1A4jHOPJ eHfdaH5pc/CghBjQz7k3tG0+PNd5ee/u/TQ0rmubKYYsGZeUNexxJx5gz2rZPzf3Unli 0Aaw== 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:message-id:mime-version; bh=NGspnAFOzJSoDZcuTuDayNTMlf+9yY8D8Ve789Ll0sM=; b=kfn+u2aHYEIgPBasuYZreWo6PkCKwF/u3D8EXciGODsQE1zdSKBjl9ts9X/p0DpNSr ceiI8SFa0/AvRMZGD+S2csV977EgMUr0IUIrVk+LSYelAokVoJD66/r5ADx4TRlEOjQi bNvubvGKoSewFQhtTrIg27BkGdJT4vmBZXj5VnBecadzhb3d1rlmLUMLm38ZOM+PieYJ HXEJ3jSwfU05vPdhEH3cLOJw5juVdJocit0Au0Ef+hIXI5A5FjhvIe9dJFSAtFaU6uCN xCilDMEmOQelblIedqC3uHbFW3quT056V/uoWPU/9yzuclyM41Q4N6jqYBogNlzIWuY8 7rOg== X-Gm-Message-State: AOAM531sVCLjPDugFsQSXgE6iYpNo20OSN6YG8kbp2lJ7inCB19IdHKI 5h060wEvAEyp6ZytVK4OGyvYQw== X-Google-Smtp-Source: ABdhPJxZEMZqwqCh8vPDbf/fPBdNzAmZVrSRzj42G402jWvD8pjIgfONlUqwp3H8KQZmFogpt6dUnA== X-Received: by 2002:a05:622a:552:b0:2e2:72c:a05b with SMTP id m18-20020a05622a055200b002e2072ca05bmr23563976qtx.409.1648497443168; Mon, 28 Mar 2022 12:57:23 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id q8-20020a05622a030800b002e1c9304db8sm13082619qtw.38.2022.03.28.12.57.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 12:57:22 -0700 (PDT) Date: Mon, 28 Mar 2022 12:57:20 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.anvils To: Andrew Morton cc: Stephen Rothwell , Matthew Wilcox , Vlastimil Babka , Hugh Dickins , linux-kernel@vger.kernel.org, linux-next@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH] mm/munlock: remove fields to fix htmldocs warnings Message-ID: MIME-Version: 1.0 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 0ED5140043 X-Stat-Signature: hw9gnabp5d6x4oq8n6gdp7mcoabdjsa6 Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=jkm+7pi2; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf12.hostedemail.com: domain of hughd@google.com designates 209.85.160.174 as permitted sender) smtp.mailfrom=hughd@google.com X-Rspam-User: X-HE-Tag: 1648497443-237399 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: Stephen reports that 'make htmldocs' currently issues two warnings: include/linux/mm_types.h:275: warning: Function parameter or member '__filler' not described in 'folio' include/linux/mm_types.h:275: warning: Function parameter or member 'mlock_count' not described in 'folio' Certainly __filler doesn't want documenting there, and all but one use of mlock_count is through page->mlock_count at present: so I think it's best just to remove them both from struct folio for now, and sort out the right way to document folio->mlock_count once that is the one true way. Reported-by: Stephen Rothwell Fixes: 07ca76067308 ("mm/munlock: maintain page->mlock_count while unevictable") Signed-off-by: Hugh Dickins --- include/linux/mm_types.h | 8 +------- mm/swap.c | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) --- 5.18-pre/include/linux/mm_types.h +++ linux/include/linux/mm_types.h @@ -253,13 +253,7 @@ struct folio { struct { /* public: */ unsigned long flags; - union { - struct list_head lru; - struct { - void *__filler; - unsigned int mlock_count; - }; - }; + struct list_head lru; struct address_space *mapping; pgoff_t index; void *private; --- 5.18-pre/mm/swap.c +++ linux/mm/swap.c @@ -1026,13 +1026,13 @@ static void __pagevec_lru_add_fn(struct folio_clear_active(folio); folio_set_unevictable(folio); /* - * folio->mlock_count = !!folio_test_mlocked(folio)? + * page->mlock_count = !!PageMlocked(page)? * But that leaves __mlock_page() in doubt whether another * actor has already counted the mlock or not. Err on the * safe side, underestimate, let page reclaim fix it, rather * than leaving a page on the unevictable LRU indefinitely. */ - folio->mlock_count = 0; + folio_page(folio, 0)->mlock_count = 0; if (!was_unevictable) __count_vm_events(UNEVICTABLE_PGCULLED, nr_pages); }