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=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 D8140C0044D for ; Mon, 16 Mar 2020 09:31:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A294C20658 for ; Mon, 16 Mar 2020 09:31:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A294C20658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3C30A6B0003; Mon, 16 Mar 2020 05:31:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 374376B0005; Mon, 16 Mar 2020 05:31:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2B0876B0007; Mon, 16 Mar 2020 05:31:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0239.hostedemail.com [216.40.44.239]) by kanga.kvack.org (Postfix) with ESMTP id 11EC96B0003 for ; Mon, 16 Mar 2020 05:31:56 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id CE29E180AD815 for ; Mon, 16 Mar 2020 09:31:55 +0000 (UTC) X-FDA: 76600708590.05.wine24_10ce97c3e963f X-HE-Tag: wine24_10ce97c3e963f X-Filterd-Recvd-Size: 4250 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Mon, 16 Mar 2020 09:31:55 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id a141so17142825wme.2 for ; Mon, 16 Mar 2020 02:31:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ph+Lpxd0P8ykJk38qY3p4Me0iTKehJecocwBUyoICdw=; b=sUvuajmuMr1rHdkMkFPYL8Rw29HGaVkkBIh158Jeg4uWC+z6dn0X6hNZK8QcaytqHB e+lDNl4lLQHWzoNxKjwSvJoH9VxRc9vTe80jaAoZPs2mnHjTetl7KOZlLwocn28WNdUC ePQgxabIA+iuSvlJlzUIIfVKbX483SJvKY4rNbWpkvsZOYlrRKS8U5GoSB3R9rE9WgCO Z05wzaiAEeze6mgypAnSTeFd1xFE4Uff9bzdRXAK8eHWhghkaComoeJSnAYRvDRe/GAJ J4Fsgj6IouzT8ffldMFVdpHa+rHhAjbt/1MmMHLauRUvYpbHB1nhn3bpVGQTaHp7IlzZ Fy7Q== X-Gm-Message-State: ANhLgQ09xuZe26FshihLFqTlIbeAYa1i0ueNp8fGytOeXi5fW22bRePd YU+BY1CTTwtzyuRn8j6ZzrQ= X-Google-Smtp-Source: ADFU+vuzMY/bxgQVAYh9LRNLpKp+57RbLaL/bDaeNyCIhcyn7QrUEk5CpP5iqMFCd2M73sePPJWAyA== X-Received: by 2002:a05:600c:2244:: with SMTP id a4mr25638104wmm.147.1584351114379; Mon, 16 Mar 2020 02:31:54 -0700 (PDT) Received: from localhost (ip-37-188-254-25.eurotel.cz. [37.188.254.25]) by smtp.gmail.com with ESMTPSA id d7sm20150724wrc.25.2020.03.16.02.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2020 02:31:53 -0700 (PDT) Date: Mon, 16 Mar 2020 10:31:52 +0100 From: Michal Hocko To: Andrew Morton Cc: David Rientjes , Tetsuo Handa , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch] mm, oom: prevent soft lockup on memcg oom for UP systems Message-ID: <20200316093152.GE11482@dhcp22.suse.cz> References: <993e7783-60e9-ba03-b512-c829b9e833fd@i-love.sakura.ne.jp> <202003120012.02C0CEUB043533@www262.sakura.ne.jp> <20200312153238.c8d25ea6994b54a2c4d5ae1f@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200312153238.c8d25ea6994b54a2c4d5ae1f@linux-foundation.org> 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 Thu 12-03-20 15:32:38, Andrew Morton wrote: > On Thu, 12 Mar 2020 11:07:15 -0700 (PDT) David Rientjes wrote: > > > On Thu, 12 Mar 2020, Tetsuo Handa wrote: > > > > > > On Thu, 12 Mar 2020, Tetsuo Handa wrote: > > > > > > If you have an alternate patch to try, we can test it. But since this > > > > > > cond_resched() is needed anyway, I'm not sure it will change the result. > > > > > > > > > > schedule_timeout_killable(1) is an alternate patch to try; I don't think > > > > > that this cond_resched() is needed anyway. > > > > > > > > > > > > > You are suggesting schedule_timeout_killable(1) in shrink_node_memcgs()? > > > > > > > > > > Andrew Morton also mentioned whether cond_resched() in shrink_node_memcgs() > > > is enough. But like you mentioned, > > > > > > > It passes our testing because this is where the allocator is looping while > > the victim is trying to exit if only it could be scheduled. > > 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. -- Michal Hocko SUSE Labs