Received: by 10.213.65.68 with SMTP id h4csp2847254imn; Mon, 9 Apr 2018 09:58:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx49JZVnk1QaGRkpw+9I89EeFVkKOb1cmrvRCnFEVBnwHCiY+tu4VJbO9N7vY1ijmz2spyugU X-Received: by 10.99.127.88 with SMTP id p24mr11249743pgn.226.1523293116949; Mon, 09 Apr 2018 09:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523293116; cv=none; d=google.com; s=arc-20160816; b=E1t3I2egCaf0upCs3ZdElF7XK+dg8/qQz5kWgaFB8lIZlFCX1/F/nj+n01C9qlHvwy l+UWLjKMM422lX3RPDxuL07HDOGAdAWzkMGM9xGgwaR8ntCXkixdUZvZ9WGjwJYIuO/3 3l5PbGYWYTau7bUgOuHEyUiIypuwozQ3gQhMLmeTRzZ6ze/kHnHsDjfhP+vrUf+tkR/y 4rwg4XMPcy7GiXJTRP5tuFuKbl4jVTkF8US7rqWi7TtmtiRpHZqvfZb1Jjgi7kUBpwuX uzD3YvGerq1Y2vGrDI/odUktfTNA4Wl+yCYFDssA/tAmVa9yUqzz3GxSzaenKydKD4ES Vr7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=B1NXHBlca7iFOt8XWspTjUFGvTctVxVLaeaXinRjRMQ=; b=ITtyNk9Un3aS/CY3Uacx4d6esj1vV6qXq/SNDWcgS/S2/kjofZv854vr2/tK4Y35gW YdQndiDIe3J9x689mhWpwFjtDQsCRfXFXInUGhT1OXWaRn9Y1u8ljOC1LRtKf+fEundP q3BATQZ5WhWurrZlovCB2kzZUcTHTkhBsTKABcqoEJ+YDxUtmzJc3JM6LQGwbbLZtN5r YEYZL4egI/mARkCBHYBKuJA+iDq+ROEymaCmSNlSvJ0dHFj26q38DFAQMPV6581zl1nn kbNjGzgGEhmxoEQZHX8NuuAXP4VoihaNeuX9fuNql8ZTx0bTZ5fJDE8sm/rbD8R5OiIn JAsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=HI32vJYc; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y70si530342pfg.121.2018.04.09.09.57.59; Mon, 09 Apr 2018 09:58:36 -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; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=HI32vJYc; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753679AbeDIQvh (ORCPT + 99 others); Mon, 9 Apr 2018 12:51:37 -0400 Received: from mail-oi0-f46.google.com ([209.85.218.46]:36598 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753391AbeDIQve (ORCPT ); Mon, 9 Apr 2018 12:51:34 -0400 Received: by mail-oi0-f46.google.com with SMTP id t16-v6so8289522oih.3 for ; Mon, 09 Apr 2018 09:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=B1NXHBlca7iFOt8XWspTjUFGvTctVxVLaeaXinRjRMQ=; b=HI32vJYcRD6SVQK1DruncBv3Vdjvg9F09xLiG9DsfNftVeDHH9GY0niFQN28PVXMfF Y4yHv8I5idNK/D533YTJnnSCovQPqNH1pE3iYrUjAuytKIjKHzJXChzHKPqRak17VQHV aH9zwpbUkXuuWJvtXenqhiO2gF5uO91qlcTM+s21YMRbVTgDbuLxMjVFREgWzVT5T9a3 0XZ8hhtB/L2RsSKQAOnGuaf8xNCeNa2MSGLL2F6d/tOXEDNEsRIk4L8LrQWz23aybXOy HBqhmV/48jRSLeLLABkqFJR9tw4fkX2qwA/uiMDwdIhEUAtMkkWngFlYPc23CuCiMG7N Rqog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=B1NXHBlca7iFOt8XWspTjUFGvTctVxVLaeaXinRjRMQ=; b=Z3TQtcxfw9qyNHdxBxsnrYUxVejF49zXESqcWHFFkWAKTsZfbtcs5Ytvie+6BEmmR9 6ExgsJyZTu9WsnXXSDE+16YxhT1MwJ57jdJzppaPq9anNMLLL5dTsv2ZDE5p/391DS+B YQ78P7tEFJiRVdHgPJObjKALChPheybSVxMxZk8YjDyc8cJowAT/njAGdiCpS4WvDD9s xgtZ1EN8AyEK50dgRQ8c6g9Vsj6MxPHzSN2xYZEZc7Im/u/j0EI9okntiaypsJtTZCvD nIlr5noGzH4AbLBDhn1HFdtbUVIpRnUoPLRIByjOxYNLhHBr1TpHjLdMriqexThPu9DU AY1g== X-Gm-Message-State: ALQs6tDPuE+N39yoVYsV8NnmlJ/y41B0W1neO696SHnQmEVLT2AaXOPZ SNT8hZJgJ5Cap8Kv1mjUVuPpVjvqsjkUPxSPkHYBcA== X-Received: by 2002:aca:6b45:: with SMTP id g66-v6mr21408425oic.118.1523292694141; Mon, 09 Apr 2018 09:51:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:2435:0:0:0:0:0 with HTTP; Mon, 9 Apr 2018 09:51:33 -0700 (PDT) In-Reply-To: <20180409164944.6u7i4wgbp6yihvin@quack2.suse.cz> References: <152246892890.36038.18436540150980653229.stgit@dwillia2-desk3.amr.corp.intel.com> <152246901060.36038.4487158506830998280.stgit@dwillia2-desk3.amr.corp.intel.com> <20180404094656.dssixqvvdcp5jff2@quack2.suse.cz> <20180409164944.6u7i4wgbp6yihvin@quack2.suse.cz> From: Dan Williams Date: Mon, 9 Apr 2018 09:51:33 -0700 Message-ID: Subject: Re: [PATCH v8 15/18] mm, fs, dax: handle layout changes to pinned dax mappings To: Jan Kara Cc: linux-nvdimm , Jeff Moyer , Dave Chinner , Matthew Wilcox , Alexander Viro , "Darrick J. Wong" , Ross Zwisler , Dave Hansen , Andrew Morton , Christoph Hellwig , linux-fsdevel , linux-xfs , Linux Kernel Mailing List , Mike Snitzer , Paul McKenney , Josh Triplett Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 9, 2018 at 9:49 AM, Jan Kara wrote: > On Sat 07-04-18 12:38:24, Dan Williams wrote: [..] >> I wonder if this can be trivially solved by using srcu. I.e. we don't >> need to wait for a global quiescent state, just a >> get_user_pages_fast() quiescent state. ...or is that an abuse of the >> srcu api? > > Well, I'd rather use the percpu rwsemaphore (linux/percpu-rwsem.h) than > SRCU. It is a more-or-less standard locking mechanism rather than relying > on implementation properties of SRCU which is a data structure protection > method. And the overhead of percpu rwsemaphore for your use case should be > about the same as that of SRCU. I was just about to ask that. Yes, it seems they would share similar properties and it would be better to use the explicit implementation rather than a side effect of srcu.