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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 9F528C5519F for ; Sat, 21 Nov 2020 09:28:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A6BA2224A for ; Sat, 21 Nov 2020 09:28:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ON94Agc/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727286AbgKUJ15 (ORCPT ); Sat, 21 Nov 2020 04:27:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:43814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726709AbgKUJ14 (ORCPT ); Sat, 21 Nov 2020 04:27:56 -0500 Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com [209.85.210.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 81A5F22269; Sat, 21 Nov 2020 09:27:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605950875; bh=uUE+BwhJZQbnAt5h9J7aJjQ56rhNF6AJaSotMShsjjw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ON94Agc/s57Gqw3EUmZlgsso7EUmKsH7ty9efQnjbxpm/7Uvzx8Glg8536rUjh1RK ctShKcEsxsK4H6T/fE/adSdr+yC6M9lmTEKL7pXTbEnuYoGTQKPe0THVuHJvy2zgnS G+H1bWuB7l9jYDVl4nxJezbY8tV7fbujYf7ER+DU= Received: by mail-ot1-f42.google.com with SMTP id 92so8125097otd.5; Sat, 21 Nov 2020 01:27:55 -0800 (PST) X-Gm-Message-State: AOAM531zzI8pNQYHrpX2C9CJWsjj6atrN8XTGrwhv0CxKPD2oz+GBagw fAL6q9UDUc5e8uqoEuUxHkXuBOaqdji5PE/2CUk= X-Google-Smtp-Source: ABdhPJw8tZEWlczyttYsnJQ6uLhwZuA22h1QJBv7lMqVso6n63xbWEtnhxTHnmW/htaNLmzBLlOTQkGDkhJBZcl9sFg= X-Received: by 2002:a9d:6317:: with SMTP id q23mr7263123otk.251.1605950874850; Sat, 21 Nov 2020 01:27:54 -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: Arnd Bergmann Date: Sat, 21 Nov 2020 10:27:38 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 1/2] epoll: add nsec timeout support with epoll_pwait2 To: Willem de Bruijn Cc: Matthew Wilcox , David Laight , Linux FS-devel Mailing List , linux-kernel , Al Viro , Andrew Morton , Soheil Hassas Yeganeh , Arnd Bergmann , Shuo Chen , linux-man , Willem de Bruijn Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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/ Arnd