Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4986813imu; Tue, 8 Jan 2019 09:31:39 -0800 (PST) X-Google-Smtp-Source: ALg8bN5MTJDTiy01kDwllFOaW00MQkqzbbi53TCWAaF7D+lH5Y8DW8nlfekfBIPVFNLKqmvUTfuW X-Received: by 2002:a62:c185:: with SMTP id i127mr2616589pfg.43.1546968699231; Tue, 08 Jan 2019 09:31:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546968699; cv=none; d=google.com; s=arc-20160816; b=lqwYSJSWoG+M58juIP9prY/84RCyF7iD3j/YzdsRblKUgyreqmAJRoAsQKx1KpU7F5 wccV++mX1CrxHo7IanHwfTedjja1Kv3UdMILFi6Bxtg8031C3gAD7P/Jc4+r2XKsrVCC IjZtuVxGt7vckxcD/0dvUil4LsOOs8qlHZkzI+U4m4kECcV2gqj7e9pbPb7QSgDHHTNu zG0Yp8zRK4QFmnW17SbKoDboIw9WjoPHucEksqS/DDorNoUdoR/N4RU+v37youSgrCpq 2vTgq8h2aCi9l3WON8/KkxpgY33sObQn+ToHq2zKIcGgJ/gNlg2JZBT2tHjE1/XxldbN hrWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=80IjBNsu1yIpgEM1BRP0oY/Hw3kca5dO1/H+2oAC644=; b=rsJ843nqBiwyVEGG1AsmhUOxyYzCfAeAATT7sUvBUlOpd3g7E4BCeoMwDEq4FMDAFu rtwu4rRSowdxtxgOjo6Ws7BpWQkEcUQCJeid7ZbV9X3AcCG03aRVJHOcL6Ypb+zeVVyJ UVKgFeW/7kKs6kee3Yt6YBQnZ0wgCFqSVzs1kw6a8lbELi8Poba7m11J2uUlO13q07Nw cnshR16NNPsMMdmVmg9UbSQ1ate2iaJXQBf5BRHE2YCWMC7rFbXZbJR43OkFD6/4f1yR iaQUtwVJbaH8JtYKq++/mj7w733zVUDhpddBKer7h5qlUva44o+HQqjnOG+iQNZY6DlE ld3g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h19si64211470plr.67.2019.01.08.09.31.23; Tue, 08 Jan 2019 09:31:39 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728650AbfAHR3r (ORCPT + 99 others); Tue, 8 Jan 2019 12:29:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:58100 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728402AbfAHR3r (ORCPT ); Tue, 8 Jan 2019 12:29:47 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2BCDEAFCE; Tue, 8 Jan 2019 17:29:46 +0000 (UTC) Date: Tue, 8 Jan 2019 18:29:45 +0100 From: Michal Hocko To: Guo Ren Cc: Linus Torvalds , Guenter Roeck , Linux List Kernel Mailing Subject: Re: Linux 5.0-rc1 (test results) Message-ID: <20190108172945.GG31793@dhcp22.suse.cz> References: <20190107192648.GA10789@roeck-us.net> <20190108095107.GA25409@guoren-Inspiron-7460> <20190108154031.GB343@dhcp22.suse.cz> <20190108161659.GA26358@guoren-Inspiron-7460> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190108161659.GA26358@guoren-Inspiron-7460> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 09-01-19 00:16:59, Guo Ren wrote: > Thx Michal, > > On Tue, Jan 08, 2019 at 04:40:31PM +0100, Michal Hocko wrote: > > On Tue 08-01-19 17:51:07, Guo Ren wrote: > > [...] > > > static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm) > > > { > > > pte_t *pte; > > > unsigned long i; > > > > > > pte = (pte_t *) __get_free_page(GFP_KERNEL | __GFP_RETRY_MAYFAIL); > > > ^^^^^^^^^^^^^^^^^^^ > > > It's necessary ? > > > x86 & arm don't use > > > it. > > > if (!pte) > > > return NULL; > > > > That depends on whether you want OOM killer to be triggered for these > > allocations. If you add the flag then the allocation bails out with a > > failure rather than kill an oom victim. > > Yes, in page_alloc.c: > if (gfp_mask & __GFP_RETRY_MAYFAIL) > goto out; > ... > if (out_of_memory(&oc) || WARN_ON_ONCE(gfp_mask & __GFP_NOFAIL)) { > ^^^^^^^^^^^^^ OOM kill victim > ... > if (gfp_mask & __GFP_NOFAIL) > page = __alloc_pages_cpuset_fallback(gfp_mask, order, > ALLOC_NO_WATERMARKS, ac); > } Btw. we have that nice documentation in gfp.h. I would encourage you to read through that rather than try to imply the semantic from the implementation. > Seems it could affect the behavior of the system which is out of memory. > OOM killer could help to get_page for current. So keep the same as x86 & > arm here. I'll remove __GFP_RETRY_MAYFAIL in patch. OK -- Michal Hocko SUSE Labs