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 8D9D3C4332F for ; Thu, 20 Oct 2022 13:10:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D7DA38E0002; Thu, 20 Oct 2022 09:10:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D2C488E0001; Thu, 20 Oct 2022 09:10:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF3938E0002; Thu, 20 Oct 2022 09:10:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id ADF8B8E0001 for ; Thu, 20 Oct 2022 09:10:48 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 674FE1C6A6C for ; Thu, 20 Oct 2022 13:10:48 +0000 (UTC) X-FDA: 80041362576.13.956DC65 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 CA515A0037 for ; Thu, 20 Oct 2022 13:10:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666271447; 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: in-reply-to:in-reply-to:references:references; bh=WVYAKNZFP9AvH/lbqEre4C8lrF1P3191ZtQza+s/jZc=; b=TntW3JBopo5wc712o9aj38miMHP/U5w6OqdBcVwEVoL8V0fzUa66x4HvdQkPdQcA9vB9LX 49y8s4kNxMMJLnrszY/jfJLHi4VNPRWA8IwvK7Vjcy7O2C3oJgyyXbwEt2UApFglczwBfg +Sf1WZtK6SX/Wc3uPoL3Yih8rHBj0Yw= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-496-oXmOOOdeOTu_6qWy515_bA-1; Thu, 20 Oct 2022 09:10:46 -0400 X-MC-Unique: oXmOOOdeOTu_6qWy515_bA-1 Received: by mail-qv1-f72.google.com with SMTP id q20-20020ad44354000000b004afb5a0d33cso12700503qvs.12 for ; Thu, 20 Oct 2022 06:10:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WVYAKNZFP9AvH/lbqEre4C8lrF1P3191ZtQza+s/jZc=; b=sWvIXaaqDniF6fF79cb/S5TQTKV288/bCnor8iL1dfIInUDiTj1uA9Fchi3gh+wmTG e0KwX7orEjfu7G2LfWV+Y0laNS0tr6sLbX8HV2l9rOeyOTUA4abpYXi4bzY/x/rl1ySc BmcFpMo4xLt2kKZRzUCDLiMZzLNudJy0oMBAIJYd/EudPszZKpJ5qOrsVvXGmtirBdxy ToTNDxQQgndeGHrixj5uOALDfv97+Q+uTKc3R4Qd3apsURxk8Ffmr3bGb6wUuvYNxKdK va7ZlnUq+00Uv9KRAbUvSrK5d5eUltuKl7Oh4Ej9A6ESSPJJIsPbEIqTTA0cwPkMoIKN hFzg== X-Gm-Message-State: ACrzQf0pmPgWL0P2KLLTkE3OayGLeknhWc2MuPR19QBdC21nTFlJfMZI 55HvmgMdQdO4UZt3L8SGtC8WesdQ9Ma/OdZRq80OFJAoLR282dmrnr2Pdp/Yjmuy8k9UxT31zKY jFFklstxjyhU= X-Received: by 2002:a05:620a:c85:b0:6ee:6fcf:cd45 with SMTP id q5-20020a05620a0c8500b006ee6fcfcd45mr9001225qki.595.1666271445449; Thu, 20 Oct 2022 06:10:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5b8Gfudw+r9XpzKAnmPFkCrMpX4DqBO/63iWv15JJhemCsFP2jxIbmP01iUo9bHb2P+HKyxQ== X-Received: by 2002:a05:620a:c85:b0:6ee:6fcf:cd45 with SMTP id q5-20020a05620a0c8500b006ee6fcfcd45mr9001201qki.595.1666271445158; Thu, 20 Oct 2022 06:10:45 -0700 (PDT) Received: from bfoster (c-24-61-119-116.hsd1.ma.comcast.net. [24.61.119.116]) by smtp.gmail.com with ESMTPSA id y21-20020a37e315000000b006ecb3694163sm6934979qki.95.2022.10.20.06.10.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 06:10:44 -0700 (PDT) Date: Thu, 20 Oct 2022 09:10:48 -0400 From: Brian Foster To: Mel Gorman Cc: Andrew Morton , Yang Shi , Matthew Wilcox , Linux-MM , LKML , "Kirill A. Shutemov" Subject: Re: [RFC PATCH] mm/huge_memory: Do not clobber swp_entry_t during THP split Message-ID: References: <20221019134156.zjyyn5aownakvztf@techsingularity.net> <20221019161810.7510df1f37658a2b71c5e3a7@linux-foundation.org> <20221020085214.7pgvylgxkojbiuat@techsingularity.net> MIME-Version: 1.0 In-Reply-To: <20221020085214.7pgvylgxkojbiuat@techsingularity.net> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666271448; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WVYAKNZFP9AvH/lbqEre4C8lrF1P3191ZtQza+s/jZc=; b=0EkEeNiVrqsr+39H4pBmNhL29ux9Ew+q8vW8icFYp/2i/jfsb/RQrB7Tves3Oy7lXRpRMb 0dy8UDTLLQ3w+a2emTEQrS1l+RfioCc2gc5dGjMpOPqmRrceAHguj//WYBJ5iFGe2tRCjB sDUCQNcCWybLOssb3crDWSYzWk7h7/w= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=TntW3JBo; spf=pass (imf25.hostedemail.com: domain of bfoster@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bfoster@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666271448; a=rsa-sha256; cv=none; b=bMsjFDZ8DWZpVXRkRU+rNtuiuLRXHjrA46ySUetefY1XeMFfVh3CUCyn2klNQa5JvE/zY+ t5R0hfn03Ttr1RHLyu43G1GdacoCXWnrujpbAdIvzqdsMavRNpf1/O6RaEaOmX8tR7R1fo OcM+XHbb1wy9aAtKcF2BYsDeEhkzY0A= Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=TntW3JBo; spf=pass (imf25.hostedemail.com: domain of bfoster@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bfoster@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: CA515A0037 X-Stat-Signature: y894gb5g5a4rq14j9yawhi8uyj5hfana X-Rspam-User: X-HE-Tag: 1666271447-141375 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: cc Kirill On Thu, Oct 20, 2022 at 09:52:14AM +0100, Mel Gorman wrote: > Adding Brian to cc > > On Wed, Oct 19, 2022 at 04:18:10PM -0700, Andrew Morton wrote: > > On Wed, 19 Oct 2022 11:17:14 -0700 Yang Shi wrote: > > > > > > The intent of commit b653db77350c patch was to avoid the case where > > > > PG_private is clear but folio->private is not-NULL. However, THP tail > > > > pages uses page->private for "swp_entry_t if folio_test_swapcache()" as > > > > stated in the documentation for struct folio. This patch only clobbers > > > > page->private for tail pages if the head page was not in swapcache and > > > > warns once if page->private had an unexpected value. > > > > > > It looks like the same issue fixed by > > > https://lore.kernel.org/linux-mm/20220906190602.1626037-1-bfoster@redhat.com/ > > > > It is. > > > > Yep, based on Brian's changelog, it was the same workload that triggered > it as it happens to stress the corner case that hits the bug. > > > As I asked earlier this week, what about reverting b653db77350c? Why > > do we care about the value of ->private for non-PG_private pages? > > I don't think we do care but based on the changelog of b653db77350c, it's > part of an effort to either remove the PG_private bit or is a preparation > step for casting page to a meaningful type based on context but only Matthew > can tell us his motivation. There at least is some value to identifying > cases where a referenced page has valid information in page->private that > is not reflected in the flags. > Thanks. It would have been nice to have received some feedback on the patch I had posted 6 weeks or so ago ;), but regardless yours is better and includes the comment Kirill asked for (and also appears to be added to the hotfixes tree), so FWIW: Acked-by: Brian Foster > -- > Mel Gorman > SUSE Labs >