From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD324FC08; Mon, 26 Aug 2024 13:59:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724680778; cv=none; b=jkAet009fAvJen2vGsjGl5vn1bFhREDkU277Uk6Cyr0MJeURcCX2LIF9vpcDyPb2SQ01Xy1fIkCEmUTQsqwTp0Sf4rQZCkC5zggKxhLSWZYJvqZnpaFo21Huml5pOGZHuv+lQftWsSF+BxmkDBVLmqyeIi5d8pswnu+ejsw7R6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724680778; c=relaxed/simple; bh=BzciMDPrePqw/+Zb31TamDL7Qy6qsvVfbhnenMPs13g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BLyNh5gXP4I4bIrMbsrbju+qtxzwQKNWbLKgPxn143JZHblUQdgJCBAo25qjFRzTJIu/pWi0gPz6B3UO84tSRpZ3za2eM+TSnbjjgcCt0fxc3ilsYMqXQM35416PHZ3CN1h3U+4Z5/MEugf7Vct/Djjk03evy4DG90hEBdNvMM4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=PhIk7oZX; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="PhIk7oZX" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=d9ixmwiMI0t+BMY931VrpBckLQD4BASs08boObwsOs0=; b=PhIk7oZXa/Gkm39cnR6HKbAqgT CGgPgHcTlZl+DUS9UqdVVhPpauTPgAIuqtWaw0JHHCxL0FXfttu1cao91QOvhMt67LRmAp2NEkOx2 cxJh6nBHw1GlAcGiHLnhR0Hwd3yY4ILNspDZt0Db4Cs2BK2LnpJEoPMPnG5hgpUv4HWyudQsNtvAl rfW3hzI1sNJNXWmMA6mnx2bfeUGWrz1IXyyl7OnK9sV6a4P3/kgKIeW7VsmwKyyUROeKzzJu17e2m V6cJUt9lKMMgSEge6FqTwRlGm0Vcc2IV3xvfVgfte3cUSCKC3AX/IQmoy+XmM6zR8nSNCytePcQWC fITMZ/2A==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1siaFl-0000000FSeG-26RN; Mon, 26 Aug 2024 13:59:29 +0000 Date: Mon, 26 Aug 2024 14:59:29 +0100 From: Matthew Wilcox To: Michal Hocko Cc: Andrew Morton , Christoph Hellwig , Yafang Shao , Kent Overstreet , jack@suse.cz, Christian Brauner , Alexander Viro , Paul Moore , James Morris , "Serge E. Hallyn" , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-bcachefs@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Hocko Subject: Re: [PATCH 2/2] mm: drop PF_MEMALLOC_NORECLAIM Message-ID: References: <20240826085347.1152675-1-mhocko@kernel.org> <20240826085347.1152675-3-mhocko@kernel.org> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240826085347.1152675-3-mhocko@kernel.org> On Mon, Aug 26, 2024 at 10:47:13AM +0200, Michal Hocko wrote: > From: Michal Hocko > > There is no existing user of the flag and the flag is dangerous because > a nested allocation context can use GFP_NOFAIL which could cause > unexpected failure. Such a code would be hard to maintain because it > could be deeper in the call chain. > > PF_MEMALLOC_NORECLAIM has been added even when it was pointed out [1] > that such a allocation contex is inherently unsafe if the context > doesn't fully control all allocations called from this context. Wouldn't a straight-up revert of eab0af905bfc be cleaner? Or is there a reason to keep PF_MEMALLOC_NOWARN?