Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4531744ybe; Mon, 16 Sep 2019 13:58:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwnq3SKkesAQyVfIjAAaIXbyE9ihmq787w/XJL5bTMpWoDzBvtZw9tsTIKte7ROqzRD3wm0 X-Received: by 2002:aa7:d816:: with SMTP id v22mr1371380edq.28.1568667507830; Mon, 16 Sep 2019 13:58:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568667507; cv=none; d=google.com; s=arc-20160816; b=lAzUjl6qhLyvIARPvLSvJZO9sWVpX7CxpoDHg79ws1kyvzsG1bR3nq+4GyJVEj9kRD j7aRAUCZOL+/bz2OWS1brzb5v6/v1Eu87IKX6/28pG/DSBff5gOEpKDXsKqavhGsj38v kAsWjy74Rp+rZK6sv7LKeDiT0yqquowRdyWR9KNsEnIyBR2Zd4epdvKzxPGv6oxhc9q4 L6rdoJ05/46rWG0r5jIx6AZWnSpPLG0Ywmo5dCzYruwcqS2DY/mHt4mwpaCRx9V92zxS vlQPVrYblLCSTJWGBEhh6X9mHV3R9241+B3sAFw5fw1qTBKOigH4ROcM8IRHVBOwB0C3 LvFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=AaDpJ2vFVH83bqcz70+BN9/ikwFwkcl+68V0vnu32lQ=; b=pag+uYH/zcQAN9HoHjdecZktw4P1k6m7iIeu3AH3CrzWfAM+j07D7SZ9LsB+E66lEF nHfW2/1izDqIUCBs4oiQ6ZCS63qgS/VCtspEVUaM9T2SZxNDFzU1bMvB0eSd8E+PCcPX fZysFUeYHvdAGx87kAM7yQpQB+wBPNJX1n/KM4y7mMfg4L2+e3qenzuVQUsgBY14DQRW 2Ccko6s6LXPqGGCodLIo7iHRPpMuMSpX2AZ7D8/hiHCxzHyriwLDaAfANdy4QBvO0yIL RQv5+vOb4wRlUdJGovZ+zwSV9IzQQhLsvOjj355BSIod9z+IvQRJzE/Byr33gPSoLGl1 Wv2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arista.com header.s=googlenew header.b=lBi2qmPR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=arista.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a13si34349ejp.117.2019.09.16.13.58.03; Mon, 16 Sep 2019 13:58:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@arista.com header.s=googlenew header.b=lBi2qmPR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=arista.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388984AbfIPPTr (ORCPT + 99 others); Mon, 16 Sep 2019 11:19:47 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:36114 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725847AbfIPPTq (ORCPT ); Mon, 16 Sep 2019 11:19:46 -0400 Received: by mail-wr1-f68.google.com with SMTP id y19so39340716wrd.3 for ; Mon, 16 Sep 2019 08:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=AaDpJ2vFVH83bqcz70+BN9/ikwFwkcl+68V0vnu32lQ=; b=lBi2qmPR3YES68If3/adPkQIQ1BvZGlcZ9ftg7/zrakEm2T6M+YWTCnQ4+0MqCFJWA 1Zq9OqRYPyeV7NS7JhErH//fGFRtETc1wK4x3/ihhEqHA5kcAtpN649X3XOZm1Eo+k+M Y3ganHO7a104Jc8akm+55uO9fKd3foAowbeHAaJk7WPVmr5sLzhpfAsTf6Ikqi/5CGoG h3PMosW4sXU3XLmZZUbXIMglt0OQouB/Q8pExcofCZu4Cn7tvo8CzA11nJKHfCLTbTA8 rW0D98rCrcSah6WybDuXOhQf2u0bh+XacntV+lHMwEaUciLtrrtkHjjlGSSYXDxwFbAz fQqA== 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-language :content-transfer-encoding; bh=AaDpJ2vFVH83bqcz70+BN9/ikwFwkcl+68V0vnu32lQ=; b=KYeDeBe586G+EAsJA+wlfRLs/lTGyll5UZFQ5lXd4BajWABT0ESZWdjC4ID3DaKvwG EkRWgEOLE+5Z6Fr0ov/ZOeI1hpBRSWuH7Ie4yO1Yq22mVZFSfOq5GYGCoYryU+MlArLH xUpMzzX69880sUv7IcFjT7zsY+Y4it5ww3WtvCCc1m6w7OBQcf8PutYglXqRfMg6bRMx zEJcW9e7WU7C/l9uWoyBJVCh3TxAVZ4SzEc22DnxQujNF0sIGqmryZ8o7//VwLO9RSx0 uqCRhtL+u9YULqOUetlJwbnYniaquVeGxKAz+F6C+azNNHm+4rgYRvL7dsRZzP+I+b7q Cz3A== X-Gm-Message-State: APjAAAVM3hsjJFwm+bSz2h19OCIOqmIqpKqhLJv6Mf6ik9DDaQsCJF4E vEXeQAmdj891B5u3Mhll0hrGOg== X-Received: by 2002:a5d:4146:: with SMTP id c6mr233450wrq.205.1568647184551; Mon, 16 Sep 2019 08:19:44 -0700 (PDT) Received: from [10.83.36.153] ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id f18sm14362721wrv.38.2019.09.16.08.19.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Sep 2019 08:19:43 -0700 (PDT) Subject: Re: [PATCH 8/9] select/restart_block: Convert poll's timeout to u64 To: David Laight , "linux-kernel@vger.kernel.org" Cc: Dmitry Safonov <0x7f454c46@gmail.com>, Adrian Reber , Alexander Viro , Andrei Vagin , Andy Lutomirski , Cyrill Gorcunov , Ingo Molnar , Oleg Nesterov , Pavel Emelyanov , Thomas Gleixner , "containers@lists.linux-foundation.org" , "linux-fsdevel@vger.kernel.org" References: <20190909102340.8592-1-dima@arista.com> <20190909102340.8592-9-dima@arista.com> From: Dmitry Safonov Message-ID: Date: Mon, 16 Sep 2019 16:19:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/9/19 2:07 PM, David Laight wrote: > From: Dmitry Safonov >> Sent: 09 September 2019 11:24 >> >> All preparations have been done - now poll() can set u64 timeout in >> restart_block. It allows to do the next step - unifying all timeouts in >> restart_block and provide ptrace() API to read it. >> >> Signed-off-by: Dmitry Safonov >> --- >> fs/select.c | 27 +++++++-------------------- >> include/linux/restart_block.h | 4 +--- >> 2 files changed, 8 insertions(+), 23 deletions(-) >> >> diff --git a/fs/select.c b/fs/select.c >> index 4af88feaa2fe..ff2b9c4865cd 100644 >> --- a/fs/select.c >> +++ b/fs/select.c > ... >> @@ -1037,16 +1030,10 @@ SYSCALL_DEFINE3(poll, struct pollfd __user *, ufds, unsigned int, nfds, >> struct restart_block *restart_block; >> >> restart_block = ¤t->restart_block; >> - restart_block->fn = do_restart_poll; >> - restart_block->poll.ufds = ufds; >> - restart_block->poll.nfds = nfds; >> - >> - if (timeout_msecs >= 0) { >> - restart_block->poll.tv_sec = end_time.tv_sec; >> - restart_block->poll.tv_nsec = end_time.tv_nsec; >> - restart_block->poll.has_timeout = 1; >> - } else >> - restart_block->poll.has_timeout = 0; >> + restart_block->fn = do_restart_poll; >> + restart_block->poll.ufds = ufds; >> + restart_block->poll.nfds = nfds; >> + restart_block->poll.timeout = timeout; > > What is all that whitespace for? Aligned them with tabs just to make it look better. I've no hard feelings about this - I can do it with spaces or drop the align at all. Thanks, Dmitry