From owner-svn-src-all@freebsd.org Wed May 20 18:30:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 58F8A2F1A8D; Wed, 20 May 2020 18:30:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49S1XX3Q9nz4Zhs; Wed, 20 May 2020 18:30:52 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qv1-xf2d.google.com with SMTP id dh1so1795698qvb.13; Wed, 20 May 2020 11:30:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=7B6GEx2BckVLGrGh8hSI9pgjmNHASJLkwvct6IsDkyc=; b=X2Nw6cufjztZMwFzUTMVIQyXJrCtG8erwJO7znNszbod7nGbMV7P2hn7WZ9hIdAkqH 7XF3VJHQP/BR2v6dCy2ioUara73JYCjeUTr+v53eeeF70kKqcrj0jZU+QsDUZCSmGrZ1 lgVXENqC6KyVU5lWxBc6TEEBNeheedF5DP6dw3nV8gm9NFioVcgErzazojYhjMo9unEE L6nHcT8ER0WGB232oFgdmBFZgeOBqIX8YbfwnvaYC11c45FP4yF/fZ7UR5eza4toVFw4 p3BVjJ5CZpiPdpRCsfiyCe71lWRdLQa/3tCClcn/J3wIzqW4qtBLGBlQxu/yy4eWecMK fI3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=7B6GEx2BckVLGrGh8hSI9pgjmNHASJLkwvct6IsDkyc=; b=UK1FatnDTWBedJIfiXujb3Sx0kTU2JrOxXLNUfnSqvgovAyI2xJne0HfKlZ3qi0hK2 /b5GvqY+E2VlC7x/0nExuZPgQ5VkA5B5dwzE1QwLOPhRL8vtkMWmdIya1soOpZPzRWpe W1p9Y2Hw2/SC4Tc6vJGgrzn6DOlBGwp3qNzNIRnU2VNzbbX9pvdVGo94D21Ccq6ly+i1 4xI0oFY/nk6uQPU15fB8t+BRVuErGh7Upcc1BoO570kc1vZ1VbQBZXRtkX/9M2n/Vs1i GiulycBP6yq6GHi9k3L+JEF5/gzoM9UOt5HX5S4SNRPGcvV1BKUrj0cU6AsIcTOKizYm EyQQ== X-Gm-Message-State: AOAM531fKkxiiEiK1r1uO1mhk97b1IR7V04Jgu6PfQrPFIvzR1UWwZPR cuCgxwRpGv/p1JYpmSLZa2TJchJF X-Google-Smtp-Source: ABdhPJxE8DmxGuF3jAGK35cHpN/GFy26Zc+3N/jM2BvmTIkvaUnVvePbO1FXW1mcaSmPh90BMJciTA== X-Received: by 2002:ad4:5692:: with SMTP id bc18mr6115035qvb.233.1589999451111; Wed, 20 May 2020 11:30:51 -0700 (PDT) Received: from raichu (toroon0560w-lp130-15-184-144-87-103.dsl.bell.ca. [184.144.87.103]) by smtp.gmail.com with ESMTPSA id s62sm2766873qke.36.2020.05.20.11.30.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 11:30:50 -0700 (PDT) Sender: Mark Johnston Date: Wed, 20 May 2020 14:30:48 -0400 From: Mark Johnston To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r361287 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys Message-ID: <20200520183048.GB59386@raichu> References: <202005201829.04KITNRs083936@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202005201829.04KITNRs083936@repo.freebsd.org> X-Rspamd-Queue-Id: 49S1XX3Q9nz4Zhs X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=X2Nw6cuf; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::f2d as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-1.23 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-0.90)[-0.904]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.31)[-0.310]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_NOT_FQDN(0.50)[]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-0.31)[-0.315]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2d:from]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[184.144.87.103:received]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2020 18:30:53 -0000 On Wed, May 20, 2020 at 06:29:23PM +0000, Mark Johnston wrote: > Author: markj > Date: Wed May 20 18:29:23 2020 > New Revision: 361287 > URL: https://svnweb.freebsd.org/changeset/base/361287 > > Log: > Don't block on the range lock in zfs_getpages(). > > After r358443 the vnode object lock no longer synchronizes concurrent > zfs_getpages() and zfs_write() (which must update vnode pages to > maintain coherence). This created a potential deadlock between ZFS > range locks and VM page busy locks: a fault on a mapped file will cause > the fault page to be busied, after which zfs_getpages() locks a range > around the file offset in order to map adjacent, resident pages; > zfs_write() locks the range first, and then must busy vnode pages when > synchronizing. > > Solve this by adding a non-blocking mode for ZFS range locks, and using > it in zfs_getpages(). If zfs_getpages() fails to acquire the range > lock, only the fault page will be populated. I will work on getting this submitted to OpenZFS.