Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2681269imm; Tue, 4 Sep 2018 08:20:46 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbSiT3ciQsidmq8V32Cx+gMTs6zllNPEGadlCgCGdHacUM89YzClf1jhPSCdgxe4ufU6ZzX X-Received: by 2002:a17:902:7c07:: with SMTP id x7-v6mr32807917pll.113.1536074446315; Tue, 04 Sep 2018 08:20:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536074446; cv=none; d=google.com; s=arc-20160816; b=o2jf/q9MgN81HAX+8oEuyQ4CScHIiDcITcEX9mpxRzZ0Bc6Cu3n7a57gIBM6QzraIs knzTIVqgqNVy4RgOGtBKJwIb83GX19sTzyAkVPJ6im9gu7Qt+TrXDe7tYQRY/ynqb/ON Ix4iIuIom5z1KrKVgE67n3V6DocPdC60mG2Sp//l6tnBpJ84WZ8X30AWEstQYbx6jmE+ Sx4V4Z1G19+b9Sbg4Yo+qyCLzfpNhgOlgAjuCKVf7gul9Ly466MX9F+/qEGd1FVJdian fTjgDbn0Ns5hbkGDi0lngnPBQ8NktKbdzCgV0kwEhBMNA5rrkAB3oWx5mJQ/88MLShlD bKXw== 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=sg3bpI0OUynM33+5RRAKGyKaKVYg9wFv44LRYf5C1nk=; b=vz6Fnf3tabctUtH4I9tQ8B1RsVdXwuljKyscIwNIcq756J8om590muBq8nAgMqiAhO VJ6chVVziDdF4iLuFcJrAtD5H+ryOmEPb/12kKTjA2wskDEJ4tfFTYRkT6I30ydlQ0Dq py40wlmBW/XQYa7kZUEh3wTb9wKWmVFfqMeCuezKdPopQPJ7qcf4zS/D8c2AGgLpQqmk NoLlq0ysLA5KIVNk316s/TDKq4TUucuAy1mCLMW3p1fPCW/2a9PBqxUGt8k/yKyztZof F0gzj7Z262+5ZF1C38sZ7mf6FjGmlcYeGJKCgriSj+dfhxPKDVXORzVf0GwnWzAQBDlz 6wDA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f18-v6si20969344pgi.300.2018.09.04.08.20.29; Tue, 04 Sep 2018 08:20:46 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727447AbeIDToU (ORCPT + 99 others); Tue, 4 Sep 2018 15:44:20 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50210 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726015AbeIDToU (ORCPT ); Tue, 4 Sep 2018 15:44:20 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 211824023ECB; Tue, 4 Sep 2018 15:18:47 +0000 (UTC) Received: from localhost (unknown [10.18.25.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 268012023416; Tue, 4 Sep 2018 15:18:45 +0000 (UTC) Date: Tue, 4 Sep 2018 11:18:44 -0400 From: Mike Snitzer To: Michal Hocko Cc: Mikulas Patocka , jing xia , agk@redhat.com, dm-devel@redhat.com, linux-kernel@vger.kernel.org Subject: Re: dm bufio: Reduce dm_bufio_lock contention Message-ID: <20180904151844.GB10112@redhat.com> References: <1528790608-19557-1-git-send-email-jing.xia@unisoc.com> <20180612212007.GA22717@redhat.com> <20180614073153.GB9371@dhcp22.suse.cz> <20180904070824.GH14951@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180904070824.GH14951@dhcp22.suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 04 Sep 2018 15:18:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 04 Sep 2018 15:18:47 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'msnitzer@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 04 2018 at 3:08am -0400, Michal Hocko wrote: > 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. Yes, this bickering isn't productive. Michal, your responses are pretty hard to follow. I'm just trying to follow along on what it is you're saying should be done. It isn't clear to me. PLEASE, restate what we should be doing differently. Or what changes need to happen outside of DM, etc. Thanks, Mike