Received: by 2002:a17:90a:b81:0:0:0:0 with SMTP id 1csp1008824pjr; Fri, 30 Aug 2019 11:09:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyoD/aho6dOPaCacYeB2DjgLMJY7j7iXZDToNLSf06YTVaNqpkprKYCVxGEbugcq5nxDgv X-Received: by 2002:a62:2c94:: with SMTP id s142mr19541720pfs.45.1567188573369; Fri, 30 Aug 2019 11:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567188573; cv=none; d=google.com; s=arc-20160816; b=YMfHC5RfW9/W4ggsUTdCS/QByF1o2RJkRB8j1S7pwHjeKh+FO5dWwkxdD0BCnXfnw4 WWTltluPK9dGHLSTgua6e4pFMtjIGDHQGYiGFIB87WTHdMIJgHwGEzMUil9QlNXXiC/8 BtE/w+AQwGPsxnxlAKHaZNQ1Yb8QKPCNeGZiwdVyDExVLwywDf/JDh117Ks7otDGKvgs kGkR64BubeIhOGZ/8SwuagbkAol4bXawvt7ke2nyt8WZNvo7Vtazc18WHG3t6b6L9Roz UQmBorGLQfj23+h2yxe8KMveDA2xZSaHLLOPXi3peNvNOPifHmtIBgqxuIEp6gu2Sl5Q nOYQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=8WcqhFY+HXLsWaR9k6uq7mqcDR/FvX17iR08vwKJNkg=; b=xQLLBtd/fB+coYW97S6Qf/MnC8IjOz3YHG1nbVIhytyQSdDs0qZ+jf6BkxVKhNCqay 3c4w+btXL6dF7/Eej7s+EUSEdXHWDI+RDKNdFLnxULUbivj5knjfjkT+xg8RVIRqw/qf GDIwh4f/fuJvpWRijRJpEhu/FS1ksdfijdLCUBQwB1HhiqghI/cLp7n+sqYk3i4Erd26 Qk/+YbOXYqrD3yhdjfD7oyINjLNwvbmFXgvMhJaVmkweWAAwXtyADFudZigrsTJQ3Qk2 fvw0W/TqXweHSPYyRX2g9lJZcFVul7efeXj4916tEnlFM78hnj8mt5DJzADTv/w7Y57C GHmg== ARC-Authentication-Results: i=1; mx.google.com; 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 s4si5085852pgs.25.2019.08.30.11.09.18; Fri, 30 Aug 2019 11:09:33 -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; 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 S1727991AbfH3SIX (ORCPT + 99 others); Fri, 30 Aug 2019 14:08:23 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:37361 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727904AbfH3SIW (ORCPT ); Fri, 30 Aug 2019 14:08:22 -0400 Received: by mail-oi1-f194.google.com with SMTP id b25so6027241oib.4 for ; Fri, 30 Aug 2019 11:08:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8WcqhFY+HXLsWaR9k6uq7mqcDR/FvX17iR08vwKJNkg=; b=G5ymsekN8/igprKfwHjY4aMNtia01sF+JrCxeSnGqil0QqA1ecjfPPIKTnh4hr1SWS zI26CcfNny8bi1gPZwJs7fx2SHvBFh6l63tldKQeikJMmw2smN86bOZ1uPe5Rh/gT9bW UeqmZfeJSh0ITrgt79sY9Acp13oTlG+hmb+M0PPRIXxixtbBEW5UxOpjVqFfTOgzJcj6 YDcDAhDHltL9UDQTYwKjzaCJxYVUsI9qMeaXkVKMwxjxfP3ERxtpidCGKF5mIVuy1sve 0/On8CW6ksdMV/e/JZJ+qfDXT2d0yXLkr9Pcdf2ZeUFqmJ2xaB2XSP1FhBMAOpMrbxWm Q3Cw== X-Gm-Message-State: APjAAAVlNsUM69WwcfaGQj3RDCAQI1325hEwV2aoXyj6AoxOj/QxmDtM zCkM4BE53DnTXH2tHDvXApE= X-Received: by 2002:aca:75c2:: with SMTP id q185mr10615384oic.134.1567188501705; Fri, 30 Aug 2019 11:08:21 -0700 (PDT) Received: from ?IPv6:2600:1700:65a0:78e0:514:7862:1503:8e4d? ([2600:1700:65a0:78e0:514:7862:1503:8e4d]) by smtp.gmail.com with ESMTPSA id 59sm2340442otq.9.2019.08.30.11.08.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Aug 2019 11:08:20 -0700 (PDT) Subject: Re: [PATCH v2 3/3] nvme: fire discovery log page change events to userspace To: Christoph Hellwig Cc: Greg Kroah-Hartman , linux-nvme@lists.infradead.org, Keith Busch , James Smart , linux-kernel@vger.kernel.org, Hannes Reinecke References: <20190712180211.26333-1-sagi@grimberg.me> <20190712180211.26333-4-sagi@grimberg.me> <20190822002328.GP9511@lst.de> <205d06ab-fedc-739d-323f-b358aff2cbfe@grimberg.me> <20190826065639.GA11036@lst.de> <20190826075916.GA30396@kroah.com> <20190830055514.GC8492@lst.de> From: Sagi Grimberg Message-ID: <4555a281-3cbc-0890-ce85-385c06ca912b@grimberg.me> Date: Fri, 30 Aug 2019 11:08:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190830055514.GC8492@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> Yes we do, userspace should use it to order events. Does udev not >>> handle that properly today? >> >> The problem is not ordering of events, its really about the fact that >> the chardev can be removed and reallocated for a different controller >> (could be a completely different discovery controller) by the time >> that userspace handles the event. > > The same is generally true for lot of kernel devices. We could reduce > the chance by using the idr cyclic allocator. Well, it was raised by Hannes and James, so I'll ask them respond here because I don't mind having it this way. I personally think that this is a better approach than having a cyclic idr allocator. In general, I don't necessarily think that this is a good idea to have cyclic controller enumerations if we don't absolutely have to...