Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3633178pxk; Tue, 29 Sep 2020 02:02:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCHZhUVHSNX16aFWeaZ8YlY6zkR+Ph+6pbfYiyCpgNT9odxZhNNoSLQje76GjXmzm+c7QX X-Received: by 2002:a17:906:1690:: with SMTP id s16mr2802367ejd.122.1601370172595; Tue, 29 Sep 2020 02:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601370172; cv=none; d=google.com; s=arc-20160816; b=XgAso7OajVl1KN23Lzr+irbmrmIzIUQdJ2ibFj3uCwWvl1VWi9Sq8Tn29csDbAYOnI Xm6P6tVDtQt211nCncFJbIoXE8GCX1rB/nEfUNI8y9NBxJrP9o3cpVYg9lVqgn8Vx/XT Lxv/2sZ3Posi9WjcCFBb6L3SUdt95zILklwYM0IR6gPjhsEQckPGudZiv+EJkpvDvD9q 1o7JwMbAOTiWHtYADVkrEc2yxuHH9FgBO/vUfX8y3g5WSxvprbomnxQIcskVpvVza7kO FqVh/ipxK5uIbLkKIpIn0GzoKuWZq+enoQapRXQoH/bmPM4DiBfZQZjzjsgtmCSnRp+N SEpw== 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:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=l8n+Qtmools068Op1SBkscZ3rmiXf/OnO40zpDWJvQs=; b=aWYFxznbNiI/IjHKiNq3wBQHtHk3WYENfLb/lO7bO+ZfNxn2AlJHUwAlmsp7SpEIDh /NkTqDUK0NLInahcgj9wULTTYuaVwRl+6KnclY+uBSsxir+Lu/d3iKP1vO2WU8gKUb1x 3SZKvTjaPIGGKORmdT94catwVM+G2QmEgIYs27WXS3SruIPIh/99MedryNa8XE1G/DVP PiamMm6eU3V2N4VBnYzygpzVpm3U7PdfiIwXPvPPHd5okp8AzPulxEj/XcajTNyB+tEE IBnn5DxXZ+LSG97kC9drllnLlJudEnajRVVLymdKIC8eGfbGRHNrOlVHyc7kU7uFRVtH NmZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=HSfJ7A4F; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si454624eja.116.2020.09.29.02.02.29; Tue, 29 Sep 2020 02:02:52 -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=@ffwll.ch header.s=google header.b=HSfJ7A4F; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727944AbgI2JAK (ORCPT + 99 others); Tue, 29 Sep 2020 05:00:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727650AbgI2JAJ (ORCPT ); Tue, 29 Sep 2020 05:00:09 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09EF1C0613D2 for ; Tue, 29 Sep 2020 02:00:09 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id t17so1310375wmi.4 for ; Tue, 29 Sep 2020 02:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=l8n+Qtmools068Op1SBkscZ3rmiXf/OnO40zpDWJvQs=; b=HSfJ7A4FNQbt4jfghWagnZ0q3COkKg8qz4BPThTLTJ7eDRMt1DvHHeb7XKEZ522gOH eWGtprOnXgZp5uEMLqACAESKMKR8I99jBaCAbi8CJzl/OnYlzX1P6crhIyasKLf4c1bf 2XybbZVEohhAC+dLedQmm8E/GOTp7GyR5iP8M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=l8n+Qtmools068Op1SBkscZ3rmiXf/OnO40zpDWJvQs=; b=sUWFpjehb1oUP+W5rICSDAQCVkFeYMkdukKSWNeZHRS9q3nx3mL+RD9XN52e5AHidg devOw+n4vi4Y46P8DksTVz2i4rQipxr21Oz9kXa5mzm6iz/gg4Fm6s9PzyO7NWU8EcXp Z6MU06voJb3pqm2PdlN84WV16TV0rZ5cPzrbo7u4LLyj4NbgrrpNovAsu/ee4xPy3gFS v/CwpbXfQ6m3VOjW8NOcMhOgXhL+pINvukgnEOW0wk6yMG0l+Z8/9fh7vurxv5QvyOH5 V+U2Qm8WdCX+DiQjiAAQnisGP+3lZY9DjJ/+yykzePOBZ2yI/p2pj+aCuAv0CqlQBNgp Pdyw== X-Gm-Message-State: AOAM533io3RCofL2pFIsYxORwfLm5a+GJcS12PCTwr7nt5IZWXFzSCJc NUgUPVgyisYo1TsZ5elV+dXLrQ== X-Received: by 2002:a1c:a5c8:: with SMTP id o191mr3465483wme.127.1601370007530; Tue, 29 Sep 2020 02:00:07 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id z191sm1552480wme.40.2020.09.29.02.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2020 02:00:06 -0700 (PDT) Date: Tue, 29 Sep 2020 11:00:03 +0200 From: Daniel Vetter To: Michal Hocko Cc: Daniel Vetter , "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: <20200929090003.GG438822@phenom.ffwll.local> Mail-Followup-To: Michal Hocko , "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 References: <871rj4owfn.fsf@nanos.tec.linutronix.de> <87bli75t7v.fsf@nanos.tec.linutronix.de> <20200916152956.GV29330@paulmck-ThinkPad-P72> <20200916205840.GD29330@paulmck-ThinkPad-P72> <20200929081938.GC22035@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200929081938.GC22035@dhcp22.suse.cz> X-Operating-System: Linux phenom 5.7.0-1-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 29, 2020 at 10:19:38AM +0200, Michal Hocko wrote: > 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? Yeah I picked the wrong one of that family of functions. > > 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. Agreed, that's why I don't like having these kind of automagic critical sections. It's a bit a shotgun approach. Paul said that the code would handle failures, but the problem is that it applies everywhere. Anyway my understanding is that call_rcu will be reworked and gain a pile of tricks so that these problems for the callchains leading to call_rcu all disappear. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch