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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1FBFC4360D for ; Sat, 21 Sep 2019 20:30:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4F5DD20820 for ; Sat, 21 Sep 2019 20:30:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F5DD20820 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B17CF6B0007; Sat, 21 Sep 2019 16:30:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AC89C6B0008; Sat, 21 Sep 2019 16:30:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9DDA76B000A; Sat, 21 Sep 2019 16:30:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0162.hostedemail.com [216.40.44.162]) by kanga.kvack.org (Postfix) with ESMTP id 76FEA6B0007 for ; Sat, 21 Sep 2019 16:30:49 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 0F74C45C4 for ; Sat, 21 Sep 2019 20:30:49 +0000 (UTC) X-FDA: 75960071418.11.list63_7b7b2f10aed53 X-HE-Tag: list63_7b7b2f10aed53 X-Filterd-Recvd-Size: 3301 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Sat, 21 Sep 2019 20:30:48 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1F930AFA4; Sat, 21 Sep 2019 20:30:46 +0000 (UTC) Date: Sat, 21 Sep 2019 22:30:43 +0200 From: Michal Hocko To: Andrew Morton Cc: Tetsuo Handa , Roman Gushchin , ShakeelButt , linux-mm@kvack.org, Linus Torvalds Subject: Re: [PATCH] mm, oom: avoid printk() iteration under RCU Message-ID: <20190921203043.GA3382@dhcp22.suse.cz> References: <1563360901-8277-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> <20190718083014.GB30461@dhcp22.suse.cz> <7478e014-e5ce-504c-34b6-f2f9da952600@i-love.sakura.ne.jp> <20190718140224.GC30461@dhcp22.suse.cz> <4291b98c-a961-5648-34d1-6f9347e65782@i-love.sakura.ne.jp> <20190920171042.8d970f9fc6f360de9b20ebbe@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190920171042.8d970f9fc6f360de9b20ebbe@linux-foundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri 20-09-19 17:10:42, Andrew Morton wrote: > On Sat, 20 Jul 2019 20:29:23 +0900 Tetsuo Handa wrote: > > > > > > >> ) under RCU and this patch is one of them (except that we can't remove > > >> printk() for dump_tasks() case). > > > > > > No, this one adds a complexity for something that is not clearly a huge > > > win or the win is not explained properly. > > > > > > > The win is already explained properly by the past commits. Avoiding RCU stalls > > (even without slow consoles) is a clear win. The duration of RCU stall avoided > > by this patch is roughly the same with commit b2b469939e934587. > > > > We haven't succeeded making printk() asynchronous (and potentially we won't > > succeed making printk() asynchronous because we need synchronous printk() > > when something critical is undergoing outside of out_of_memory()). Thus, > > bringing printk() to outside of RCU section is a clear win we can make for now. > > It's actually not a complex patch and moving all that printing outside > the rcu section makes sense. So I'll sit on the patch for a few more > days but am inclined to send it upstream. Look, I am quite tired of arguing about this and other changes following the similar pattern. In short a problematic code is shuffled around and pretend to solve some problem. In this particular case it is a RCU stall which in itself is not a fatal condition. Sure it sucks and the primary reason is that printk can take way too long. This is something that is currently a WIP to be address. What is more important though there is no sign of any _real world_ workload that would require a quick workaround to justify a hacky stop gap solution. So again, why do we want to add more code for something which is not clear to be a real life problem and that will add a maintenance burden for future? -- Michal Hocko SUSE Labs