Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3541203pxb; Wed, 14 Apr 2021 07:51:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGuGd+o2W2s2bxiU5F6tkxX7EMzB407YXLL1fPH9VDUGa7fqrAAGlMNpCi5CsuHRSLtbj+ X-Received: by 2002:a63:9dcb:: with SMTP id i194mr36444663pgd.87.1618411883131; Wed, 14 Apr 2021 07:51:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618411883; cv=none; d=google.com; s=arc-20160816; b=Yjtp0rtOFiYae9RS4+LAvP1cJFOCIpO/BvG5LTuUwnv/QNi8UPRuei8a9PrYtYuNvY ufVYDssaMaqf5aowCqqAz4GFLDOElQs3GlpP0CNY/beqp61ee/d+88S5BHYLcipiRMTY 6ZmDSgx/ozvR1+gcEHhchulo94Y3ySpIqPttCbLdrs60zjsXZ7l7JfjicTxJ/rz7lvPZ ZMi5AzSHqdnSIXuAjIP4hoST9ElL/g01/Y6misTGhGYo+bMbqHQl5H0u8yQVrjQYCP1d vPzwuXk4G1kAbtGjWpnnAB4bqyo6W7mJ4YqM4YleOnuTITINWsr1kzXbP1oQTXOqIAYb f4IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=77PvjZ043bsPpk7w1CZMRpSRItMCMDE42Gsr4nMRZ10=; b=g1JYrKUR1llR2QO3Vqjan2MmvoBpL+xzpFSADtdRkk29/NZonC6qwCR4bDj0Iu1oT5 5EauUwGMWitCQv1izOL8bbaTr5VvJhXXvNK4IvkDRnXtQLh9Vd1TebyWz89U3GjKF7OR Lxq12JP3FKB2JHiRSP9zo5KpEYz0kMigmhGCZLmDh8TM20TmauGnDDYv4cdhJyxO66MD OYUENePBhhusu0tk3PV1sfQvxhEVGcWVpAxZH1hA/vrMuEkcZs+/eNIaYVQ0RrVKWV0f lckHk04CN9/u2j/sGjGgAEVZ6c1a87GIRvnTunkykkRJiruRMvS1KWMwit4Gcgg8yc9F y70Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=OIfRDOnW; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s6si1558493pgq.580.2021.04.14.07.51.10; Wed, 14 Apr 2021 07:51:23 -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; dkim=pass header.i=@suse.com header.s=susede1 header.b=OIfRDOnW; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348188AbhDNI3B (ORCPT + 99 others); Wed, 14 Apr 2021 04:29:01 -0400 Received: from mx2.suse.de ([195.135.220.15]:55814 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238768AbhDNI25 (ORCPT ); Wed, 14 Apr 2021 04:28:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1618388914; h=from:from:reply-to: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=77PvjZ043bsPpk7w1CZMRpSRItMCMDE42Gsr4nMRZ10=; b=OIfRDOnWexsq0i9cJ27GBfwAJRtJM3CVyiFWjghiXXOjWMVtpqabpZp9AfZOFNXEWqYkt2 r0suOuQjj739ngmFG3qrLvq/GrHoA6l+Ot9PeIRnIhz4ZMG389ew9/gV8Wpi/Nn1q8TwSz LF2xqEkkzzrhKtpfzzkHkAw/tvo5Lwk= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 48574ACC4; Wed, 14 Apr 2021 08:28:34 +0000 (UTC) Date: Wed, 14 Apr 2021 10:28:33 +0200 From: Michal Hocko To: Oscar Salvador 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: References: <20210413104747.12177-1-osalvador@suse.de> <20210413104747.12177-4-osalvador@suse.de> <20210414074132.GB20401@linux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210414074132.GB20401@linux> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 14-04-21 09:41:32, Oscar Salvador wrote: > On Wed, Apr 14, 2021 at 08:04:21AM +0200, Michal Hocko wrote: > > On Tue 13-04-21 14:19:03, Mike Kravetz wrote: > > > On 4/13/21 6:23 AM, Michal Hocko wrote: > > > The only place where page->private may not be initialized is when we do > > > allocations at boot time from memblock. In this case, we will add the > > > pages to the free list via put_page/free_huge_page so the appropriate > > > flags will be cleared before anyone notices. > > > > Pages allocated by the bootmem should be pre initialized from the boot, > > no? > > I guess Mike means: > > hugetlb_hstate_alloc_pages > alloc_bootmem_huge_page > __alloc_bootmem_huge_page > memblock_alloc_try_nid_raw > > and AFAICS, memblock_alloc_try_nid_raw() does not zero the memory. You are right it doesn't do it there. But all struct pages, even those that are allocated by the bootmem allocator should initialize its struct pages. They would be poisoned otherwise, right? I would have to look at the exact code path but IIRC this should be around the time bootmem allocator state transitions to the page allocator. -- Michal Hocko SUSE Labs