Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp285943rwb; Wed, 9 Nov 2022 02:25:34 -0800 (PST) X-Google-Smtp-Source: AMsMyM6nofZtUvjyEnev/xAqIt04glD7hdteEh+H7sOiLxecRbulQdN3EiG7G0m7TnAJztwnoRBM X-Received: by 2002:aa7:ce8d:0:b0:461:50fd:e358 with SMTP id y13-20020aa7ce8d000000b0046150fde358mr58891942edv.194.1667989534117; Wed, 09 Nov 2022 02:25:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667989534; cv=none; d=google.com; s=arc-20160816; b=SXhyJHislFp+hRiyd9xUpjpSm3XH9u5TLPs7At3JgfGBMHXR+vKyWKZGNeizHVqKZ0 ifL1/jxpq/Obj4xwCtdi3UiBVhmDAHYQfxXUq5aGhtqVA3zE4tjn7U/eu0NNSdWomev/ rjU5t9eXXyjBYN4AQim93U9hdC9m8xdBwWRva7IXYRzu7xHhrk95lcmE8VzFaLuvSr8w BFepgqW2Hl0yPAfjes8PdyHuNQfxmjjN4kjZ7r0fS3A3UCO3tDrAwOzj06usH6gyZt+h VZjwwwihcKtS5tN8TDVZWZz95YRRwLxgf1fq+0Oo1/qfiKEkXxEvy6ebuL1nLCL2Qc+9 bmgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=nHeTe1d6IpwrueV7lbECGzpvZoTdkLWZegKtPHuXLH8=; b=LCgcE5MP9JEtQoXnbdxfNLcjhviCv6eObozXEX0nR1GVVxXgbVG/eWs8mVuNlGi+QX ngo6LIDqZyR2A5fLFiwivcKM4z6fuy4CueSIX17MzMzR3z7Kn0EPZrBAT6jPk19SBi5f v/iEy0kqofHbq5OuHoQD25sRT97gRn1d1uK9UjPkJ+DFI5QMxMyFKDISB+Y9FuTl9ATe oyKdtnROxgh3rahnDohf6Mb02cK33PaSF521w3HJctrtmIv5RW3Ga8j5vmvJ2stFqrPC gbQYQTMDQ+PX/vQS7iWp8rlbNKaDVKw9WruAGSZ7xpiuSmtIBldZcztIN6wvOU828olC S5wQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hz4-20020a1709072ce400b007811e006b46si16549515ejc.470.2022.11.09.02.25.11; Wed, 09 Nov 2022 02:25:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229526AbiKIKJn convert rfc822-to-8bit (ORCPT + 93 others); Wed, 9 Nov 2022 05:09:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230074AbiKIKJl (ORCPT ); Wed, 9 Nov 2022 05:09:41 -0500 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8307FD04 for ; Wed, 9 Nov 2022 02:09:39 -0800 (PST) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-81-ABe0gktTOTGcVfsSB0umYg-1; Wed, 09 Nov 2022 10:09:36 +0000 X-MC-Unique: ABe0gktTOTGcVfsSB0umYg-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 9 Nov 2022 10:09:33 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.042; Wed, 9 Nov 2022 10:09:33 +0000 From: David Laight To: 'Stefan Hajnoczi' , Jens Axboe CC: "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Subject: RE: [PATCHSET v3 0/5] Add support for epoll min_wait Thread-Topic: [PATCHSET v3 0/5] Add support for epoll min_wait Thread-Index: AQHY85bpT+hcAn2hREu69xxFvk5GCa42XVDw Date: Wed, 9 Nov 2022 10:09:33 +0000 Message-ID: References: <4281b354-d67d-2883-d966-a7816ed4f811@kernel.dk> <93fa2da5-c81a-d7f8-115c-511ed14dcdbb@kernel.dk> <75c8f5fe-6d5f-32a9-1417-818246126789@kernel.dk> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Hajnoczi > Sent: 08 November 2022 17:24 ... > The way the current patches add min_wait into epoll_ctl() seems hacky to > me. struct epoll_event was meant for file descriptor event entries. It > won't necessarily be large enough for future extensions (luckily > min_wait only needs a uint64_t value). It's turning epoll_ctl() into an > ioctl()/setsockopt()-style interface, which is bad for anything that > needs to understand syscalls, like seccomp. A properly typed > epoll_wait3() seems cleaner to me. Is there any reason you can't use an ioctl() on an epoll fd? That would be cleaner that hacking at epoll_ctl(). It would also be easier to modify to allow (strange) things like: - return if no events for 10ms. - return 200us after the first event. - return after 10 events. - return at most 100 events. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)