Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1040683imu; Tue, 11 Dec 2018 11:40:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/XM8AFQbKMfsXfeX5R/HuE2o/597va3tGvVvTI9P7esaU6qb2RYXSs6tZxvLBzZ+iYhucdz X-Received: by 2002:a17:902:8c98:: with SMTP id t24mr17174686plo.130.1544557206472; Tue, 11 Dec 2018 11:40:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544557206; cv=none; d=google.com; s=arc-20160816; b=T4PPyQ5lcaFCoF4DECnSs/kRoL5krjqPoPHAJ36U7RyH+f2BU02ohk2RnTv8RHlbyc UaG7+0TeBIo6Mc8MbRGyAE3+ObVybas5B8Mu9B9nxfU804+odKWWbuUfyyx0oMglUnvq T2io3/bftCkrmseRy36GWjUz4mFpxrNC+obZFfWjw+Fl+EgdDwEr4SK3eis1ld0U65nq +OAtKQuN71sZl3tz0kn9WItJaP2rOOUyNjgEpyEEZNp6D3m4tLgby7OpwtFFYzrkFW2C xwjgpGvrvOq+BycEknUU5oPbs9V71AM0SzmtLbYc1pbDrEN55+wI5LIqjSoVnaDfGHeo 9CzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nw6gn98kOeoOvbqz55rm/FYxZbQcsNmtwlPp0QYTMl8=; b=Wj8pP4WKyjsFrDsVLX/EiXOzza5Igbbgkudw9HQleYNhh5Fcn0sNx+LlBubrXU3wHc mCgaB+HT++iZhCFRmANlCibPN1nICWqdJqxegtQ2uvZi0ehQLbkf/2vnFEMGgIl0OCrb SE/gN7L0lUZFFyF5ruJPmIwlCKxrgYyQnOlbPexFiyZwD/75GCLWl2l6gSs9pawu5JDv LZO0H5ntU75zfEXPj8bUBgedhMY2wzpYCX4nP3mgZMwULg3TwRgipne7J4W+nnaulzAn VbCnZBhJE7j4k6QjZ6ME6eio9YM+BXxSv/Xbj5KyVDb52eLJ4nBig+i2f33bKTlFjLN7 miCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Bt1Ufs1r; 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 e189si13285548pfc.202.2018.12.11.11.39.51; Tue, 11 Dec 2018 11:40:06 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Bt1Ufs1r; 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 S1726840AbeLKSxO (ORCPT + 99 others); Tue, 11 Dec 2018 13:53:14 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:38588 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726313AbeLKSxN (ORCPT ); Tue, 11 Dec 2018 13:53:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=nw6gn98kOeoOvbqz55rm/FYxZbQcsNmtwlPp0QYTMl8=; b=Bt1Ufs1rGUuKuPX9FPPhRGAjk ATyCVLwMga5rmHuaH3ToIWqHw2EpfccHAi6YE1i6GKsGHi67nP1i7Z6xc5C7Jrow1gJc6lJz7AmnG +b3OFSsw6pqOGo80O+pa0NAlfn60UDsLHzkUatuNRh/Aggv7S5uSTzQUEk+Ya5ia2B/I1H0iH6C2Y LaQWwDgUdK1ToURhs21I8ahduzDwZlirQzJ69JCkrfeuJrtrfNhPgZtTjzENsDMiTU6a4YREvijcl gygc4YnAN6s1/BfdP2KcED2q2EeLelAoxqzdYvQg5gcx5mwnHZtkMg7Zp7hx2oyT/x58NU2u3Lw/t NjNJOUZhg==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWn9b-0000ti-MW; Tue, 11 Dec 2018 18:53:11 +0000 Date: Tue, 11 Dec 2018 10:53:11 -0800 From: Matthew Wilcox To: Jens Axboe Cc: Al Viro , Benjamin LaHaise , Andrew Morton , Kees Cook , fsdevel , linux-aio@kvack.org, linux-mm , linux-kernel , Dan Carpenter Subject: Re: [PATCH] aio: Convert ioctx_table to XArray Message-ID: <20181211185311.GJ6830@bombadil.infradead.org> References: <20181128183531.5139-1-willy@infradead.org> <09e3d156-66fc-ca17-efac-63f080a27a1d@kernel.dk> <20181211184553.GH6830@bombadil.infradead.org> <75267003-9407-101f-33ee-685e345a2c8a@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <75267003-9407-101f-33ee-685e345a2c8a@kernel.dk> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 11, 2018 at 11:46:53AM -0700, Jens Axboe wrote: > On 12/11/18 11:45 AM, Matthew Wilcox wrote: > > I think we need the rcu read lock here to prevent ctx from being freed > > under us by free_ioctx(). > > Then that begs the question, how about __xa_load() that is already called > under RCU read lock? I've been considering adding it to the API, yes. I was under the impression that nested rcu_read_lock() calls were not expensive, even with CONFIG_PREEMPT.