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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 388A7C433DB for ; Thu, 25 Feb 2021 18:10:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B11EA64F43 for ; Thu, 25 Feb 2021 18:10:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B11EA64F43 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1A84B6B006E; Thu, 25 Feb 2021 13:10:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 158BD6B0072; Thu, 25 Feb 2021 13:10:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F3AEF6B0073; Thu, 25 Feb 2021 13:10:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0098.hostedemail.com [216.40.44.98]) by kanga.kvack.org (Postfix) with ESMTP id DA1D26B006E for ; Thu, 25 Feb 2021 13:10:01 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 9071D183BF9BA for ; Thu, 25 Feb 2021 18:10:01 +0000 (UTC) X-FDA: 77857579002.28.589B08B Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf07.hostedemail.com (Postfix) with ESMTP id 69644A00061F for ; Thu, 25 Feb 2021 18:09:56 +0000 (UTC) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11PI30Wn104618; Thu, 25 Feb 2021 13:09:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=C3lzRoPlPSGab7GqbUjKyBLhrcC8c0Q2sdpDOySpEsk=; b=V4q+8dFd7CV91+dSZMpAUlEmFU0hY18oMyWfnlUzPQavqfB/cBuiOb+OZuvG/bjZi4SB 2i1OClhuP1tRUnQBBH7DCz7a//X0DXKW6x5hmpyTC+thdJxkypnysY3VaNChsWnUPDOc w0FsLq+Dk2fMN4F1l6ltsSdiOQpQkBnKn9uA/6Kd3F1ZBrqum9wQY17wyMEDQQoLmb/r lmFkk8FUa5dssLyUWjknWaes3dVGdROgdtLzSvekye4Hm9niIR1EZSOoURhPFN+5S53K bLq9rnUo5+5nRyJteQi93oJV7rYvdYvNKRb/yIRTQiM2reX/xzLp52xLjIKb3qK6o0cT KA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 36xdpwykym-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 13:09:46 -0500 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 11PI3Ns8105600; Thu, 25 Feb 2021 13:09:45 -0500 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 36xdpwykxb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 13:09:45 -0500 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 11PI2DT6024141; Thu, 25 Feb 2021 18:09:43 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma06ams.nl.ibm.com with ESMTP id 36tsph4nxd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 18:09:42 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 11PI9eu230146960 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Feb 2021 18:09:40 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 629644204B; Thu, 25 Feb 2021 18:09:40 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2440642042; Thu, 25 Feb 2021 18:09:38 +0000 (GMT) Received: from linux.ibm.com (unknown [9.145.51.238]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 25 Feb 2021 18:09:38 +0000 (GMT) Date: Thu, 25 Feb 2021 20:09:35 +0200 From: Mike Rapoport To: Linus Torvalds Cc: David Hildenbrand , Mike Rapoport , Andrew Morton , Andrea Arcangeli , Baoquan He , Borislav Petkov , Chris Wilson , "H. Peter Anvin" , Ingo Molnar , =?utf-8?Q?=C5=81ukasz?= Majczak , Mel Gorman , Michal Hocko , Qian Cai , "Sarvela, Tomi P" , Thomas Gleixner , Vlastimil Babka , Linux Kernel Mailing List , Linux-MM , stable , the arch/x86 maintainers Subject: Re: [PATCH v7 1/1] mm/page_alloc.c: refactor initialization of struct page for holes in memory layout Message-ID: <20210225180935.GI1854360@linux.ibm.com> References: <20210224153950.20789-1-rppt@kernel.org> <20210224153950.20789-2-rppt@kernel.org> <515b4abf-ff07-a43a-ac2e-132c33681886@redhat.com> <20210225170629.GE1854360@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-02-25_10:2021-02-24,2021-02-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 suspectscore=0 malwarescore=0 impostorscore=0 bulkscore=0 adultscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 phishscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102250138 X-Stat-Signature: uikzyyxzs3ju8kff3d599okp5757b18y X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 69644A00061F Received-SPF: none (linux.ibm.com>: No applicable sender policy available) receiver=imf07; identity=mailfrom; envelope-from=""; helo=mx0a-001b2d01.pphosted.com; client-ip=148.163.156.1 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614276596-561011 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: On Thu, Feb 25, 2021 at 09:54:34AM -0800, Linus Torvalds wrote: > On Thu, Feb 25, 2021 at 9:07 AM Mike Rapoport wrote: > > > > > > > > We might still double-initialize PFNs when two zones overlap within a > > > section, correct? > > > > You mean that a section crosses zones boundary? > > I don't think it's that important. > > What if there was a memory allocation in between that could allocate > the once-initialized page? Can't happen because this code runs before any allocation is possible and it is single threaded. > Maybe it can't happen, or is not an issue for some other reason, but > this code has been fragile and had a ton of subtle issues, so maybe > worth documenting (or explaining here why it's just not relevant) Ok, I'll do another pass on the comments in the code. > Linus -- Sincerely yours, Mike.