Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1214047yba; Thu, 4 Apr 2019 06:32:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzELKtRtLJQ7A+MBKDgMOU+yU2E0uaM21Hk9OwEvNCZ4taGhXN6uF5b0Cd+KmaU1JiOIAz/ X-Received: by 2002:a62:6c6:: with SMTP id 189mr6038031pfg.36.1554384736114; Thu, 04 Apr 2019 06:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554384736; cv=none; d=google.com; s=arc-20160816; b=drBLEzHdXI/FHQWdCHdUG4w+LQoJ3kvhxTjGKPLP0VdstfFH2kv+4JI96k8XTGaZ5g 4kuOoIR3ACIEtxUbJOYxe3nr0s4ooNqVmtP2u9cB8Lgwf8YxETXQ+CXMHr2pMMRmoOUJ 6LfWlGIMcn74S7HupGoSiP04lMVLGF32AKABa5IcZPH4RAZ7eCYGkxtNcsUfVRPV9pEK DWEVM4OQvn0VMnQaCKQBktSbYK6BH/tS9GNzo5PnEOaZauwaBaPQ0oGA5JX9IVwLBBeC LnPJGFkRrLd4x/sWchEXTXthewXAojXnAmCxZsarEzYRcDfnZLYnCqKK1XqntrdHk45w zKqA== 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; bh=7CZA+ZGgDWn22NKXXgZTw1AAAefcGi2G4B796MkzIME=; b=GswhQDxeWAUFACe2dEZ6onsBWeSJ7hzPFRBNx9rnUJfKgW5sQKLz8UIB3iH5sSz3Rq EzahKOJ6tdbejfqybeZDrO+d+vJz+ZnkSJiyrouy2ZV9sy0TCx6utXxCviC9ttQt1Grx iuKrCc/CkENOX+gP8BlP7yNF0f2L6dlQCeyS4b4NR+A4nAfYj9IoeH4RMuqX0AwaJO3+ LPqD1EApZ+PE5LITykbm3D3YSHlJ2vsbBrSMDByuQkFFSstrlFQVw6FCFjgydZCYGY63 e8Rx4xI6qHz9gpVCwsdveuO7NaO7RNzy/vEdo4PZ91AFd8lWAKiGElq1aSGIJp4/th/p /kKA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m12si8300511pgv.586.2019.04.04.06.32.00; Thu, 04 Apr 2019 06:32:16 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729875AbfDDN3u (ORCPT + 99 others); Thu, 4 Apr 2019 09:29:50 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:60357 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729128AbfDDN3s (ORCPT ); Thu, 4 Apr 2019 09:29:48 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id D679380402; Thu, 4 Apr 2019 15:29:38 +0200 (CEST) Date: Thu, 4 Apr 2019 15:22:02 +0200 From: Pavel Machek To: Steven Rostedt Cc: Doug Anderson , Sasha Levin , LKML , stable@vger.kernel.org Subject: Re: [PATCH AUTOSEL 5.0 011/262] tracing: kdb: Fix ftdump to not sleep Message-ID: <20190404132202.GC6124@xo-6d-61-c0.localdomain> References: <20190327180158.10245-1-sashal@kernel.org> <20190327180158.10245-11-sashal@kernel.org> <20190328101342.GD19456@atrey.karlin.mff.cuni.cz> <20190328161228.24f5aabd@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190328161228.24f5aabd@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2019-03-28 16:12:28, Steven Rostedt wrote: > On Thu, 28 Mar 2019 12:45:18 -0700 > Doug Anderson wrote: > > > > I see solution is simple, but now we have a loop with GFP_ATOMIC > > > allocations inside. How many "tracing spus" is this expected to loop > > > over? Will not it exhaust atomically available pages and reliably fail > > > in common configurations? > > > Pavel > > > > Each one of these allocations is ~32 bytes and you do one per CPU. > > Even with systems with a lot of CPUs that's not going to be tons. > > ...and you only do it with GFP_ATOMIC when you're actively dropped > > into kdb and debugging. It seems like going for simplicity is the > > right call here, but of course if Steven or Daniel say that it has to > > be done a different way then they're the true authorities. > > I really don't care. The code in question is only affected when we have > CONFIG_KGDB_KDB enabled. But as it gets called from an atomic context, > is it any different than what it was doing before? Except now with > GFP_ATOMIC it is actually safer. > > Now, we could add some helper functions in the ring-buffer code to > allow us to pre-allocate the ring_buffer_iter at boot up. Then we could > pass in the per-allocated iters and use them here. Ok, I guess 32 bytes is small enough, I somehow imagined it would be bigger... -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html