Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp293941pxb; Wed, 14 Apr 2021 15:52:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyD24xJG+sSpQ4SoG9XfptyXj9dwRZGZNR4ud6UwCRBgRJOyDEzM6znMA+wXOxnD18rQQaC X-Received: by 2002:a63:1357:: with SMTP id 23mr593450pgt.284.1618440744980; Wed, 14 Apr 2021 15:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618440744; cv=none; d=google.com; s=arc-20160816; b=oqBF4R7yUWWJxABSs8EX+e9zavXrVqQbefK6W70VU4t7M6mVr99lIFD1erd7IO14id D4zjnXQJXLLjDDrlAWR/m4EzZRkEBg+0DkrIhWd5CPmxkRGgpbHLYyH82DfCDLKx8Rn3 dwq0doANb3yofF7nktqVCDfyQ7pWkMaCJ+6iFT8354j+xTxHwMCxQUT3hndSmbQ5vAXz B0cw9Ikb7kdDdXF+BlEOslpXUP215HPNnv7Wszvrk7DYSYXhi0cjY3ryt++jsmRz1fQ3 hZf8hCjSotWWmVofRMgtEycS7BM70yk9vTpbCtb293Km5O3+sAUMINasPdebve7vtbnl G0sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=j3mUy79NFum3Dmm1IUo4iK+ujmdy/0nOASmAYtjyXBs=; b=szmsuZCRYi6kIR3trPLQicsjTm3Z8GzUNFOSBlAEKZLTit3QXj07lgvcjuUvJAL3QS H87zVKNF0W9Qqwkgp/h35fzMMSp2J5hdqRend3hTRkfnD4xi7Q8CeTeV8XKyoRWNjW3c dOJQEvQEZIFfcJoKWehgB37EiIBeIGraYAdaB1V1YciGCu3dDRJGVla7smZMnapPquMj Q2cEGsUD7mSP3pthO6ltZr8ZRm7sDhYqB53gf0HBoSZ0lnVSV3TTwY8QNxyzlzkOCSdr KbsK5/+sfacz+wm+eOUUbNOlDIv0wfRcNmSqwK/QJkJKKQYJSco0v1LawOeYy+gj9TjF HErQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z24si1043136pjq.11.2021.04.14.15.52.13; Wed, 14 Apr 2021 15:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234052AbhDNKuU (ORCPT + 99 others); Wed, 14 Apr 2021 06:50:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:59058 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233897AbhDNKuS (ORCPT ); Wed, 14 Apr 2021 06:50:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 24B63AE56; Wed, 14 Apr 2021 10:49:56 +0000 (UTC) Date: Wed, 14 Apr 2021 12:49:53 +0200 From: Oscar Salvador To: Michal Hocko Cc: Mike Kravetz , Andrew Morton , Vlastimil Babka , David Hildenbrand , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 3/7] mm,hugetlb: Clear HPageFreed outside of the lock Message-ID: <20210414104953.GF20886@linux> References: <20210413104747.12177-1-osalvador@suse.de> <20210413104747.12177-4-osalvador@suse.de> <20210414074132.GB20401@linux> <20210414100147.GD20886@linux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 14, 2021 at 12:32:58PM +0200, Michal Hocko wrote: > Well, to be precise it does the very same thing with memamp struct pages > but that is before the initialization code you have pointed out above. > In this context it just poisons the allocated content which is the GB > page storage. Right. > > I checked, and when we get there in __alloc_bootmem_huge_page, page->private is > > still zeroed, so I guess it should be safe to assume that we do not really need > > to clear the flag in __prep_new_huge_page() routine? > > It would be quite nasty if the struct pages content would be undefined. > Maybe that is possible but then I would rather stick the initialization > into __alloc_bootmem_huge_page. Yes, but I do not think that is really possible unless I missed something. Let us see what Mike thinks of it, if there are no objections, we can get rid of the clearing flag right there. -- Oscar Salvador SUSE L3