Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2232163imm; Tue, 4 Sep 2018 00:09:56 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZAqfbaxDga1oZ+B+U2uS4SbEprdlkHgeC3VHZh1ylm2IErCmhnCxwytJFcSL01v/bNd4SI X-Received: by 2002:aa7:83cd:: with SMTP id j13-v6mr33315391pfn.236.1536044996290; Tue, 04 Sep 2018 00:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536044996; cv=none; d=google.com; s=arc-20160816; b=tcFo5i94j/uUhho1/iuHReAvKeVZd47Gtj9MIpJy983Ukavmttxs5h/HYpCAAn6Eq6 asfRBkzmT1u7/bpY6ePyVUcbLfdb2J0otbDyZmxIA3VwMbx8JVUogRg0hTgXiYUCW63l AbGQnRPjnsl6pB6QWZZ4cSSa8RNMRDmQvT0edKv+h+/VwpTURa06CtV+lMOyiokMqOqE QCdva5OmfQU/WyQiYgV5kAOXLytfhXC0GOLGF449QSU7bVTE4vaSazbMqgtSoS/CJsXB FjX7BO4WX6yzEogUmBTx1xKqeAZPxnWeFj8NsNzLwmJALfrt8ubbqIapHo3PufzlveF7 lRRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=6PY4/cOWYCU5ff6JUuAt26Z9Ei/OiqkMGIZKQHqlOZA=; b=Mt9UPvCU24Y9hk/eQV3nwhV2cgB1J/9qorCzI8SZm9Kouf55HbGL8OmbcTk6xLjP5B lP2x2vGHPjRxMjyHrLnbTomAL78s6+fTIPeuibC5fEAw7jAOv4zlxVYz+qfuNmizUggM qn8/xkhjSOPZ2rjvMjnUvdQdCjtXLlQPmdZhDOgS/Vms4YKLp9z4EGCLNfvhp+qF+hIu BLYWqiGP+6FIog3Ay6QUkYN4hS6XkS/pQqzkpGaIppc7ZkrDDVIyX4xLBjoa6cpuDA7y qL1tJ6xnvxGAAmnkNrl33w3Evmxq35TPmwItDg9dv+lOU7WdDwt8lmjU5kj0eYMDDN6z f97g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11-v6si20263135plb.373.2018.09.04.00.09.40; Tue, 04 Sep 2018 00:09:56 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726961AbeIDLcN (ORCPT + 99 others); Tue, 4 Sep 2018 07:32:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:38470 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726087AbeIDLcM (ORCPT ); Tue, 4 Sep 2018 07:32:12 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 53F2FAFF4; Tue, 4 Sep 2018 07:08:25 +0000 (UTC) Date: Tue, 4 Sep 2018 09:08:24 +0200 From: Michal Hocko To: Mikulas Patocka Cc: jing xia , Mike Snitzer , agk@redhat.com, dm-devel@redhat.com, linux-kernel@vger.kernel.org Subject: Re: dm bufio: Reduce dm_bufio_lock contention Message-ID: <20180904070824.GH14951@dhcp22.suse.cz> References: <1528790608-19557-1-git-send-email-jing.xia@unisoc.com> <20180612212007.GA22717@redhat.com> <20180614073153.GB9371@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 03-09-18 18:23:17, Mikulas Patocka wrote: > > > On Wed, 1 Aug 2018, jing xia wrote: > > > We reproduced this issue again and found out the root cause. > > dm_bufio_prefetch() with dm_bufio_lock enters the direct reclaim and > > takes a long time to do the soft_limit_reclaim, because of the huge > > number of memory excess of the memcg. > > Then, all the task who do shrink_slab() wait for dm_bufio_lock. > > > > Any suggestions for this?Thanks. > > There's hardly any solution because Michal Hocko refuses to change > __GFP_NORETRY behavior. > > The patches 41c73a49df31151f4ff868f28fe4f129f113fa2c and > d12067f428c037b4575aaeb2be00847fc214c24a could reduce the lock contention > on the dm-bufio lock - the patches don't fix the high CPU consumption > inside the memory allocation, but the kernel code should wait less on the > bufio lock. If you actually looked at the bottom line of the problem then you would quickly find out that dm-bufio lock is the least of the problem with the soft limit reclaim. This is a misfeature which has been merged and we have to live with it. All we can do is to discourage people from using it and use much more saner low limit instead. So please stop this stupid blaming, try to understand the reasoning behind my arguments. -- Michal Evil Hocko SUSE Labs