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=-1.0 required=3.0 tests=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 62059C43331 for ; Wed, 1 Apr 2020 16:00:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2946920784 for ; Wed, 1 Apr 2020 16:00:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2946920784 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C77E08E0005; Wed, 1 Apr 2020 12:00:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C29E88E0001; Wed, 1 Apr 2020 12:00:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B17748E0005; Wed, 1 Apr 2020 12:00:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0044.hostedemail.com [216.40.44.44]) by kanga.kvack.org (Postfix) with ESMTP id 995C68E0001 for ; Wed, 1 Apr 2020 12:00:52 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4C9B0180AD81A for ; Wed, 1 Apr 2020 16:00:52 +0000 (UTC) X-FDA: 76659749544.15.doll47_7beb867a0fb36 X-HE-Tag: doll47_7beb867a0fb36 X-Filterd-Recvd-Size: 4303 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Wed, 1 Apr 2020 16:00:51 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id t128so293446wma.0 for ; Wed, 01 Apr 2020 09:00:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kwtZP4ZCi5vqZ2EqGN5Ea/71mqAg8/MW59NL+tE7PEU=; b=mMvSCVoD5e3hHlpuStOBQ2ytmo9TBbXVjDUKhaHVLYAa/gALo2ANvWymmqEebbdMjP mwrW8oRcWfyj9aHaVchRCsYJNe9062TL/hI43/5H1XFeUyNkqQvxaNYVey7fFmHEc+EM aaEQM1UoUFry3MLPyiSE9QOVk7/Io6dzSopQIdyQ5TR7E+ZDDJQXVOB0xOZgxocaGS2p akFq4sJ5hR/ARqW/cLnJuPwHF2qR4ZmU1bS/HoRlsPDy8BmQ5Rkr7P+F4fsJlcjz+w3G RpSNb9EAV3BhjfhS9z0grNVSi/LWk4/ZGtSE818Q8+gapxOiIPA+1e+8wgG9ETev4RQV DnCQ== X-Gm-Message-State: AGi0PuYvLsJADXb9CkzdXY6HNrAw4WO1Ajvo4Ul+Dj2LxSKH+uTnVjkr 9/8jPq0XjqYqRKbz2s/UAjI= X-Google-Smtp-Source: APiQypJ+ZLmR6gzwZ15EFyDDeZcCMemYn8xwKQ2tLvW1XAYY5uPPdgcKjNy0X5i+V1nYuj+m4i12iA== X-Received: by 2002:a7b:c308:: with SMTP id k8mr5269134wmj.40.1585756850390; Wed, 01 Apr 2020 09:00:50 -0700 (PDT) Received: from localhost (ip-37-188-180-223.eurotel.cz. [37.188.180.223]) by smtp.gmail.com with ESMTPSA id f3sm3347854wmj.24.2020.04.01.09.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 09:00:49 -0700 (PDT) Date: Wed, 1 Apr 2020 18:00:48 +0200 From: Michal Hocko To: David Hildenbrand Cc: Shile Zhang , Andrew Morton , Kirill Tkhai , Pavel Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] mm: fix tick timer stall during deferred page init Message-ID: <20200401160048.GU22681@dhcp22.suse.cz> References: <20200311123848.118638-1-shile.zhang@linux.alibaba.com> <20200401154217.GQ22681@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Wed 01-04-20 17:50:22, David Hildenbrand wrote: > On 01.04.20 17:42, Michal Hocko wrote: > > I am sorry but I have completely missed this patch. > > > > On Wed 11-03-20 20:38:48, Shile Zhang wrote: > >> When 'CONFIG_DEFERRED_STRUCT_PAGE_INIT' is set, 'pgdatinit' kthread will > >> initialise the deferred pages with local interrupts disabled. It is > >> introduced by commit 3a2d7fa8a3d5 ("mm: disable interrupts while > >> initializing deferred pages"). > >> > >> On machine with NCPUS <= 2, the 'pgdatinit' kthread could be bound to > >> the boot CPU, which could caused the tick timer long time stall, system > >> jiffies not be updated in time. > >> > >> The dmesg shown that: > >> > >> [ 0.197975] node 0 initialised, 32170688 pages in 1ms > >> > >> Obviously, 1ms is unreasonable. > >> > >> Now, fix it by restore in the pending interrupts for every 32*1204 pages > >> (128MB) initialized, give the chance to update the systemd jiffies. > >> The reasonable demsg shown likes: > >> > >> [ 1.069306] node 0 initialised, 32203456 pages in 894ms > >> > >> Fixes: 3a2d7fa8a3d5 ("mm: disable interrupts while initializing deferred pages"). > > > > I dislike this solution TBH. It effectivelly conserves the current code > > and just works around the problem. Why do we hold the IRQ lock here in > > the first place? This is an early init code and a very limited code is > > running at this stage. Certainly nothing memory hotplug related which > > should be the only path really interested in the resize lock AFAIR. > > Yeah, I don't think ACPI and friends are up yet. Just to save somebody time to check. The deferred initialization blocks the further boot until all workders are done - see page_alloc_init_late (kernel_init path). -- Michal Hocko SUSE Labs