Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6532047rwn; Tue, 13 Sep 2022 05:45:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR44L6iC1fxlNThmtdiS4mMBkdFSOg1G5Lbcn5dPZSMAzvK+5iFSPB0+IxxEIK5iiUeSlOcc X-Received: by 2002:a17:907:7209:b0:778:e86e:568 with SMTP id dr9-20020a170907720900b00778e86e0568mr16641689ejc.659.1663073142987; Tue, 13 Sep 2022 05:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663073142; cv=none; d=google.com; s=arc-20160816; b=kfAY+71Z4Ji5fBFCOOEg1g0DZV/wjkSr9kbXSG0vOunPo0A1Bgym7RrXZN+AFbldzr adY6VLbd9sl1lyHSPGURs1t+yK2p5AY8AwWDgu1qbVHt7CLcsS0tVtrSS+O3/LUPVmtn dLmQjzLcoyCNs6aBh2NBlgz74mTGtXadEWBrNkI1gQ8n0hRpMUNZ9iKkWCPVueHkdCcX mh7+XIOrmj8J9USeuZJTTZfowQ+dQOZDRnlBm9UUM7LuUGyxh+RcCT9jh3Fx9l3SOjqu UYavjFoEt6s0f+Mi+0gXd+08J8YeqKScPx0g1XfFOI4xq8Xq/4f7Pkrcw7xbm76YbD2/ /MPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=B/XQs/i4f7vI19fSo/aLE7foLqilXPjfxmGQHZwzncg=; b=Q10EPMDewfucz6kmKoMvLZoHmdkTpuiVdSfoUWprfNZ+7/ROaW+bQCq9XTdva07paW r5GYzJBxlnNun1SxKx08xG+AQFhj8gRfrjBP1qfWkRpFqB6pspsXejcSDaOPaWzmqoRb v3WuOU+Qzb6gK/UezF6hETcrpdZ8BigvR6j5iQ9xa0ulCF6OjAy6kRtuM245zHvkDsWQ zPnofgFCSH8VyVmxUTNUI0/ypFdZlRqbMHnMCCcCg768ZP9D3BFQlx3yOlPpDS7E/Dj2 +/lA4JUneCUbHO5zzd01ZlOJHIpK2aXqZVTmF3nRKkc+VQq98XoMGU6xx2r7EPtb4q75 GtJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hs29-20020a1709073e9d00b0077e60573e2csi4558367ejc.45.2022.09.13.05.45.16; Tue, 13 Sep 2022 05:45:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231890AbiIMLXd (ORCPT + 99 others); Tue, 13 Sep 2022 07:23:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231459AbiIMLXb (ORCPT ); Tue, 13 Sep 2022 07:23:31 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 46A515B07B for ; Tue, 13 Sep 2022 04:23:30 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6CB961063; Tue, 13 Sep 2022 04:23:36 -0700 (PDT) Received: from [10.163.58.193] (unknown [10.163.58.193]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A89F93F71A; Tue, 13 Sep 2022 04:23:27 -0700 (PDT) Message-ID: <7dccfd5d-7fa1-440e-91a2-8aa35b9d968b@arm.com> Date: Tue, 13 Sep 2022 16:53:24 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 01/16] mm/page_alloc: ensure kswapd doesn't accidentally go to sleep Content-Language: en-US To: Matthew Wilcox Cc: Miaohe Lin , akpm@linux-foundation.org, david@redhat.com, osalvador@suse.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20220909092451.24883-1-linmiaohe@huawei.com> <20220909092451.24883-2-linmiaohe@huawei.com> From: Anshuman Khandual In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/13/22 13:28, Matthew Wilcox wrote: > On Tue, Sep 13, 2022 at 12:32:50PM +0530, Anshuman Khandual wrote: >> >> On 9/9/22 14:54, Miaohe Lin wrote: >>> If ALLOC_KSWAPD is set, wake_all_kswapds() will be called to ensure >>> kswapd doesn't accidentally go to sleep. But when reserve_flags is >>> set, alloc_flags will be overwritten and ALLOC_KSWAPD is thus lost. >>> Preserve the ALLOC_KSWAPD flag in alloc_flags to ensure kswapd won't >>> go to sleep accidentally. >> Currently wake_all_kswapds() gets skipped subsequently if ALLOC_KSWAPD >> is lost, but this only happens when the 'retry:' loops is taken ? > Right, but see the comment: > > /* Ensure kswapd doesn't accidentally go to sleep as long as we loop */ > > and that is not currently true. I think that was an inadvertent change. > Particularly since the changelog for 0a79cdad5eb2 says "No functional > change". Got it, thanks for the explanation.