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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 84A99C43331 for ; Thu, 26 Mar 2020 19:36:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3996F20714 for ; Thu, 26 Mar 2020 19:36:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="dh6db2Px" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3996F20714 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C250A6B000A; Thu, 26 Mar 2020 15:36:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BD4C66B000C; Thu, 26 Mar 2020 15:36:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AEAAC6B000D; Thu, 26 Mar 2020 15:36:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0156.hostedemail.com [216.40.44.156]) by kanga.kvack.org (Postfix) with ESMTP id 92C706B000A for ; Thu, 26 Mar 2020 15:36:42 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id CEDB48248D7C for ; Thu, 26 Mar 2020 19:36:42 +0000 (UTC) X-FDA: 76638520644.24.mark48_3a91866d57760 X-HE-Tag: mark48_3a91866d57760 X-Filterd-Recvd-Size: 4703 Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Mar 2020 19:36:42 +0000 (UTC) Received: by mail-ed1-f68.google.com with SMTP id a43so8319678edf.6 for ; Thu, 26 Mar 2020 12:36:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WugekyqNe14NZjUCrzuU8f/PMfy4ymjEA2uErv+hnjQ=; b=dh6db2Pxk89VoPBRilHdEG0cV3Zu1adly6w6kDu3jnNIDxVlP7JBOlI2vZtqoSxrWM znN99ZukPEtiO3LavWJFP5reZ248Ntxhou87Nm71MmHDaa2BDM4cW28SEX14TyIBGS6e DKCHkENogCptCU+mAJAks/5NR+OcetEihnM2U2RVrBEhj5RopDG+xZo8aeuWz+Ahkr2+ x5/O0UWynQXC3rlf2kBgIc6qCclcRAFST0BXeiAPfzZZ9x+u2FLsMZSJvtsyC75tMMwW Xl9XSzIHgN23oCwJyEAdpmJvU9qv7p1Bxr4k3BRD931qfvinqUhRE+q/lOWoJf6xbCyI 7ErQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WugekyqNe14NZjUCrzuU8f/PMfy4ymjEA2uErv+hnjQ=; b=M2yJcmZJnseBo4IdvvHibm+n9iIXkp5ARQPUy0bMv1VvUybFe9Yi59sy7SN5bi2/d4 YudAiijO9o4+bvRM63eWzIRz8fF41PQ6T7JpILjf7cOZ7YMS0j/vodK1vzYKepbMK06I bXs9sxVtpRLaoTuNQE4SbKRC7/aSB18iabXu2m+fAPzeAUfSVyUKKrN9g4ta2vNT5PqJ 7tNjEqCSjVt+2G8GEZSFABkIwKiLKNcXOOvUpmn+MuFRaxM6+U7Q70F9UKhs9/tkBqYa AiYjgwH5g6RrBO4Gc98hBfwsmLEpqADl8Sk14mV4YnCOGSNEB94NTvVRqeyLHVvkzbit kisQ== X-Gm-Message-State: ANhLgQ1TmtGkvf5eBtqRMHg0gQXZSjtGaQIFvgN2S9c1Y8mBKGdKMFr3 C0NURonq2oJ6+uB/jJ6qY6Zf+zFgLkrdfmQHnqJgHA== X-Google-Smtp-Source: ADFU+vsBU5F1g5OOozpI/LyJFQB5VzQ5aZ6h1YtcTorDcGLBMNSy2c7ITmZZtVE87VaZaC+EiMPS7U7XATe74J3v8uo= X-Received: by 2002:a17:906:65ca:: with SMTP id z10mr9030915ejn.368.1585251400312; Thu, 26 Mar 2020 12:36:40 -0700 (PDT) MIME-Version: 1.0 References: <20200311123848.118638-1-shile.zhang@linux.alibaba.com> <20200319190512.cwnvgvv3upzcchkm@ca-dmjordan1.us.oracle.com> <20200326185822.6n56yl2llvdranur@ca-dmjordan1.us.oracle.com> In-Reply-To: <20200326185822.6n56yl2llvdranur@ca-dmjordan1.us.oracle.com> From: Pavel Tatashin Date: Thu, 26 Mar 2020 15:36:29 -0400 Message-ID: Subject: Re: [PATCH v3] mm: fix tick timer stall during deferred page init To: Daniel Jordan Cc: Shile Zhang , Andrew Morton , Kirill Tkhai , linux-mm , LKML Content-Type: text/plain; charset="UTF-8" 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: I agree with Daniel, we should look into approach where pgdat_resize_lock is taken only for the duration of updating tracking values such as pgdat->first_deferred_pfn (perhaps we would need to add another tracker that would show chunks that are currently being worked on). The vast duration of struct page initialization process should happen outside of this lock, and only be taken when we update globally seen data structures: lists, tracking variables. This way we can solve several problems: 1. allow interrupt threads to grow zones if required. 2. keep jiffies happy. 3. allow future scaling when we will add inner node threads to initialize struct pages (i.e. ktasks from Daniel). Pasha On Thu, Mar 26, 2020 at 2:58 PM Daniel Jordan wrote: > > On Thu, Mar 19, 2020 at 03:05:12PM -0400, Daniel Jordan wrote: > > Regardless, > > Reviewed-by: Daniel Jordan > > Darn, I spoke too soon. > > On a two-socket Xeon, smaller values of TICK_PAGE_COUNT caused the deferred > init timestamp to grow by over 25%. This was with pgdatinit0 bound to the > timer interrupt CPU to make sure the issue always reproduces. > > TICK_PAGE_COUNT node 0 deferred > init time (ms) > --------------- --------------- > 4096 610 > 8192 587 > 16384 487 > 32768 480 // used in the patch > > Instead of trying to find a constant that lets the timer interrupt run often > enough, I think a better way forward is to reconsider how we handle the resize > lock. I plan to prototype something and reply back with what I get.