Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp250014imm; Tue, 24 Jul 2018 18:21:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdVSrMmXmkQcbxyfX7UCi8CnvDT5AuPrFdYMZCYR27ggrHER+cxKHRG1ot2ytJqNWMfZiW0 X-Received: by 2002:a63:3190:: with SMTP id x138-v6mr18295063pgx.60.1532481699218; Tue, 24 Jul 2018 18:21:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532481699; cv=none; d=google.com; s=arc-20160816; b=IZYkhOR3RiHLpszf6sSoDu1WlC7LJ8V8/UFDa4ASUr0+ejroP/GUHM4d5ZLYeJHS3f 0ROGL7JS9S7UxdH1oKiTGL4uV/Xp0N/xhWsmu9ESD3L6RNo/F3sb7JoN36M5JPpxQ7Cw 1aQsK05BvWClNRNdH5sP/12XF/RnitXtvAw3esaYaehliYbHOeUqUJiyCPV2T1Ycz/nT qUYV8vFHCXOc7NfdmunJu6ZMOtdF5E3T8R21uOLfbyT1wXs+JiL6uMm4wGn5ALtG84l6 NVLjH7Bc6uHKq1LO0fVPO43vgtbIPiY1XiG3YKz5rU+qFzh8/5R5iZ2ffQG60NlR1Ym2 WQtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=31x20a6kd5ukTj3NWOTNexqTl8nWWBmSCyUfbXPtzqg=; b=JMCq0+9/5KkX/y5XoFt3pUVBiast7CMX/C6AZguxEJt2PPdFK3zyAARE6aNZASuLU8 OGCCFWuHoXwd7DjExPbkeSVMmnBaJtl8fL7AOZpfamEu8ATAp6lwv7p7EwyNomy6T2DF rPWM/rsmmwqC/9l8vHdTBCoAMNMxK73na5oTzhBjxwwNX0TXwpVkVAQciMyQH+Tb5NEn DbXxOJcpqbxdQxmhFbrukrKS6YMx1V72VGRPrOuIA9bgk4LQ5vJ/tPrTW2hyJpK6mZvN +u1cKsCrTermXu1IwQJH2w76WbJSg+8dCrrrGfHZSI7BnnO+UG9Ey+yc+D3/6W4OmQIR KZXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=R02dLmt8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9-v6si11125885plp.395.2018.07.24.18.21.24; Tue, 24 Jul 2018 18:21:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=R02dLmt8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388565AbeGYC3F (ORCPT + 99 others); Tue, 24 Jul 2018 22:29:05 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:39502 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388420AbeGYC3F (ORCPT ); Tue, 24 Jul 2018 22:29:05 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6P1JH9O154095 for ; Wed, 25 Jul 2018 01:19:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : references : in-reply-to : from : date : message-id : subject : to : cc : content-type; s=corp-2018-07-02; bh=31x20a6kd5ukTj3NWOTNexqTl8nWWBmSCyUfbXPtzqg=; b=R02dLmt8SmUGuyMMXUEECDQQijK0xHp2XB7ObmZBOBIe0g+ip3WoTxjWb+vaVt1hclfS RNqXALAmXF3A5Va35aA/PmCc2jFxeOq5Djgkxw9Sp810j3+exg1HSj328EyTNF56e2hC Qxpzo6HztBnoqwYxTJwlKOPncMOYjafg2MWqmGQufgKamNs1m4QP3dSrq6hjp8k4F3m3 qtVS3AwpsUV9AMcW4hXmNwFEpd2Rk1O5uL3M11jy4UqPiE8nez4ueqiZTxaeBuOMchoU izFJTUo1RQZNvP2Z01JpGRM3zZbYrsQpr+ojM7Gibv7uqu5GMJXYaAUonBsj5AMBUUmd JQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2kbwfpuby5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 25 Jul 2018 01:19:53 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w6P1JqhB018290 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 25 Jul 2018 01:19:52 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w6P1JqiJ030691 for ; Wed, 25 Jul 2018 01:19:52 GMT Received: from mail-oi0-f42.google.com (/209.85.218.42) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 24 Jul 2018 18:19:52 -0700 Received: by mail-oi0-f42.google.com with SMTP id d189-v6so10979841oib.6 for ; Tue, 24 Jul 2018 18:19:52 -0700 (PDT) X-Gm-Message-State: AOUpUlGy5Ygh/xHmBjE4pEKcjzgIxUKZhn7uq0KG6ZW4wkfMdoKjAGZQ J/52vl9h3W1lMUkOu0pPl71yzIU51ysLjn7mC4c= X-Received: by 2002:aca:da88:: with SMTP id r130-v6mr1294196oig.163.1532481592122; Tue, 24 Jul 2018 18:19:52 -0700 (PDT) MIME-Version: 1.0 References: <20180724235520.10200-1-pasha.tatashin@oracle.com> <20180724235520.10200-3-pasha.tatashin@oracle.com> <20180724181218.13a1ed1d7a3e9a37e35707a9@linux-foundation.org> In-Reply-To: <20180724181218.13a1ed1d7a3e9a37e35707a9@linux-foundation.org> From: Pavel Tatashin Date: Tue, 24 Jul 2018 21:19:11 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/3] mm: calculate deferred pages after skipping mirrored memory To: Andrew Morton Cc: Steven Sistare , Daniel Jordan , LKML , kirill.shutemov@linux.intel.com, Michal Hocko , Linux Memory Management List , dan.j.williams@intel.com, jack@suse.cz, jglisse@redhat.com, Souptick Joarder , bhe@redhat.com, gregkh@linuxfoundation.org, Vlastimil Babka , Wei Yang , dave.hansen@intel.com, rientjes@google.com, mingo@kernel.org, osalvador@techadventures.net, abdhalee@linux.vnet.ibm.com, mpe@ellerman.id.au Content-Type: text/plain; charset="UTF-8" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8964 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=782 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807250012 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 24, 2018 at 9:12 PM Andrew Morton wrote: > > On Tue, 24 Jul 2018 19:55:19 -0400 Pavel Tatashin wrote: > > > update_defer_init() should be called only when struct page is about to be > > initialized. Because it counts number of initialized struct pages, but > > there we may skip struct pages if there is some mirrored memory. > > What are the runtime effects of this error? I found this bug by reading the code. The effect is that fewer than expected struct pages are initialized early in boot, and it is possible that in some corner cases we may fail to boot when mirrored pages are used. The deferred on demand code should somewhat mitigate this. But, this still brings some inconsistencies compared to when booting without mirrored pages, so it is better to fix. Pavel