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=-4.0 required=3.0 tests=BAYES_00,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 B8C7CC433E1 for ; Tue, 14 Jul 2020 12:57:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8205B22464 for ; Tue, 14 Jul 2020 12:57:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8205B22464 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 C0E946B0003; Tue, 14 Jul 2020 08:57:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BBF0C6B0005; Tue, 14 Jul 2020 08:57:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A85436B0006; Tue, 14 Jul 2020 08:57:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0174.hostedemail.com [216.40.44.174]) by kanga.kvack.org (Postfix) with ESMTP id 8F7BC6B0003 for ; Tue, 14 Jul 2020 08:57:25 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id F123A181AC9B6 for ; Tue, 14 Jul 2020 12:57:24 +0000 (UTC) X-FDA: 77036682408.14.front52_5a03b5326ef1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id A31AF18229818 for ; Tue, 14 Jul 2020 12:57:24 +0000 (UTC) X-HE-Tag: front52_5a03b5326ef1 X-Filterd-Recvd-Size: 3177 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Tue, 14 Jul 2020 12:57:24 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id f2so21361897wrp.7 for ; Tue, 14 Jul 2020 05:57:24 -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=cUnmeuzM944ITup9H0DRauklE1mALXm7R1CFq35IvYk=; b=cjYk71qaGh1Ly24rymsbWfXWvlTuHcaK5cNB8pDA6qyh5edpphbt2IKVEVqUDjjJ0Q T6NsZiZYVp8kLIm/OeuRlC9HMxNgWQTJWDiLhQskOXgRQR29Gnm63uZ73QTxsjWccCq+ YtOL/GD6M+pDW4XCBPzWin3wGqxXS3d6dOeMNasrlMxCSDC0X5qW4VtGGf4g6aC1dm2x y2Ai1p+UPs/Uc3Tc1AgppSmLzxj/GOkJi8/HuMOtUCaJiOURLC8+93iwwZnHTSIDjbOJ buQXmEXMXYg6PAJoO5kv+YDqyK2mM43ZV2z3Lmpb49vUBzy3mTRMQTp6P3jSz1WMXM1C keoQ== X-Gm-Message-State: AOAM530/bJZkGvXE98f+0SbZzEGk0wnv5wkJQeXGantp5Fdtx1miTMBi Rb4LXA9SKeubpzHHtve2HVw= X-Google-Smtp-Source: ABdhPJx/KKTA/y2cog8ZKuKiRhWLGj+zDGiwmr1CvZE3cRRVtWOFZIaMPmY0bjZS0nh1KbI/TgKLNg== X-Received: by 2002:adf:bc41:: with SMTP id a1mr5128576wrh.186.1594731443391; Tue, 14 Jul 2020 05:57:23 -0700 (PDT) Received: from localhost (ip-37-188-148-171.eurotel.cz. [37.188.148.171]) by smtp.gmail.com with ESMTPSA id s15sm4195946wmj.41.2020.07.14.05.57.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 05:57:22 -0700 (PDT) Date: Tue, 14 Jul 2020 14:57:21 +0200 From: Michal Hocko To: Tetsuo Handa Cc: Yafang Shao , rientjes@google.com, akpm@linux-foundation.org, linux-mm@kvack.org Subject: Re: [PATCH] mm, oom: check memcg margin for parallel oom Message-ID: <20200714125721.GK24642@dhcp22.suse.cz> References: <1594728512-18969-1-git-send-email-laoar.shao@gmail.com> <20200714123726.GI24642@dhcp22.suse.cz> <83fececb-924c-0e1b-8e48-547b93593650@i-love.sakura.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83fececb-924c-0e1b-8e48-547b93593650@i-love.sakura.ne.jp> X-Rspamd-Queue-Id: A31AF18229818 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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 Tue 14-07-20 21:47:06, Tetsuo Handa wrote: > On 2020/07/14 21:37, Michal Hocko wrote: > > - if (mutex_lock_killable(&oom_lock)) > > + if (!mutex_trylock(&oom_lock)) > > return true; > > I don't like this change. The trylock needlessly wastes CPU time which could > have been utilized by the OOM killer/reaper for reclaiming memory. Ohh, that was an unintended hunk which stayed there from the previous discussion. With the margin check the lock itself can stay. > > Rather, I want to change > > - if (!mutex_trylock(&oom_lock)) { > + if (mutex_lock_killable(&oom_lock)) { > > in __alloc_pages_may_oom() side. Please do not start a tangent discussion again. If you want to make this change then post a patch with a justification. -- Michal Hocko SUSE Labs