From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36AD3C433FE for ; Thu, 10 Dec 2020 17:35:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 082E923DC4 for ; Thu, 10 Dec 2020 17:35:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392787AbgLJRfU (ORCPT ); Thu, 10 Dec 2020 12:35:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391246AbgLJRfL (ORCPT ); Thu, 10 Dec 2020 12:35:11 -0500 Received: from mail-ua1-x944.google.com (mail-ua1-x944.google.com [IPv6:2607:f8b0:4864:20::944]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B5FAC06179C for ; Thu, 10 Dec 2020 09:34:31 -0800 (PST) Received: by mail-ua1-x944.google.com with SMTP id y26so1953591uan.5 for ; Thu, 10 Dec 2020 09:34:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UifUfr6kOgQo5Y5wCm4Em1W6gC2qoZMoZCVdpaPXzpE=; b=mgMRY1IWntzpjrscduH7rnK98ND3B3dTbU5uQrvKokxXRN/B6Bt5vGaqSZ1KWpImnq 5Wc6OL8aefytvU1FGnN6aUiSpRW+Jqhx3nbsEOsj3DYQ2IZu4c/xm/3Qlh6RuQv2CDso Qu6wy2L8Rgeaiq0G9AQzX2uEo1t8ojrWKWbY7X6lconxM7qy/tX3w4EjYI2cfZvO4PuS 95WdjpMmst+djcbUV4VQ/rNiPSD0vfkU1yI7Dz2veBowggDSpojMnSqpo1RpshMx6cOi 3MzTGuG8n2UvMVgmrUYqbdnEjehYXIkB1UCRiIknLX60cjORkzA3EQEYMz9XdzORfxQw WjVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UifUfr6kOgQo5Y5wCm4Em1W6gC2qoZMoZCVdpaPXzpE=; b=ZBDMffJu4e7NxwaKR4pl7W7V3YwJtTKoUfR0OjdcrhJ2Mv0t7Rh0ysv5Kr4cqZe70a DGYhKP8UirU6Q3lpSC2/krfPkjavjSxHw/slhs1EAeQdbXjsCelh3Ma0172RmjOvyvpF HZ8GIid128q1BGK+MKAJ9knWx177YdAkQEhRUx5vduYEEKtrwaG5JC2fVo6vJiwsX/49 8IibzpEqpuSN39SMFJukME414f06UIc1GO8u0VLE127z6F+69nVEwD12GR4IujrUKnuT xVoNEyJ7X3WU1yFawRgoKrefZmvEJntMEg2DZP7l99r7vEQNcIq4cS1JQdWra0ntY4k/ sx5g== X-Gm-Message-State: AOAM5325HzB2SXECukiVW1RmnbgRFzXXq9R+8F5VJqykLYtdEfIgw/y8 gf1rVMoQRW2IGg2wHrjoUsw2TbyKZX3YcQ== X-Google-Smtp-Source: ABdhPJxa9h3OLKrZtY3Ub5eXPJo2Poru89enrFvXOzIgI8KnweYdk6jBzAdzOccUZkg5CZjboLXJGQ== X-Received: by 2002:ab0:3b0d:: with SMTP id n13mr9280847uaw.85.1607621669807; Thu, 10 Dec 2020 09:34:29 -0800 (PST) Received: from mail-ua1-f54.google.com (mail-ua1-f54.google.com. [209.85.222.54]) by smtp.gmail.com with ESMTPSA id 131sm597857vks.42.2020.12.10.09.34.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Dec 2020 09:34:28 -0800 (PST) Received: by mail-ua1-f54.google.com with SMTP id g3so1947058uae.7 for ; Thu, 10 Dec 2020 09:34:27 -0800 (PST) X-Received: by 2002:ab0:5e98:: with SMTP id y24mr9282081uag.108.1607621666644; Thu, 10 Dec 2020 09:34:26 -0800 (PST) MIME-Version: 1.0 References: <20201118144617.986860-1-willemdebruijn.kernel@gmail.com> <20201118144617.986860-2-willemdebruijn.kernel@gmail.com> <20201118150041.GF29991@casper.infradead.org> <893e8ed21e544d048bff7933013332a0@AcuMS.aculab.com> <20201119143131.GG29991@casper.infradead.org> In-Reply-To: From: Willem de Bruijn Date: Thu, 10 Dec 2020 12:33:51 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 1/2] epoll: add nsec timeout support with epoll_pwait2 To: Arnd Bergmann Cc: Willem de Bruijn , Matthew Wilcox , David Laight , Linux FS-devel Mailing List , linux-kernel , Al Viro , Andrew Morton , Soheil Hassas Yeganeh , Arnd Bergmann , Shuo Chen , linux-man Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 21, 2020 at 4:27 AM Arnd Bergmann wrote: > > On Fri, Nov 20, 2020 at 11:28 PM Willem de Bruijn > wrote: > > On Fri, Nov 20, 2020 at 2:23 PM Arnd Bergmann wrote: > > > On Fri, Nov 20, 2020 at 5:01 PM Willem de Bruijn wrote: > > > > I think it'll be better to split the patchsets: > > > > epoll: convert internal api to timespec64 > > epoll: add syscall epoll_pwait2 > > epoll: wire up syscall epoll_pwait2 > > selftests/filesystems: expand epoll with epoll_pwait2 > > > > and > > > > select: compute slack based on relative time > > epoll: compute slack based on relative time > > > > and judge the slack conversion on its own merit. > > Yes, makes sense. > > > I also would rather not tie this up with the compat deduplication. > > Happy to take a stab at that though. On that note, when combining > > functions like > > > > int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp, > > fd_set __user *exp, struct timespec64 *end_time, > > u64 slack) > > > > and > > > > static int compat_core_sys_select(int n, compat_ulong_t __user *inp, > > compat_ulong_t __user *outp, compat_ulong_t __user *exp, > > struct timespec64 *end_time, u64 slack) > > > > by branching on in_compat_syscall() inside get_fd_set/set_fd_set and > > deprecating their compat_.. counterparts, what would the argument > > pointers look like? Or is that not the approach you have in mind? > > In this case, the top-level entry points becomes unified, and you get > the prototype from core_sys_select() with the native arguments. > > I would imagine this can be done like the way I proposed > for get_bitmap() in sys_migrate_pages: > > https://lore.kernel.org/lkml/20201102123151.2860165-4-arnd@kernel.org/ Coming back to this. Current patchset includes new select and poll selftests to verify the changes. I need to send a small kselftest patch for that first. Assuming there's no time pressure, I will finish up and send the main changes after the merge window, for the next release then. Current state against linux-next at https://github.com/wdebruij/linux-next-mirror/tree/select-compat-1