Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp978407pxa; Wed, 12 Aug 2020 19:15:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVsOevSKINVBX+/oUhV1cPOgzj1sAUWL0Isd/xTpU8tkDKRvDEm0D1OEmD0UmWDGz7TIf2 X-Received: by 2002:a17:906:3b97:: with SMTP id u23mr2770443ejf.31.1597284909981; Wed, 12 Aug 2020 19:15:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597284909; cv=none; d=google.com; s=arc-20160816; b=vMt5xzCj9QvRQ1u/rQGca8asFEvkpZQbDEDgc1k1l02DY6q12feSp/xfyEZiQV/dh/ ajon2hMaoBnzQ09yGBC2NNIfpNHLHj9KdxEhlc+Byivq7/2GNh+MJyfXUMXVldXGUHJd 6nzJsemOv9y5Ue/UXCzyQe1F2vi0a1BJgbzEUuwOe77QAFXM99YqsZ+JKHMxoJhBymTv 2WSxvuoOlWisi1RMoAMvGV5zqmRFYZS/IwAw7atYPEObowYmK20rHTDA6zvmccASGagO kDFHbg2Z9KqOMZzMo6GoJpZFYmFnFdWRhWuoIwVNC5xjGHXDPvEFvZycEAqJ4MQ9KgrI S0Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jA4iiVfkVcOmS+pCKVmT4iYfEjD2gJ9VLToSMN7vEIU=; b=wmfXkZeRF1LNA4S4UR0gGiLJ2UOzdzuin2XG8FDiti6YVo38RmZxdc4thYaPcgC/J7 v5lNGm34q1n4Ovf2huHjGolSVa9iLCDLUFTRIvo4zs+VQsBFnqC9DQMWUwTvDP++0yh4 vP84yvz4pIa/UZ1bFaylweLbQYPEGp5oLGv1RqplkrpD0y1K+dAqzWOrFvEkCBohR7KK nlgdGvHVhciDG05UpekPyoAYm3s30n/Ll/DiYaqWfFOQo8WLX5bStBbUIyv6/Jw48K5k ABhtTAanGAH7CcP2wPjL7nG7gw9RFydedJmQEX2oI5OjXuBehrBLWk9xPsNjQRTxrCqv bFvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=VInAcgOd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb17si2292163ejb.576.2020.08.12.19.14.34; Wed, 12 Aug 2020 19:15:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=VInAcgOd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726670AbgHMCNw (ORCPT + 99 others); Wed, 12 Aug 2020 22:13:52 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:45595 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726542AbgHMCNu (ORCPT ); Wed, 12 Aug 2020 22:13:50 -0400 X-UUID: 7c76ac8912184f7885d5e4e7355baed2-20200813 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=jA4iiVfkVcOmS+pCKVmT4iYfEjD2gJ9VLToSMN7vEIU=; b=VInAcgOdMhD13kgI3gk8WsVHX3GJYWmk9fooeB5+xpF1IbM70N5Oo4TpIaxQS5bj/2A32AwggZj8/Be2NRVa6WW675gcMMJXNltBQSVE2vPT0nP2rM4YuCLxJ7USAdMm9taPl+riye9K9WwEnJ4h/nQ3VNsdvAi+NJezlj53B3A=; X-UUID: 7c76ac8912184f7885d5e4e7355baed2-20200813 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1729284846; Thu, 13 Aug 2020 10:13:46 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 13 Aug 2020 10:13:45 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 13 Aug 2020 10:13:45 +0800 From: Chinwen Chang To: Matthias Brugger , Michel Lespinasse , Andrew Morton , Vlastimil Babka , Daniel Jordan , Davidlohr Bueso , Chinwen Chang , Alexey Dobriyan , "Matthew Wilcox (Oracle)" , Jason Gunthorpe , Steven Price , Song Liu , Jimmy Assarsson , Huang Ying CC: , , , , Subject: [PATCH v2 2/2] mm: proc: smaps_rollup: do not stall write attempts on mmap_lock Date: Thu, 13 Aug 2020 10:13:30 +0800 Message-ID: <1597284810-17454-3-git-send-email-chinwen.chang@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1597284810-17454-1-git-send-email-chinwen.chang@mediatek.com> References: <1597284810-17454-1-git-send-email-chinwen.chang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org c21hcHNfcm9sbHVwIHdpbGwgdHJ5IHRvIGdyYWIgbW1hcF9sb2NrIG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