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=-7.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham 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 C16F5C32771 for ; Mon, 6 Jan 2020 09:01:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8B1A320848 for ; Mon, 6 Jan 2020 09:01:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B1A320848 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 239E08E0005; Mon, 6 Jan 2020 04:01:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1EA138E0003; Mon, 6 Jan 2020 04:01:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1002F8E0005; Mon, 6 Jan 2020 04:01:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id EFB668E0003 for ; Mon, 6 Jan 2020 04:01:58 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id ADDCA8249980 for ; Mon, 6 Jan 2020 09:01:58 +0000 (UTC) X-FDA: 76346617116.21.bite57_2e487e45d760c X-HE-Tag: bite57_2e487e45d760c X-Filterd-Recvd-Size: 5085 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Mon, 6 Jan 2020 09:01:57 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B2328B027; Mon, 6 Jan 2020 09:01:55 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 821931E0B47; Mon, 6 Jan 2020 10:01:47 +0100 (CET) Date: Mon, 6 Jan 2020 10:01:47 +0100 From: Jan Kara To: John Hubbard Cc: Leon Romanovsky , Jason Gunthorpe , Andrew Morton , Al Viro , Alex Williamson , Benjamin Herrenschmidt , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Christoph Hellwig , Dan Williams , Daniel Vetter , Dave Chinner , David Airlie , "David S . Miller" , Ira Weiny , Jan Kara , Jens Axboe , Jonathan Corbet , =?iso-8859-1?B?Suly9G1l?= Glisse , Magnus Karlsson , Mauro Carvalho Chehab , Michael Ellerman , Michal Hocko , Mike Kravetz , Paul Mackerras , Shuah Khan , Vlastimil Babka , bpf@vger.kernel.org, dri-devel@lists.freedesktop.org, kvm@vger.kernel.org, linux-block@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, linux-rdma@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org, linux-mm@kvack.org, LKML , Maor Gottlieb , Ran Rozenstein Subject: Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN Message-ID: <20200106090147.GA9176@quack2.suse.cz> References: <20191219132607.GA410823@unreal> <20191219210743.GN17227@ziepe.ca> <20191220182939.GA10944@unreal> <1001a5fc-a71d-9c0f-1090-546c4913d8a2@nvidia.com> <20191222132357.GF13335@unreal> <49d57efe-85e1-6910-baf5-c18df1382206@nvidia.com> <20191225052612.GA212002@unreal> <612aa292-ec45-295c-b56c-c622876620fa@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <612aa292-ec45-295c-b56c-c622876620fa@nvidia.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Transfer-Encoding: quoted-printable 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 Sat 28-12-19 20:33:32, John Hubbard wrote: > On 12/27/19 1:56 PM, John Hubbard wrote: > ... > >> It is ancient verification test (~10y) which is not an easy task to > >> make it understandable and standalone :). > >> > >=20 > > Is this the only test that fails, btw? No other test failures or hint= s of > > problems? > >=20 > > (Also, maybe hopeless, but can *anyone* on the RDMA list provide some > > characterization of the test, such as how many pins per page, what pa= ge > > sizes are used? I'm still hoping to write a test to trigger something > > close to this...) > >=20 > > I do have a couple more ideas for test runs: > >=20 > > 1. Reduce GUP_PIN_COUNTING_BIAS to 1. That would turn the whole overr= ide of > > page->_refcount into a no-op, and so if all is well (it may not be!) = with the > > rest of the patch, then we'd expect this problem to not reappear. > >=20 > > 2. Active /proc/vmstat *foll_pin* statistics unconditionally (just fo= r these > > tests, of course), so we can see if there is a get/put mismatch. Howe= ver, that > > will change the timing, and so it must be attempted independently of = (1), in > > order to see if it ends up hiding the repro. > >=20 > > I've updated this branch to implement (1), but not (2), hoping you ca= n give > > this one a spin? > >=20 > > =A0=A0=A0 git@github.com:johnhubbard/linux.git=A0 pin_user_pages_trac= king_v11_with_diags > >=20 > >=20 >=20 > Also, looking ahead: >=20 > a) if the problem disappears with the latest above test, then we likely= have > a huge page refcount overflow, and there are a couple of different w= ays to > fix it.=20 >=20 > b) if it still reproduces with the above, then it's some other random m= istake, > and in that case I'd be inclined to do a sort of guided (or classic,= unguided) > git bisect of the series. Because it could be any of several patches= . >=20 > If that's too much trouble, then I'd have to fall back to submitting= a few > patches at a time and working my way up to the tracking patch... It could also be that an ordinary page reference is dropped with 'unpin' thus underflowing the page refcount... Honza --=20 Jan Kara SUSE Labs, CR