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 26681C1B0E3 for ; Thu, 10 Dec 2020 17:35:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1C2723DC4 for ; Thu, 10 Dec 2020 17:35:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392784AbgLJRfT (ORCPT ); Thu, 10 Dec 2020 12:35:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391059AbgLJRfL (ORCPT ); Thu, 10 Dec 2020 12:35:11 -0500 Received: from mail-vs1-xe43.google.com (mail-vs1-xe43.google.com [IPv6:2607:f8b0:4864:20::e43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59184C061794 for ; Thu, 10 Dec 2020 09:34:31 -0800 (PST) Received: by mail-vs1-xe43.google.com with SMTP id v8so3291334vso.2 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=qUxtJV8o8+oiNNv6VKj6Sp0JdpHGvL8mH6jFQ0ZYMJsEM+sjQG2+fB5YtmjDa8kaal T89JZ6NZ28dbtuxfu2uHWBGy2zkXx3bs8aXfRaCF0k7lIeVZUiBPscE2UYE5cOPh5p7o OrD24EPrpuw/9ttpYMll97Vd933y2tXbCiHuaMPBRMpk1Jw2PbSr+nY5/kQebNA/WKZE egkIXalH/D+Nf96bpj7gCS+V2iztW2fPFvPZxxJPgEug/ejBgRIKsagom6jQZqvgxjEA YvuEEUEygLL+VQHZTxkdZphYocgpHivZmx8E1eBOBXnH/pGjLM1wE9EEr1XfEfjxd00n MVbQ== X-Gm-Message-State: AOAM53263D3zE7gOZ2vA8g+E76Xy0oEUxQWw5iRoxZPm2WfnOebhU/go GmGPw1rCGqY0CxslJQAR9ygM49rP5skj4g== X-Google-Smtp-Source: ABdhPJxYiaEIhrkTeEuc4pa3Kgcc7vX3oJiRkGy3xi7CBwds8HS7BSyj+VOLAeXw7hINNX6VEh4ThA== X-Received: by 2002:a67:8949:: with SMTP id l70mr9990990vsd.21.1607621670120; Thu, 10 Dec 2020 09:34:30 -0800 (PST) Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com. [209.85.222.50]) by smtp.gmail.com with ESMTPSA id x18sm580504uan.17.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-f50.google.com with SMTP id s42so1943676uad.11 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-fsdevel@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