Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp432677pxj; Wed, 2 Jun 2021 02:51:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCEuTPnFZBqWWN5yNTGv0niOFlrkzJtAYGffxvI8g5NN0AsMK44pYDmJ5pJnZ3yQAsHjR3 X-Received: by 2002:a17:906:6c8a:: with SMTP id s10mr33153056ejr.276.1622627491221; Wed, 02 Jun 2021 02:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622627491; cv=none; d=google.com; s=arc-20160816; b=odEGYlQZMyAzNNCrIGiapnkotxls1gPBFXALa77/7kpgpcO2wZSm3pB3bq9EQo4jRf gyoAXcWtdMrCbwASCjDA+xSdv+cbo/FYVW6eET34NtOiQ9IdsL+YMg/0J7wv4KiYNCx+ WU4GIVEl0swzKB1+MWTe33zE6oDpVK8bW0eqLIXIKsSdumDGRRtZk1V6ciJyaYl7Yll/ yoE31yKsxyoSz1+Ufpch+ENE/uxq5SE63mD9SI+cVZl8aLgtPsLYcf9fCWfBpSEX9tgC vwAgwLdUgpmEU0HDBmQzpvSre6V7YRL6QAOlLlkHeKz08ZUNYkk7ydPoY4G9GDa11TIP tF4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=TOI6E9j/kLUqqLzfWVG9w8giJlysUj5C+KWef8bCQ8I=; b=mBk+rYlODgJkLZqXSYQxYqzR6LOKwbeTOQ7WcgopDRBRGbE9hNNZERe/3VMonMltno OsgCf28ik0Mrc+zY8+C233svtauk0Adweti46Z8yoBL20y4EuahZL4d7x75G+IIxEr3w XOmOYlClK6PxEc6nUHo/VDudUkaYnB/tisEWBOTrYFYdB4xMvpoGFnmbLpXstAmusFZ0 ZlUZI2fYfKoUHUVXEtwiM2in7k26gK8htZImZ+jDAP+Ruhj4hKD2wWtMV2VuoXxscWa7 4yVEbMFoeTXIsLA9q+LTVe0Ve5+qcTFaXyvEHLPPMMOAIhDaN44oHdgeL1qtcRvpacL/ jXJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iey3U79H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e20si6461769ejd.727.2021.06.02.02.51.08; Wed, 02 Jun 2021 02:51:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iey3U79H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232919AbhFBI4W (ORCPT + 99 others); Wed, 2 Jun 2021 04:56:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:29242 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232907AbhFBI4R (ORCPT ); Wed, 2 Jun 2021 04:56:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622624074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TOI6E9j/kLUqqLzfWVG9w8giJlysUj5C+KWef8bCQ8I=; b=iey3U79HA+VvTZDpvn1WzZuVy5l3v5TtkaaFIzHe2il5HHOOGPHzbDXGtiQDNBsOFN19sO mNTCWKrpE+y6XmGPFu41oA/AWk/aqGo8VO6vkp0q+3NJdCwM6Iezl+7WPJ+YfRIsxQXClb E0mOrFzHtGAgKY6sPrOW8RlG6yeWu6k= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-591-v7X_3FsnNJa7bcVV6WOzfA-1; Wed, 02 Jun 2021 04:54:33 -0400 X-MC-Unique: v7X_3FsnNJa7bcVV6WOzfA-1 Received: by mail-pl1-f197.google.com with SMTP id o9-20020a1709026b09b0290102b8314d05so754469plk.8 for ; Wed, 02 Jun 2021 01:54:32 -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-transfer-encoding :content-language; bh=TOI6E9j/kLUqqLzfWVG9w8giJlysUj5C+KWef8bCQ8I=; b=U0LjsEu08TbhsYK9Fq3FyOEIasnlJFm1ssRmwTnOwfHiBGPsd3iHa4b6ugNDo4F1Zo /ARKLVnikNtR4ih6uqpd5/WLcK6qH9T0vxkDyN9LzVZase41hzS3TUY8cupFDClel3DI wzGfL6YlZms50Zve5Qoc+5Y5TUXA0B24VGb8tM5SEdSiipe75pkcP19pFnKX+SAM/ry6 zTgvPkIrPJ8AbU5pibDBGlYxUH6XpvXpCFeHqIXx862QjEb2z/pXHyUNYcvSg1pBMgh/ bPOyABGkR6jQ87puxco+pYQC/l0wVR/tSR0by7OaivxAp3aEPXxEk0f3sSDddH/+1feE Mmvw== X-Gm-Message-State: AOAM530VNoP8GoJSDEysgqe94H9MxbH600XKAbJs3zvyyjYqkFd4GIbd ZVY3Vhp1G+Vsa6RT3Fjf/fWqXxG3S8Ja/mgJV76ucFqhzB+yEzDSF0vN1wEjGa0Qp6cRXnvMNby ftguve8gTk+rr3gpk1OlEriZz X-Received: by 2002:a17:90a:7306:: with SMTP id m6mr4486579pjk.217.1622624072029; Wed, 02 Jun 2021 01:54:32 -0700 (PDT) X-Received: by 2002:a17:90a:7306:: with SMTP id m6mr4486565pjk.217.1622624071836; Wed, 02 Jun 2021 01:54:31 -0700 (PDT) Received: from wangxiaodeMacBook-Air.local ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id w2sm4060045pfc.126.2021.06.02.01.54.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Jun 2021 01:54:31 -0700 (PDT) Subject: Re: [RFC] /dev/ioasid uAPI proposal To: Jason Gunthorpe Cc: "Tian, Kevin" , Lu Baolu , Liu Yi L , "kvm@vger.kernel.org" , Jonathan Corbet , "iommu@lists.linux-foundation.org" , LKML , "Alex Williamson (alex.williamson@redhat.com)\"\"" , David Woodhouse References: <20210531164118.265789ee@yiliu-dev> <78ee2638-1a03-fcc8-50a5-81040f677e69@redhat.com> <20210601113152.6d09e47b@yiliu-dev> <164ee532-17b0-e180-81d3-12d49b82ac9f@redhat.com> <64898584-a482-e6ac-fd71-23549368c508@linux.intel.com> <429d9c2f-3597-eb29-7764-fad3ec9a934f@redhat.com> <05d7f790-870d-5551-1ced-86926a0aa1a6@redhat.com> <42a71462-1abc-0404-156c-60a7ee1ad333@redhat.com> <20210601173138.GM1002214@nvidia.com> From: Jason Wang Message-ID: Date: Wed, 2 Jun 2021 16:54:26 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210601173138.GM1002214@nvidia.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2021/6/2 ????1:31, Jason Gunthorpe ะด??: > On Tue, Jun 01, 2021 at 04:47:15PM +0800, Jason Wang wrote: > >> We can open up to ~0U file descriptors, I don't see why we need to restrict >> it in uAPI. > There are significant problems with such large file descriptor > tables. High FD numbers man things like select don't work at all > anymore and IIRC there are more complications. I don't see how much difference for IOASID and other type of fds. People can choose to use poll or epoll. And with the current proposal, (assuming there's a N:1 ioasid to ioasid). I wonder how select can work for the specific ioasid. Thanks > > A huge number of FDs for typical usages should be avoided. > > Jason >