Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2050209pxu; Fri, 18 Dec 2020 04:27:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5CJhdtZWOlL0HE5K7gXqTec9Eh4mC0mNvcUZGfcgtxhvAGw0XFMv9CMf+0uU1DyNt+BsS X-Received: by 2002:aa7:c802:: with SMTP id a2mr4156766edt.120.1608294443765; Fri, 18 Dec 2020 04:27:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608294443; cv=none; d=google.com; s=arc-20160816; b=elJhQnC+fE5OPh5lyHEPCByIArB6oJ/wUt32Cp1GTGOlzptN8At6NYkjp9P3XsSNmS InyMzz24AwE+i/sDavHs4VSnmPx53vNCIkjhZHVvC/JDThvGNFTC5seU1trymTlzQIRO AgbGtjTShsz/PgmltfICkoG0gJmqGdMchBr4kMj+Efwy8eXzbolw2SbZXi92xA/CZSiN F1BjbtixOREEGu4cXqa9jF0umh7fHN1wDZ4H6zIHUMEnorDMBwy8tz5JkJ44shWMrGW1 GkR+7fQ5mR4sly03Xh6nE8wTUHO6JLN9H8bWDO2MqHaAUmraV5VVAlzjwFJqqQBXevj/ haTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=q5KjjPrbn9WR2MdEGDTRtTus2Vw4k9w92nCN62Th8qg=; b=aaICIqGKiMqpgXurs4nQCxif8/3V24FeifB7vK1MNc+1QWumd7l87kF72uavfQkNHj j0ntLp8n1EFtjAIaKSbwemeS4Nmbpdpu9tdT+5Xokz+RhpbmMPGUejudJBLXEtpe9f1j EFp6wBmYTgBsaGTp12i/oLs5eDxGzyJ6HAJwrR7c0r+Azx4MA5G9ecYJti8VYGS3HU4m Di6rmqiGyU3fcS0IN1m14GegivMRFL3UIwO24fS4lmsyc3b3ZnGD/SINjfaO7wOgZoRG /DnbQ6r8IvDvTfw73AK4wYpPA4LKekn8CI0ZIvuzgpKS30OjBYt7Z1hhIzSGoM32dZ+O SY1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=UQKi0zIH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si4455768eje.122.2020.12.18.04.27.00; Fri, 18 Dec 2020 04:27:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=UQKi0zIH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726407AbgLRMYT (ORCPT + 99 others); Fri, 18 Dec 2020 07:24:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726439AbgLRMYT (ORCPT ); Fri, 18 Dec 2020 07:24:19 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B906BC06138C for ; Fri, 18 Dec 2020 04:23:38 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id q22so2954207eja.2 for ; Fri, 18 Dec 2020 04:23:38 -0800 (PST) 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=q5KjjPrbn9WR2MdEGDTRtTus2Vw4k9w92nCN62Th8qg=; b=UQKi0zIH+5RBkxjLICF+v+gLFuX5Yn/W4ogPzP5V4rmY3SGR7gUDPduCncrWW7RecZ 7wtPBVcyR2wdwtN+1OkyNp9AM7ZWjYpRGd+2d4UyyrFoJaA0m7I5FJ02AMVCtFIP5YbG H2qh0kxKXwbuOesHnKGk8DP/SkkhpJNP+kc/fm0DCQ+6WjDTe0OK/aM3vqfSKJOgUxnh bsD/Bxdlwo78e+ZrI9p694YPJPkghUmemIZV36cJ1HubQ3mNtLUhCN0zYPfUyV9VSVfp r073sVIb5imENWeRbeLod1SoKtKN+DHcvH165E2ueeKSc/DJjrmvz6unJag37qvpAnU7 i8+A== 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=q5KjjPrbn9WR2MdEGDTRtTus2Vw4k9w92nCN62Th8qg=; b=TdXB2244j11LlvIwnkoU76fkPhLN2gjl167BvhZ0a/rISR7Q8UqdpwA+hnANqKcWxf oGbN3Jbh3IVeLp1HGvjmmpb6irFE2h/ZsUWoZVxqUmtZirXi+YvIbk58XtFi+XZeizYa o628oVEZBJyW9muabPbLwTrlYqDCVRRtGla0a8pkboYg0nvr0Zi+y3ClmJqi5UvCbez8 rWYMoHLVGER67kRIk7Tpiqh5rP6rD2Ct4+NjoXftF/pfNf2oNnjASnC5n2tAbQMLN2o9 7E1heNQ07B4VYceHXEcLelyTzo8/10BLW15cwkFvjoOVISO1e8MjLirVw+uKPy8PNdjn 37hg== X-Gm-Message-State: AOAM532TjPRMSY/Te1hq8mMAY1r3UoaKnAeL1NlYYSb8aV/SnuJCHzzn q4nqxhVSX73b0DOFMO8Q9ZKwBJXfTRIwNA/VLOjRpA== X-Received: by 2002:a17:906:4a4f:: with SMTP id a15mr3763164ejv.541.1608294217306; Fri, 18 Dec 2020 04:23:37 -0800 (PST) MIME-Version: 1.0 References: <20201217185243.3288048-1-pasha.tatashin@soleen.com> <20201217185243.3288048-4-pasha.tatashin@soleen.com> <20201218093653.GS32193@dhcp22.suse.cz> In-Reply-To: <20201218093653.GS32193@dhcp22.suse.cz> From: Pavel Tatashin Date: Fri, 18 Dec 2020 07:23:00 -0500 Message-ID: Subject: Re: [PATCH v4 03/10] mm: apply per-task gfp constraints in fast path To: Michal Hocko Cc: LKML , linux-mm , Andrew Morton , Vlastimil Babka , David Hildenbrand , Oscar Salvador , Dan Williams , Sasha Levin , Tyler Hicks , Joonsoo Kim , mike.kravetz@oracle.com, Steven Rostedt , Ingo Molnar , Jason Gunthorpe , Peter Zijlstra , Mel Gorman , Matthew Wilcox , David Rientjes , John Hubbard , Linux Doc Mailing List , Ira Weiny , linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 18, 2020 at 4:36 AM Michal Hocko wrote: > > On Thu 17-12-20 13:52:36, Pavel Tatashin wrote: > [..] > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > index 469016222cdb..d9546f5897f4 100644 > > --- a/mm/vmscan.c > > +++ b/mm/vmscan.c > > @@ -3234,11 +3234,12 @@ static bool throttle_direct_reclaim(gfp_t gfp_mask, struct zonelist *zonelist, > > unsigned long try_to_free_pages(struct zonelist *zonelist, int order, > > gfp_t gfp_mask, nodemask_t *nodemask) > > { > > + gfp_t current_gfp_mask = current_gfp_context(gfp_mask); > > unsigned long nr_reclaimed; > > struct scan_control sc = { > > .nr_to_reclaim = SWAP_CLUSTER_MAX, > > - .gfp_mask = current_gfp_context(gfp_mask), > > - .reclaim_idx = gfp_zone(gfp_mask), > > + .gfp_mask = current_gfp_mask, > > + .reclaim_idx = gfp_zone(current_gfp_mask), > > .order = order, > > .nodemask = nodemask, > > .priority = DEF_PRIORITY, > > @@ -4158,17 +4159,18 @@ static int __node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, unsigned in > > { > > /* Minimum pages needed in order to stay on node */ > > const unsigned long nr_pages = 1 << order; > > + gfp_t current_gfp_mask = current_gfp_context(gfp_mask); > > struct task_struct *p = current; > > unsigned int noreclaim_flag; > > struct scan_control sc = { > > .nr_to_reclaim = max(nr_pages, SWAP_CLUSTER_MAX), > > - .gfp_mask = current_gfp_context(gfp_mask), > > + .gfp_mask = current_gfp_mask, > > .order = order, > > .priority = NODE_RECLAIM_PRIORITY, > > .may_writepage = !!(node_reclaim_mode & RECLAIM_WRITE), > > .may_unmap = !!(node_reclaim_mode & RECLAIM_UNMAP), > > .may_swap = 1, > > - .reclaim_idx = gfp_zone(gfp_mask), > > + .reclaim_idx = gfp_zone(current_gfp_mask), > > }; > > > > trace_mm_vmscan_node_reclaim_begin(pgdat->node_id, order, > > I was hoping we had agreed these are not necessary and they shouldn't be > touched in the patch. Thank you for noticing, I was sure I removed these changes, not sure what happened :( They will be gone in the next version. Thank you, Pasha > -- > Michal Hocko > SUSE Labs