Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1116964ybh; Tue, 10 Mar 2020 15:08:01 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuuz69xGNS5fcKH8LSB8KA7R0CX+3g2U7cpPyD6gXyJ4LFQTt9S8KaeW0OPEwryFRKAg4UU X-Received: by 2002:a9d:30c7:: with SMTP id r7mr6153764otg.289.1583878081222; Tue, 10 Mar 2020 15:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583878081; cv=none; d=google.com; s=arc-20160816; b=AhWUdu+820POzsue2qOq6N3xzGVRQObvPEEZ9GS+mBQtn1GgKB1lpOvy+wjoJsi3Qm Qjo0GIbRFyPrKJA+ZCi2i/qoRM8bKUWLhkBOOvFCvFRTdbW8gVa+pdE6gCbaNwUb6TtK RXw8dAIJLoFfWqyAkYzmXQspo2I0TUnXS/oSwO7RIlY3krMBYOYeK7RoRGG2cAqZIE1X og034W5U7a87pXur+e3U2F9EVI+6CJISiLvwKKRgGkwXJebb48WkHnIsspL9wFcGyApR VXyniorn1VbEWajrppm+mm+vhRcc893w1VZ/TyApTFwq0XJyKmBT+wazE0KWLfCARv9g ymrA== 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=se6kZtFERq+xUbX4ZJyYn+Rp+wA5tcaPxQZem8eBcZg=; b=YdnMJOb2Jwl9xg4Pz6vP4/dLaE0ekrfiE59C9Jy5nboi06m5CL8h8j8Mx2Cm2p+TKz fP/ji9Nn2HX+WX0eT+FFTQGHusfu0cMaqo2DtRUncQdqCVmnlBfn01z9My9wtzsYL1xd m9QLRsHVcJOz4BBCeYyoWVCIIjt8efZgQ3YrVMPNdr2FRI79JpVABtqp8H30PD60USxK /8+OdAng0imoYFl3FoqmM/XMLsbJZR0XjPWg/leG4qHe8pjJy+mVE+fi2ki5v5F9A6c5 rrrj1Xy+IS9pb6wx0Dhw4ggAFLhM8g1lbkM0Byid80zbvw2h7bHPT1NgJs8vMYOQaWJ8 xBdA== 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 w128si72234oib.247.2020.03.10.15.07.42; Tue, 10 Mar 2020 15:08:01 -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 S1727685AbgCJWGH (ORCPT + 99 others); Tue, 10 Mar 2020 18:06:07 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:51393 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726273AbgCJWGH (ORCPT ); Tue, 10 Mar 2020 18:06:07 -0400 Received: from fsav401.sakura.ne.jp (fsav401.sakura.ne.jp [133.242.250.100]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 02AM5mTW040841; Wed, 11 Mar 2020 07:05:48 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav401.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav401.sakura.ne.jp); Wed, 11 Mar 2020 07:05:48 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav401.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 02AM5hsL040682 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Mar 2020 07:05:48 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Subject: Re: [patch] mm, oom: prevent soft lockup on memcg oom for UP systems To: David Rientjes Cc: Andrew Morton , Vlastimil Babka , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: From: Tetsuo Handa Message-ID: <0e5ca6ee-d460-db8e-aba2-79aa7a66fad1@I-love.SAKURA.ne.jp> Date: Wed, 11 Mar 2020 07:05:40 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: 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 2020/03/11 6:39, David Rientjes wrote: > diff --git a/mm/vmscan.c b/mm/vmscan.c > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -2637,6 +2637,8 @@ static void shrink_node_memcgs(pg_data_t *pgdat, struct scan_control *sc) > unsigned long reclaimed; > unsigned long scanned; > > + cond_resched(); > + Is this safe for CONFIG_PREEMPTION case? If current thread has realtime priority, can we guarantee that the OOM victim (well, the OOM reaper kernel thread rather than the OOM victim ?) gets scheduled? > switch (mem_cgroup_protected(target_memcg, memcg)) { > case MEMCG_PROT_MIN: > /* >