Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4320015imj; Tue, 12 Feb 2019 13:47:17 -0800 (PST) X-Google-Smtp-Source: AHgI3IZhlXtDkClzVf+XcfC8hVN8Bf7YZjsndeKu6F21QXOBlFZwbnDmfgx+xSDvY0M3dl/xwMes X-Received: by 2002:a17:902:7e4c:: with SMTP id a12mr6131598pln.340.1550008037350; Tue, 12 Feb 2019 13:47:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550008037; cv=none; d=google.com; s=arc-20160816; b=BorGC7//KjLjkTW0aejNzXs6zwf3EjdOtbGj5tuPPsjkJGsWfGx49G8IoMdJAJ2oZ2 v1eSLCIQbFGQI7mqEUtczIrFe9uPDCDnMN/H68xC0lTVGLPL/OWjREYT79o0EryLvqMX ZFzy9Y50VMuMbIYtZzp+6+JWbxwCcxN9/UhPcjXOzmFujZR0JOgmvJTlxIUB97xV8jhF gw9CvJAidem7HHX/9HBpbxuIejhYfDaE3c8x/CUDgn459jV6+8/EpkU2e0hw907pGpqN Bnhf4rORKb6QjjWriwetWg5Tgxrzzh4uYUo3qD6nqzFOqEN7fXdGpBb3OSR0w5e0xB/r IOPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=RY+t8uEc5Fq+07v8SJmGnmhu1rcVR03Y3OtSDhBprWw=; b=AxR7rZlVMGK1Qf/ZrjsjlYekMPYpJ6yc4d8PX83wHXXgZgenuAJ720yGTAk30hcUWX OdHMNkxPnRt6qWToO/Jnm3oMYulZfSi0rWHB2iwcwHAlXGXd/MY7vr0ql4EyZP5X/Xxu J6yYKwy6QrA5DNMR4mHS7UP6N6nrfKBPG1T4MLm4gIQ8r9J3bhCGAKZteIo31RLGMPj7 zfMPAiwv/JMAM9P+ybMoNyXZzXiCEu7Nir3spYDhSD1/cBgvtwNTVmj6wudBMGU5F7op JUVh/f/+XquIFipFUatxU/3SZwVbGqCXYHkEkVBZC70YGadTxWAKnL+iPNHGhYDmVavC VnKA== 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 k16si8143413pls.124.2019.02.12.13.47.01; Tue, 12 Feb 2019 13:47:17 -0800 (PST) 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 S1730759AbfBLVHc (ORCPT + 99 others); Tue, 12 Feb 2019 16:07:32 -0500 Received: from www262.sakura.ne.jp ([202.181.97.72]:33892 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728059AbfBLVHc (ORCPT ); Tue, 12 Feb 2019 16:07:32 -0500 Received: from fsav301.sakura.ne.jp (fsav301.sakura.ne.jp [153.120.85.132]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id x1CL7UsS021116; Wed, 13 Feb 2019 06:07:30 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav301.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav301.sakura.ne.jp); Wed, 13 Feb 2019 06:07:30 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav301.sakura.ne.jp) Received: from [192.168.1.8] (softbank126126163036.bbtec.net [126.126.163.36]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id x1CL7OOv021047 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NO); Wed, 13 Feb 2019 06:07:29 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: [PATCH] proc, oom: do not report alien mms when setting oom_score_adj To: Andrew Morton , Michal Hocko Cc: David Rientjes , Johannes Weiner , Linus Torvalds , Yong-Taek Lee , linux-mm@kvack.org, LKML , Michal Hocko References: <20190212102129.26288-1-mhocko@kernel.org> <20190212125635.27742b5741e92a0d47690c53@linux-foundation.org> From: Tetsuo Handa Message-ID: <46b3262e-2a9a-da01-16de-14cd4d7eaa40@i-love.sakura.ne.jp> Date: Wed, 13 Feb 2019 06:07:26 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190212125635.27742b5741e92a0d47690c53@linux-foundation.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/02/13 5:56, Andrew Morton wrote: > On Tue, 12 Feb 2019 11:21:29 +0100 Michal Hocko wrote: > >> Tetsuo has reported that creating a thousands of processes sharing MM >> without SIGHAND (aka alien threads) and setting >> /proc//oom_score_adj will swamp the kernel log and takes ages [1] >> to finish. This is especially worrisome that all that printing is done >> under RCU lock and this can potentially trigger RCU stall or softlockup >> detector. >> >> The primary reason for the printk was to catch potential users who might >> depend on the behavior prior to 44a70adec910 ("mm, oom_adj: make sure >> processes sharing mm have same view of oom_score_adj") but after more >> than 2 years without a single report I guess it is safe to simply remove >> the printk altogether. >> >> The next step should be moving oom_score_adj over to the mm struct and >> remove all the tasks crawling as suggested by [2] >> >> [1] http://lkml.kernel.org/r/97fce864-6f75-bca5-14bc-12c9f890e740@i-love.sakura.ne.jp >> [2] http://lkml.kernel.org/r/20190117155159.GA4087@dhcp22.suse.cz > > I think I'll put a cc:stable on this. Deleting a might-trigger debug > printk is safe and welcome. > Putting cc:stable is fine. But I doubt the usefulness of this patch. If nobody really depends on the behavior prior to 44a70adec910, we should remove the pointless (otherwise racy) iteration itself.