Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp703165imm; Wed, 13 Jun 2018 07:05:23 -0700 (PDT) X-Google-Smtp-Source: ADUXVKINwdVxX6+WBzyjL8Etoin8qAaDq4QxHK5gvEaAsR3Ra74lvzPeHMIc5BAs5rZRL5y+pDD7 X-Received: by 2002:a62:c809:: with SMTP id z9-v6mr5041929pff.5.1528898723747; Wed, 13 Jun 2018 07:05:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528898723; cv=none; d=google.com; s=arc-20160816; b=wsapwKZjcGx5AoTvLgIa2yQXgW3UqCptUvm+J9B6zqerdAhG5/mfusEjt5yYj8ygSV 5GIpsMeol3AqAoHcFiwZ/YjWJe04R6G/bcWlU854FLBW0PPyPdqPEkf6fUdn+JticE2P lsSBwoe7EI0B1BxjI80CuM6/o4jFpwA9QcEuq9l0PvDtwTZkgIzkdOeyCBYEEnumWuAd 2TnpM2XvTOT67WfXxGNMBBrhY7e9IC+O+qpIk4p9d51N4iG0AODnHpPKlByMno0YUFHb 5i2nKtdp1xoL5nthAoLioN8jNUSzRdaNz+uo5yWmFHIxCIHFD19xJEymQmv9GV9kueig nDJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=1tgBtaoWsQyvP1Q5NwshFndKwjxZuG40S3U5PEbm9Y8=; b=jKXJxhMt9+rmiHh5rckmQ/vSY5/7DAqh6dZsogTpG7+x2cPQ3g88VuW8zDjDPSFH5f zQ/5l6Ai4XRnGLESQBOMPmuNkHhiF30XatUAee3bOOPSBC3b+We6rx7o80Kqc3AglKw/ LWe7Qakyil9ppWHTO4WYqdDBTXZI7GIHDz/5wk3U5DhWVqM4EcqJC8aZVIQMJYRFeEzD r5z/KSAH+bDOwh0RsTTxohsqbldfVHDM8rnDV8mtZd0KCPiXS04WGJYoJUwcK+tDPtbW lo1ahh2VNuNNb2jWPABKIcLCnHAl6dPBA7HjhxY4kM2Slu5V3LgqStPbYl4cge8D7y5E X4Yw== 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 t29-v6si2820684pfg.114.2018.06.13.07.05.09; Wed, 13 Jun 2018 07:05:23 -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 S935783AbeFMOCe (ORCPT + 99 others); Wed, 13 Jun 2018 10:02:34 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:41630 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935662AbeFMOCd (ORCPT ); Wed, 13 Jun 2018 10:02:33 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BC63B400739D; Wed, 13 Jun 2018 14:02:32 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 85E27178BC; Wed, 13 Jun 2018 14:02:28 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id w5DE2S6G007286; Wed, 13 Jun 2018 10:02:28 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w5DE2SHh007282; Wed, 13 Jun 2018 10:02:28 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Wed, 13 Jun 2018 10:02:28 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Mike Snitzer cc: Jing Xia , agk@redhat.com, dm-devel@redhat.com, linux-kernel@vger.kernel.org Subject: Re: dm bufio: Reduce dm_bufio_lock contention In-Reply-To: <20180612212007.GA22717@redhat.com> Message-ID: References: <1528790608-19557-1-git-send-email-jing.xia@unisoc.com> <20180612212007.GA22717@redhat.com> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 13 Jun 2018 14:02:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 13 Jun 2018 14:02:32 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mpatocka@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Jun 2018, Mike Snitzer wrote: > On Tue, Jun 12 2018 at 4:03am -0400, > Jing Xia wrote: > > > Performance test in android reports that the phone sometimes gets > > hanged and shows black screen for about several minutes.The sysdump shows: > > 1. kswapd and other tasks who enter the direct-reclaim path are waiting > > on the dm_bufio_lock; > > Do you have an understanding of where they are waiting? Is it in > dm_bufio_shrink_scan()? > > > 2. the task who gets the dm_bufio_lock is stalled for IO completions, > > the relevant stack trace as : > > > > PID: 22920 TASK: ffffffc0120f1a00 CPU: 1 COMMAND: "kworker/u8:2" > > #0 [ffffffc0282af3d0] __switch_to at ffffff8008085e48 > > #1 [ffffffc0282af3f0] __schedule at ffffff8008850cc8 > > #2 [ffffffc0282af450] schedule at ffffff8008850f4c > > #3 [ffffffc0282af470] schedule_timeout at ffffff8008853a0c > > #4 [ffffffc0282af520] schedule_timeout_uninterruptible at ffffff8008853aa8 > > #5 [ffffffc0282af530] wait_iff_congested at ffffff8008181b40 > > #6 [ffffffc0282af5b0] shrink_inactive_list at ffffff8008177c80 > > #7 [ffffffc0282af680] shrink_lruvec at ffffff8008178510 > > #8 [ffffffc0282af790] mem_cgroup_shrink_node_zone at ffffff80081793bc > > #9 [ffffffc0282af840] mem_cgroup_soft_limit_reclaim at ffffff80081b6040 Please send the full stacktrace of this task. Then, we can see, why is it waiting here. Mikulas