From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99AFBC4332F for ; Tue, 26 Apr 2022 07:40:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344170AbiDZHni (ORCPT ); Tue, 26 Apr 2022 03:43:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344275AbiDZHne (ORCPT ); Tue, 26 Apr 2022 03:43:34 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BEB6BB4; Tue, 26 Apr 2022 00:40:27 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 1D235210FC; Tue, 26 Apr 2022 07:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1650958826; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wMAdxJZJ6A0n7iKNAeF0d/axVH6mYUkchW85fLcAB0I=; b=rOpfkgxOFp21qgWpq0YAojVkCTCU3fM7vqtzuV2Al7un1+Vk4WynSRLQWOMYOWFHXRpgv2 FYW/QW9rrJdGaWTSJSVGw8UuH+1PC97ffapuceZA5eUO3xDoKwGgJ5ElcFI6ooeVhCym+4 IVn5UYD4FHQqY5y0FDFN0ENWJ8QTNBo= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id A0A272C142; Tue, 26 Apr 2022 07:40:25 +0000 (UTC) Date: Tue, 26 Apr 2022 09:40:23 +0200 From: Michal Hocko To: Kent Overstreet Cc: Roman Gushchin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, hch@lst.de, hannes@cmpxchg.org, akpm@linux-foundation.org, linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-input@vger.kernel.org, rostedt@goodmis.org Subject: Re: [PATCH v2 8/8] mm: Centralize & improve oom reporting in show_mem.c Message-ID: References: <20220421234837.3629927-14-kent.overstreet@gmail.com> <20220422234820.plusgyixgybebfmi@moria.home.lan> <20220423004607.q4lbz2mplkhlbyhm@moria.home.lan> <20220425152811.pg2dse4zybpnpaa4@moria.home.lan> <20220426072612.7wgpzndigr4ybrh4@moria.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220426072612.7wgpzndigr4ybrh4@moria.home.lan> Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org On Tue 26-04-22 03:26:12, Kent Overstreet wrote: [...] > Anyways, the reason I think this allocation is fine is it's GFP_NOWAIT and it's > completely fine if it fails - all we lose is some diagnostics, and also it's > released right away. I think you are still missing the PF_MEMALLOC point. Please have a look how this leads to no reclaim recursion so GFP_NOWAIT has no meaning when you are allocating from PF_MEMALLOC context (which the oom killer and any reclaim path is). Also have a look at how __gfp_pfmemalloc_flags makes the allocation request from that context ALLOC_NO_WATERMARKS. See? -- Michal Hocko SUSE Labs