Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2432280ybh; Mon, 16 Mar 2020 03:06:32 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvqXk+FWcNN2qTk8HlOSwBhQsftAYKGLPGUHK5oFSnts+/PDRBgUJ9H4tCrMKx5gBIiRgGK X-Received: by 2002:a9d:4c10:: with SMTP id l16mr20771256otf.109.1584353191944; Mon, 16 Mar 2020 03:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584353191; cv=none; d=google.com; s=arc-20160816; b=EY25qKmxl2r5V84Kcsv5r2jthKKFa42Wrfpt0dLT7+fjGig9whZW1oXdjm76Ukf2/i jZOb/iNjWcZVh8H+pnvRJoGHO8Cirn05PFRT85pyos22iQPDMMncsqpNcDzM61Kjga7M +fzP7cWvxvKMK4nQEVb0rzNrLV42JZV6gxFlmTTowlbW/Ur9W0dOeNdixoF9QxZNQpVC Z/QLm2Rp6NO2s8qOtQcaPl/HTFT4P9jEXPRDb0fzfzXqsVdeNzCe8DIKVQw6GUh4/KAv SlhzxiAglwuxdNjJJF5uE+J//dbybCobk737APp5eG8dMdt6nMTfzBP9Dv7gE/AgIO2E Jqyw== 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=dZssM/O0bXFskevip1S+qs+oMfNo0ZRP48qnz75mfs0=; b=GrqDCZIaiERzssycKoZ95VwLvY1ItlvbK3pY1+JEbPVwdv/VIIcPGZhR1BZ5/whLlm rhoB+eOlY0tiJciVdQ1Cr2ESROuOH1Fs+HV795D6oPPWzabksRqXA+vmI39tGVxCKEpb nQ1ocny2iOuAzo2vXuOA9WQEIz7QQxj3PRE7L3R1Quben/JjABK9EVoLvDSI/fmzHNkS YmyJLAe2NsE/5VL4miyCw4HRtBDhxY0t0krxtcI0N098cjWKb4S9i16zlcStzOlWAxHa JH2S+x6R7sm4YTOcX8wZE9Y2QYJzEetJ32Lr1SuFh6UYb44bfI0hkBlLEANDlG1LL6OZ 2qhQ== 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 e11si2985608oie.254.2020.03.16.03.06.18; Mon, 16 Mar 2020 03:06:31 -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 S1730569AbgCPKFK (ORCPT + 99 others); Mon, 16 Mar 2020 06:05:10 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:50332 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730557AbgCPKFK (ORCPT ); Mon, 16 Mar 2020 06:05:10 -0400 Received: from fsav109.sakura.ne.jp (fsav109.sakura.ne.jp [27.133.134.236]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 02GA4og3062365; Mon, 16 Mar 2020 19:04:50 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav109.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav109.sakura.ne.jp); Mon, 16 Mar 2020 19:04:50 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav109.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 02GA4jQd062348 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 16 Mar 2020 19:04:50 +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: Michal Hocko , David Rientjes Cc: Andrew Morton , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <993e7783-60e9-ba03-b512-c829b9e833fd@i-love.sakura.ne.jp> <202003120012.02C0CEUB043533@www262.sakura.ne.jp> <20200312153238.c8d25ea6994b54a2c4d5ae1f@linux-foundation.org> <20200316093152.GE11482@dhcp22.suse.cz> From: Tetsuo Handa Message-ID: <3be371a0-5b1e-7115-8659-186612ad5fb0@i-love.sakura.ne.jp> Date: Mon, 16 Mar 2020 19:04:44 +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: <20200316093152.GE11482@dhcp22.suse.cz> 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/16 18:31, Michal Hocko wrote: >> What happens if the allocator has SCHED_FIFO? > > The same thing as a SCHED_FIFO running in a tight loop in the userspace. > > As long as a high priority context depends on a resource held by a low > priority task then we have a priority inversion problem and the page > allocator is no real exception here. But I do not see the allocator > is much different from any other code in the kernel. We do not add > random sleeps here and there to push a high priority FIFO or RT tasks > out of the execution context. We do cond_resched to help !PREEMPT > kernels but priority related issues are really out of scope of that > facility. > Spinning with realtime priority in userspace is a userspace's bug. Spinning with realtime priority in kernelspace until watchdog fires is a kernel's bug. We are not responsible for userspace's bug, and I'm asking whether the memory allocator kernel code can give enough CPU time to other threads even if current thread has realtime priority.