Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp586650imm; Wed, 15 Aug 2018 02:31:39 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxC6Rnrj15f8RN0HrqXzMYK0rLZPeTdlb2hgjp5I7gLu98U09LJwBKi/WkS1G+zNbFWnppG X-Received: by 2002:a17:902:d906:: with SMTP id c6-v6mr3274339plz.65.1534325499504; Wed, 15 Aug 2018 02:31:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534325499; cv=none; d=google.com; s=arc-20160816; b=CNqYEijQy3m9Jd4XCvvWJ7R6Ve+aBwSvwjjA2izMPU5w/pTFzzHko4IA7s7hGwAY40 XUdvue/uJEL3VUsqD8YhzrXzw0aOBK5wM1pxU8yRPpVhBH9F8VI7S6T+iRCIbbvtS58h a7Vgmt2iFOhZGwzuxVG4qAwpHOTAtxqV4SKjrx2csjVZMLFmR/bqr8GgIeHn00JLvvOl Wj41d7M5OmfyyoK+7XVQs2IKwf/HMDQM0M/PRJhHBFhc5hOf3beBxJj6nx17XNbzTQG9 dSv276zZGNbDds/njOo/ryv2vu3CcMoJsjiFTVXQeCMhyJ4eDKSQT9jivnZ89KiyjhlE U9tw== 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:arc-authentication-results; bh=oR8giX5nYC/MPILrNKJ47GLs1EckvO+DnQD2jOfC73A=; b=VRBkVjCV7wWgDUa5VglA9GNnvXYv86sH5rp8qmu2kmd7KoDeg0wLYPDLsvCe5D0WJG M2wGHRMNcDfrGKGL3jkXLkYi4TNrrySSlPjB7eYe/vme7/dEhBeJj7x/vKD30eQubLkC mL77h8DkCqBVYtkOduRekj1941Vf/YRR/xd9LGi/IxSKPF3JlQkle6uM1u3dGl91hoAU 9x+KfGXXHibMvxdI+wLAnde/bHl+whvUGoOGsLuNY9s2UnEKWZtrdAyk6hkBzmF3gjjS uCmL+rdpZRq5O/RaFyOpUAWtfxQXNST24Ub4G0807jGfD5nQmCgL3rU2ebqs/d8rJb2X XrGg== 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 k91-v6si18609732pld.187.2018.08.15.02.31.23; Wed, 15 Aug 2018 02:31:39 -0700 (PDT) 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 S1728969AbeHOMV6 (ORCPT + 99 others); Wed, 15 Aug 2018 08:21:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:47394 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728583AbeHOMV6 (ORCPT ); Wed, 15 Aug 2018 08:21:58 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DBEC7AD04; Wed, 15 Aug 2018 09:30:32 +0000 (UTC) Date: Wed, 15 Aug 2018 11:30:32 +0200 From: Michal Hocko To: Mike Rapoport Cc: linux-mm@kvack.org, Jonathan Corbet , Matthew Wilcox , Vlastimil Babka , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] docs/core-api: add memory allocation guide Message-ID: <20180815093032.GQ32645@dhcp22.suse.cz> References: <1534314887-9202-1-git-send-email-rppt@linux.vnet.ibm.com> <20180815063649.GB24091@rapoport-lnx> <20180815081539.GN32645@dhcp22.suse.cz> <20180815090428.GD24091@rapoport-lnx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180815090428.GD24091@rapoport-lnx> 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 15-08-18 12:04:29, Mike Rapoport wrote: [...] > How about: > > * If the allocation is performed from an atomic context, e.g interrupt > handler, use ``GFP_NOWARN``. This flag prevents direct reclaim and IO or > filesystem operations. Consequently, under memory pressure ``GFP_NOWARN`` > allocation is likely to fail. s@NOWARN@NOWAIT@ I guess. Looks good otherwise. I would even go and mention GFP_NOWARN once you brought it up. Allocations which have a reasonable fallback should be using NOWARN. > * If you think that accessing memory reserves is justified and the kernel > will be stressed unless allocation succeeds, you may use ``GFP_ATOMIC``. OK otherwise. -- Michal Hocko SUSE Labs