Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2262903ybv; Fri, 21 Feb 2020 12:02:15 -0800 (PST) X-Google-Smtp-Source: APXvYqyzFq3GcBpAu336vAnj92djQw1IFAieCwQHQ4snvVHJ708Cko1rn9tCdu9u1bqVMCF/hyEw X-Received: by 2002:a05:6830:1e64:: with SMTP id m4mr30610106otr.244.1582315335417; Fri, 21 Feb 2020 12:02:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582315335; cv=none; d=google.com; s=arc-20160816; b=hEZf4uhtanrx2YmqXzA4SYwa7iUm0fFcr9N9gETQey+g5TgAsF+w5PMdBHoXA01X/C D6Ax9aIfI7d/YLXyRVSO2M/OuUnY2GI5cqKicprV1t1hHxDtT4VQBQwN5hvIXg1oZkwj ZqtfTLuc7bH3901CMwgHpcLqEO9y5c+AtnCFRswKSH6GrSmKCqQM73IKbKEZxp1CVxJQ w5yxa/3jNuQeLiRUkpsXjCjlmBWhTTToApy8jpqzIVB3N/9quD/szSGwbWG+WS2pYpB6 Zqf1qMmOBo9ziKZeIE9x9TbJ4k4oAY8aRAQvz6aqGJPEI05Agi+zLyF2zIJtvC+Y+7/S M9Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=pNlnTirvfiB7WYuVJDwmUBab2nwnkqDGWJI3ppaa8x4=; b=IKu1F4c6205/Qi1B2gv1zAbjvfRoHMLm2SB/g5AyjrgvDW//T8kfbF/pLG135yzfnD Es0P+QtGKHCCbC/WCPoerG7MYypYhNNQnTA/DXlq7PfDaH42d1by73UnIdMMHsZaXwrI nV88iFNO6SaCZSAxg0Waho41PmoyUpzkUE8e5A+zCoMKJrfSjD9MPP0E986Cr6RhY83F uAIAVy+QVNdXaj6dBR3zHo+/sw9jpWQFEiZMApB/nlEMAHF0Jt5MPKx5VDmDtvpNaOf7 i7WMW2KUj805CfajZCTlrDBqxpwhij+aRGLMq2CMOHU/onfwexN042OX7R9pWPGHysCQ gF2Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8si2003588otp.254.2020.02.21.12.02.02; Fri, 21 Feb 2020 12:02:15 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726989AbgBUUA7 (ORCPT + 99 others); Fri, 21 Feb 2020 15:00:59 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40244 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726483AbgBUUA6 (ORCPT ); Fri, 21 Feb 2020 15:00:58 -0500 Received: by mail-pg1-f193.google.com with SMTP id z7so1515084pgk.7 for ; Fri, 21 Feb 2020 12:00:58 -0800 (PST) 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=pNlnTirvfiB7WYuVJDwmUBab2nwnkqDGWJI3ppaa8x4=; b=lqKYWI0yd57fZnKZV27m0ZR7sZT9ChWBdjT9x/Q+O/3AvlvKwzBNDIxp0sRufSmWPZ o+Y2s7U+JwhNI7/VhZl8+6/zuKsQN4v5gIOVAU6FAVDzcl7l2e+VSDwesRKKBQONulN0 0w2MAe/basBWN2X00/wQK4w+DOWcK2qiFy0OCcXhxvVozw3vPnucImIm+NtgyMrHDVt1 QSII7vkDQU0ikXIwxIu3UScocJA8DEBqaf4QSGOpxIhlNvkbAqQsawF2arRrCvPs7Jf8 4Ppqlqk6jp3E7xApkj8SnryZRBAWAmqWHkGOs2/xLqOIdJ2MnkaTa2h1oUiTfXjqwfh+ Xbsg== X-Gm-Message-State: APjAAAUTuo6ONztr9kzvmY/VR4NsxQdog+csk18iKiNczYuHfXxthwLg eK5qqxGyNHxSvqxwyqDS+KsaLASlOrk= X-Received: by 2002:aa7:9aa7:: with SMTP id x7mr37599786pfi.78.1582315257906; Fri, 21 Feb 2020 12:00:57 -0800 (PST) Received: from sultan-book.localdomain ([2620:15c:f:fd00:d989:fbb1:a399:c92d]) by smtp.gmail.com with ESMTPSA id g7sm3853756pfq.33.2020.02.21.12.00.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 12:00:57 -0800 (PST) Date: Fri, 21 Feb 2020 12:00:54 -0800 From: Sultan Alsawaf To: Ira Weiny Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm: Stop kswapd early when nothing's waiting for it to free pages Message-ID: <20200221200054.GA3851@sultan-book.localdomain> References: <20200219182522.1960-1-sultan@kerneltoast.com> <20200221043052.3305-1-sultan@kerneltoast.com> <20200221182201.GB4462@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200221182201.GB4462@iweiny-DESK2.sc.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 21, 2020 at 10:22:02AM -0800, Ira Weiny wrote: > On Thu, Feb 20, 2020 at 08:30:52PM -0800, Sultan Alsawaf wrote: > > From: Sultan Alsawaf > > [snip] > > > @@ -4640,9 +4647,12 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, > > goto retry; > > } > > fail: > > - warn_alloc(gfp_mask, ac->nodemask, > > - "page allocation failure: order:%u", order); > > got_pg: > > I have no insight into if this is masking a deeper problem or if this fixes > something but doesn't the above result in 'fail' and 'got_pg' being the same > label? > > Ira > > > + if (woke_kswapd) > > + atomic_dec(&pgdat->kswapd_waiters); > > + if (!page) > > + warn_alloc(gfp_mask, ac->nodemask, > > + "page allocation failure: order:%u", order); > > return page; > > } > > [snip] Yes,. This was to reduce the patch delta for the initial submission so it's clearer what's going on; it can be altered of course to coalesce the labels into a single one. I typically produce my patches to upstream components to be as uninvasive as possible to aid in backporting and forward porting in case it's rejected and I want to keep it for myself. Sultan