Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4911235imu; Tue, 8 Jan 2019 08:18:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN5AGAVfQ2a+1Ka2Yiaidi5k2rhcQKO/Vbfyvi+iqB87cqICnVBuuQPQfYHaNIDudXcRAQi8 X-Received: by 2002:a17:902:bd4a:: with SMTP id b10mr2392645plx.232.1546964322394; Tue, 08 Jan 2019 08:18:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546964322; cv=none; d=google.com; s=arc-20160816; b=KCmtPHOI9jQU1mYHl22LGwJJrxsPXE4FDOIZG6g/RFAJD2zlaM9zL+3qk420T+F4wS L1VIP2SY8NaHX7Hw8iyxC1sBEechiRN8WG/eQwxTpgEaard/f0qgBxgD0zbC7w6/tgsc TU4qnpV7I1RL8/pSkTzeVPh4iwmkyyQazaTf+AFv0Sq0bbqhCJFZpAtmS15q385gmmYQ 0WsSfLKCUl61d8uIcg0cnC33fEtOM+7y8UV7c/vze8MuP/ISuGphrBdLcfDhRqwFsqnY /mYLRQVmzFWHYXuz4M1hjAuJpHC1iV3tzx2dWAEUScX1ao13kJHQGy05wkLIxZN+PcBa i35Q== 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:dkim-signature; bh=GMi0+EQvP4Zni7SDHkmbjywa/2iFG6E6k8GP5LRTuvc=; b=Omco4qaI20ZH7bxnJykfcFWMv2Pk+z5Ud4NGPc6th8G5+JLHtIHRbst0q5uBFe0ggi HM2rwn3FYDtDbTUCW3YigWJuLIDu1Caot8Ndur9vic+o2IsJNFY8L4wQ+dByaXzF0l2M Fr9aw5rlvun47gdoDKPubdAxC8Q7iitWkx9lTO8Ur6/aXvKIkSTedzCkAP55Q7gmE6ky zQarlfmOVWfCFNazSQ/bapQ/qEkdIxifl8hmq9rdQ7pQJBogqJLH0U02na/uaJXByHWT WW8Afbj/2IjxUVKWgqVt04vvILiDi22Xi+wwjS5anaT46oQf6XiuchjHEMG2duSIz37o Qq1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="NAqeNX/w"; 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=pass (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 d8si16003309pgh.505.2019.01.08.08.18.25; Tue, 08 Jan 2019 08:18:42 -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; dkim=pass header.i=@kernel.org header.s=default header.b="NAqeNX/w"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729181AbfAHQRI (ORCPT + 99 others); Tue, 8 Jan 2019 11:17:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:59332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728211AbfAHQRI (ORCPT ); Tue, 8 Jan 2019 11:17:08 -0500 Received: from guoren-Inspiron-7460 (23.83.240.247.16clouds.com [23.83.240.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 855CD2087F; Tue, 8 Jan 2019 16:17:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546964227; bh=4txs0LmEDzED4CFW/IfVto/QK/5lF57/AgR2XIXJl4U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NAqeNX/w/izK37wq2tpTRu70WaKJgaLZMXbqE0O9inizE+xbgIibK4D+ETBfSagLb WdM6VDC5kvI+GIBZ3JvrCJXNRmxWHropkK++V1isuzZVupO14QaBQmMGd2r71PXhXj d5m8tM5v9JzMBclKFfJelcXrDkAErmoUg/zLJX5E= Date: Wed, 9 Jan 2019 00:16:59 +0800 From: Guo Ren To: Michal Hocko Cc: Linus Torvalds , Guenter Roeck , Linux List Kernel Mailing Subject: Re: Linux 5.0-rc1 (test results) Message-ID: <20190108161659.GA26358@guoren-Inspiron-7460> References: <20190107192648.GA10789@roeck-us.net> <20190108095107.GA25409@guoren-Inspiron-7460> <20190108154031.GB343@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190108154031.GB343@dhcp22.suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); } 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. Best Regards Guo Ren