Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp146460pxj; Wed, 9 Jun 2021 19:18:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyWXQ5xUJsHjemJTBIUkA/aQcsxsdMlFss6/A/r+o/8MhsE6+uuoFJFOGtZf8N/3wBra0i X-Received: by 2002:a17:906:f111:: with SMTP id gv17mr2344484ejb.435.1623291535406; Wed, 09 Jun 2021 19:18:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623291535; cv=none; d=google.com; s=arc-20160816; b=kCldB7jDoqd9uT1fd/ABduuRQfT7bVDW4f9DPYc15s10DpR/PBRj68DghFdX1b6suO nzhKryc5ekJLpRnGyE/VSywKPsBoZ4Td+Bgc0grRX8dzfYgi7QHqrLn2POPbfhqnqY4e OUoOBUOCVBS4YGyPds2xAC4t03zdDE/IuLbO/TTEUOy2VZ93lVw01tpa5QMxyp7xH5wM xlN+gtxFICYzBqOwmhVUU5TvErQCzpm2Mad+ukEzYALgS8Woxtv3lg5as7hYpn6fxED5 zNE1m2K5Bt7FnuFviI5FUluAqs7EeN/nrpZhIqsl8vLi4whWTF8X/AP9UV0UYIlVJ3iw K74Q== 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=NnaUokRoNM6Q2FbT2TvIPzJXqmr5yWwj9gPCdPyZQmw=; b=zRDgCBimu45or+cdL1Kf+kixhBQIhYcm35lokJyx0dwnEk71Ay7j91naPgqFyO9jJ+ mPydUQMsleynowV7LX1hGjO/jB7kW0nUxRh3F1BkEsz7x/5jHcbfcrN4UMGh1qjcVRGt t2WcBAarCEK6Fr33zqWRl9Y1EdIHttQ+Z1PP6ZtNbb37UHD9peNzt9+X0xsejqRNgq8n RWGWB9iObBE7iMQXAuoLZMY0aaAXmVIh4sHFKZjv2vKgVbBinTUzh1LVyiT3SSpGrOLj QUZEqo7tnapy5+1WcvlKADmxtp8+X9SaHEFwpMQkQUEH7EPPNEKfzurq0LAyPE96caIC YUow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=acHl2Irk; 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 7si1113236ejg.355.2021.06.09.19.18.31; Wed, 09 Jun 2021 19:18:55 -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=acHl2Irk; 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 S229659AbhFJCS2 (ORCPT + 99 others); Wed, 9 Jun 2021 22:18:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38781 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbhFJCS1 (ORCPT ); Wed, 9 Jun 2021 22:18:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623291391; 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=NnaUokRoNM6Q2FbT2TvIPzJXqmr5yWwj9gPCdPyZQmw=; b=acHl2IrkP8FXvHOBYUSrLuFY4278K3gD+L939k2a2VK8+9TzC6WP/9KgOulVW0TtqDY/mh 8qtuGU/kJ2uCLj6xSbVS3854lk0yWJns5tqYnQGi9jNdKE92/Fnkls1OlVVNWt1NmuHQlL DFkZCo/lLLZ3zxyCc7KvcZs8jruxzm0= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-453-VaDRKLUUOfK2kPQk-YyJSA-1; Wed, 09 Jun 2021 22:16:30 -0400 X-MC-Unique: VaDRKLUUOfK2kPQk-YyJSA-1 Received: by mail-pj1-f69.google.com with SMTP id e12-20020a17090a630cb029016de1736f41so2859202pjj.3 for ; Wed, 09 Jun 2021 19:16:30 -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=NnaUokRoNM6Q2FbT2TvIPzJXqmr5yWwj9gPCdPyZQmw=; b=YgQv3cK2N17KiivoTtPPlE7owI2ssHRHJlNxVQUGtdK/tQxO0w5lExF5FBU/a0MoXB 4fUQQdXTtI+x2mIS4QGB3pKSYYWDkxjwTOysJ8NVE1SigkBdEOnsTn4uEUOZXIOrMt9w rCJE+F2tI22CkK6JjuCeuJOKPFO0nwak9pVUGEW5DWTwlvlUItXDqEEOw3M8d3VxkcmK QvV2wkjRcR75U3MyP/sLAT+7+k+npyjFMHG+Wta/1sxTAGsnt/jIGaSeMngdBz1fIFF0 DjvXeRZPENCdXyZfdxeTmUHoGssCM2xM6plfGByG2UvA0aK8pGWvZSPh88Kaz1PweJmL BAkA== X-Gm-Message-State: AOAM5317BDalud8Bc0Zj8fO+u8sDotYLQqFEIzs5YCiWa7IyfxpI1yJn pcu+zaR99UOkHEKZqBEExE2eJdteApitPcNPKAvmB0F8JySO6F6/jO4DKwccqgWSe1DQJiXAyg8 xxS+NoBtuGCz1bfZvgub9VZB2 X-Received: by 2002:a63:4814:: with SMTP id v20mr2691507pga.8.1623291389544; Wed, 09 Jun 2021 19:16:29 -0700 (PDT) X-Received: by 2002:a63:4814:: with SMTP id v20mr2691486pga.8.1623291389293; Wed, 09 Jun 2021 19:16:29 -0700 (PDT) Received: from wangxiaodeMacBook-Air.local ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id b14sm889674pgl.52.2021.06.09.19.16.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 19:16:28 -0700 (PDT) Subject: Re: [RFC] /dev/ioasid uAPI proposal To: "Enrico Weigelt, metux IT consult" , 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: <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> <20210602172154.GC1002214@nvidia.com> <51e060a3-fc59-0a13-5955-71692b14eed8@metux.net> <20210607180144.GL1002214@nvidia.com> <633b00c1-b388-856a-db71-8d74e52c2702@metux.net> From: Jason Wang Message-ID: <0f9224eb-2158-4769-f709-6e8f56c24bd3@redhat.com> Date: Thu, 10 Jun 2021 10:16:17 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <633b00c1-b388-856a-db71-8d74e52c2702@metux.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2021/6/8 下午6:45, Enrico Weigelt, metux IT consult 写道: > On 07.06.21 20:01, Jason Gunthorpe wrote: >> it is what it is, select has a fixed size bitmap of FD #s and >> a hard upper bound on that size as part of the glibc ABI - can't be >> fixed. > > in glibc ABI ? Uuuuh! > Note that dealing with select() or try to overcome the limitation via epoll() directly via the application is not a good practice (or it's not portable). It's suggested to use building blocks provided by glib, e.g the main event loop[1]. That is how Qemu solve the issues of dealing with a lot of file descriptors. Thanks [1] https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html > > --mtx >