Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3614372pxk; Tue, 29 Sep 2020 01:21:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqH2habBeVHVShNuexGhfO1BjDSeQ20ny0HNjvDAos9sLs1skPgVyJ0p7sQTy5qPhiPYSC X-Received: by 2002:a17:906:9386:: with SMTP id l6mr2648758ejx.302.1601367676329; Tue, 29 Sep 2020 01:21:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601367676; cv=none; d=google.com; s=arc-20160816; b=wtDwRHuFIEs9fgW/gHoW+g6DjJjk88XIwmlSbwP//XD+Aa7XZ5+Le13a74h4Z34PRh FoPprfJL45fUsNCWlpjUUSJ8jf6GWPgK9j+xNlYu6nWNyCmJF88eDagJsHgWWauCT00i qnm+xvnO03WeCvSGOhN0kxRUurO4BC/z/FbJejdAOJjRP4McZGyHCOMFjmO7EOah9xFu VXxEC6sc3gv8rvizzfkzIVnoxMGaIMo2H2R59KKn16hv3is9PK91C2hH+2MNCAlFgFws Q32ZJTK1Wlu1Z3j9qteFmuNBCKPvJ6zu5N1oSUnBS27t8CONSW9lqucjU2uNUCEjaSZU kurg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KFyfyEQCS1dcCR4BhfL+zwiQ3CuzyAy4x23tr+VkzjE=; b=LJsn8nrDio2Yep2Nnkrb4wsjeueH+WrEszF+uu/cUnlclo9A2Ugz0HHIgi+e3jsOjB 9isJhTZ8RBgZAbJDlvl1ndfrFKlkZyHHrbb+c0orvxJWLQRgUuT3/Kt1l9Ran/NcYY6e w8oiAYWqq/5Xg7mlLVUZdMnyNYnuMEEJlrspUUSZkqsapW+jj/v/PsHExpEpQSt2Mamv nfajJ7mnXyTWKefnAN0WGJpzAvn4tQQgkCx/FVBxFdILNJXSB0ZBEuvt9A2BZSUzAc7q 1FVcGyM84pnzbloPWy2rTog3VE2XuedWP+m+lJNMji+R9QQ4ZuMHMnQaQcikqlyRjc/x yG6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=SSpMjosS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y6si2350166edo.322.2020.09.29.01.20.53; Tue, 29 Sep 2020 01:21:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=SSpMjosS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727530AbgI2ITp (ORCPT + 99 others); Tue, 29 Sep 2020 04:19:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:59520 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725550AbgI2ITo (ORCPT ); Tue, 29 Sep 2020 04:19:44 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1601367582; h=from:from:reply-to:subject:subject: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=KFyfyEQCS1dcCR4BhfL+zwiQ3CuzyAy4x23tr+VkzjE=; b=SSpMjosSL8o4OPVa55QL9wIlM8PHwJpdBy+0T8Zs2+GxBxG6YA9l00PJ9Y66qcHmMfGLv9 u+g+tcEvJ7RxAvAP57LRStfEelxtPsdHOGOgFzbQCNh9qQZDiKdnSarvXzcr1YnPqWmMjI wdLRjalKNBbwgyGfH1Q3bT+vgMo4axA= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3E86BADD8; Tue, 29 Sep 2020 08:19:42 +0000 (UTC) Date: Tue, 29 Sep 2020 10:19:38 +0200 From: Michal Hocko To: Daniel Vetter Cc: "Paul E. McKenney" , Juri Lelli , Peter Zijlstra , Sebastian Andrzej Siewior , Lai Jiangshan , dri-devel , Ben Segall , Linux-MM , "open list:KERNEL SELFTEST FRAMEWORK" , linux-hexagon@vger.kernel.org, Will Deacon , Ingo Molnar , Anton Ivanov , linux-arch , Vincent Guittot , Herbert Xu , Brian Cain , Richard Weinberger , Russell King , Ard Biesheuvel , David Airlie , Ingo Molnar , Geert Uytterhoeven , Mel Gorman , intel-gfx , Matt Turner , Valentin Schneider , linux-xtensa@linux-xtensa.org, Shuah Khan , Jeff Dike , linux-um , Josh Triplett , Steven Rostedt , rcu@vger.kernel.org, linux-m68k , Ivan Kokshaysky , Rodrigo Vivi , Thomas Gleixner , Dietmar Eggemann , Linux ARM , Richard Henderson , Chris Zankel , Max Filippov , Daniel Bristot de Oliveira , LKML , alpha , Mathieu Desnoyers , Andrew Morton , Linus Torvalds Subject: Re: [patch 00/13] preempt: Make preempt count unconditional Message-ID: <20200929081938.GC22035@dhcp22.suse.cz> References: <871rj4owfn.fsf@nanos.tec.linutronix.de> <87bli75t7v.fsf@nanos.tec.linutronix.de> <20200916152956.GV29330@paulmck-ThinkPad-P72> <20200916205840.GD29330@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 16-09-20 23:43:02, Daniel Vetter wrote: > I can > then figure out whether it's better to risk not spotting issues with > call_rcu vs slapping a memalloc_noio_save/restore around all these > critical section which force-degrades any allocation to GFP_ATOMIC at did you mean memalloc_noreclaim_* here? > most, but has the risk that we run into code that assumes "GFP_KERNEL > never fails for small stuff" and has a decidedly less tested fallback > path than rcu code. Even if the above then please note that memalloc_noreclaim_* or PF_MEMALLOC should be used with an extreme care. Essentially only for internal memory reclaimers. It grants access to _all_ the available memory so any abuse can be detrimental to the overall system operation. Allocation failure in this mode means that we are out of memory and any code relying on such an allocation has to carefuly consider failure. This is not a random allocation mode. -- Michal Hocko SUSE Labs