Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp39347ybh; Fri, 13 Mar 2020 16:34:10 -0700 (PDT) X-Google-Smtp-Source: ADFU+vui203INk18muolwWTbQ2Mzd0GZQROj98bKanwSqv8MmIPUnOOc/j3QnO2szJyX04uCVK1n X-Received: by 2002:a05:6808:301:: with SMTP id i1mr9153602oie.19.1584142450546; Fri, 13 Mar 2020 16:34:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584142450; cv=none; d=google.com; s=arc-20160816; b=WUUjjM6ZkqmKriK5MVm/1bq4gQNAfv2Uz42H/sKXOULrH7R8gzabYLDCwCjLhIg8nZ P8y+l1PHzlzGzqkPbWPubGnnTnIVJcPDcYDNyxQMT5qmH3RmzN/BnFfK4Cc1P12RnsHX 1JTKoO3VfV2AaAOvjjmouZVqhf3woDnkGWlio46OIzDjnImQmVqkvKxuAk3pqKgQzg5G 1SDJfZvfiHdaiegu95IchB0cMw9r7pdIWobn1FBoItkrtsyUeYKSnkV9ZtBudlFmUh59 LC6X9Ct6EHuQ0wHpU0l/eWVlFwK5WsRcIzYwi20NpTzMV32MMMOA8YDYq/hMDXYfbsfZ h6qw== 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:references:cc:to:from:subject; bh=DJJnGUfzDWHvLyDENTBKlKLt6bWiwc4khZ6hwt3VnhE=; b=pDluB3rRGiMMalt0bQ1NDaBOg642vQgusIjD3hDsosR2rEktjH07yjXPMIZaCCYpH2 nY5VL6e6V+NH2MEPgpwR4cZ2WF5V657QHGDy1LPzBsCvNTsEeUjFghuAM3t/IANKwv5t ZEDLfgdHvLJJQs5tktheA6wLZ+SQCtBwf/Ct/5mbj6DczTwimkg3kAb6DYV6w3YA74sQ s4yEpgxfA1HHUWn30WtPJLdFgrmUbxbwV6Pr0Rq6XUrYab31TMx2HUaiAU+zKBzYB9yR CnY7LSJ7v20hAYeVNpBR5vRUSKRYLSk4A3X6qRSgnOF2h6+N2kG7XoZTJhQeMXp/WZub ug+A== 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 o16si5186639oie.125.2020.03.13.16.33.57; Fri, 13 Mar 2020 16:34:10 -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 S1727610AbgCMXdO (ORCPT + 99 others); Fri, 13 Mar 2020 19:33:14 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:52286 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726591AbgCMXdO (ORCPT ); Fri, 13 Mar 2020 19:33:14 -0400 Received: from fsav107.sakura.ne.jp (fsav107.sakura.ne.jp [27.133.134.234]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 02DNWvre053999; Sat, 14 Mar 2020 08:32:57 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav107.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav107.sakura.ne.jp); Sat, 14 Mar 2020 08:32:57 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav107.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 02DNWvNF053995 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 14 Mar 2020 08:32:57 +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 From: Tetsuo Handa To: David Rientjes Cc: Andrew Morton , Vlastimil Babka , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <202003120012.02C0CEUB043533@www262.sakura.ne.jp> <202003130015.02D0F9uT079462@www262.sakura.ne.jp> Message-ID: <8395df04-9b7a-0084-4bb5-e430efe18b97@i-love.sakura.ne.jp> Date: Sat, 14 Mar 2020 08:32:54 +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/14 8:15, Tetsuo Handa wrote: > If current thread is > an OOM victim, schedule_timeout_killable(1) will give other threads (including > the OOM reaper kernel thread) CPU time to run. If current thread is an OOM victim, schedule_timeout_killable(1) will give other threads (including the OOM reaper kernel thread) CPU time to run, by leaving try_charge() path due to should_force_charge() == true and reaching do_exit() path instead of returning to userspace code doing "for (;;);". Unless the problem is that current thread cannot reach should_force_charge() check, schedule_timeout_killable(1) should work.