Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755454Ab3FRJIj (ORCPT ); Tue, 18 Jun 2013 05:08:39 -0400 Received: from mail-ea0-f170.google.com ([209.85.215.170]:35996 "EHLO mail-ea0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754001Ab3FRJIg (ORCPT ); Tue, 18 Jun 2013 05:08:36 -0400 Message-ID: <1371546510.3252.224.camel@edumazet-glaptop> Subject: Re: [PATCH v2 net-next] net: poll/select low latency socket support From: Eric Dumazet To: Eliezer Tamir Cc: David Miller , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Jesse Brandeburg , Don Skidmore , e1000-devel@lists.sourceforge.net, Willem de Bruijn , Ben Hutchings , Andi Kleen , HPA , Eilon Greenstien , Or Gerlitz , Amir Vadai , Alex Rosenbaum , Avner Ben Hanoch , Or Kehati , sockperf-dev@googlegroups.com, Eliezer Tamir Date: Tue, 18 Jun 2013 02:08:30 -0700 In-Reply-To: <20130618085810.10941.55039.stgit@ladj378.jer.intel.com> References: <20130618085759.10941.15811.stgit@ladj378.jer.intel.com> <20130618085810.10941.55039.stgit@ladj378.jer.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 835 Lines: 31 On Tue, 2013-06-18 at 11:58 +0300, Eliezer Tamir wrote: > select/poll busy-poll support. > > */ > -static inline u64 ll_end_time(struct sock *sk) > +static inline u64 ll_sk_end_time(struct sock *sk) > { > - u64 end_time = ACCESS_ONCE(sk->sk_ll_usec); > - > - /* we don't mind a ~2.5% imprecision > - * sk->sk_ll_usec is a u_int so this can't overflow > - */ > - end_time = (end_time << 10) + sched_clock(); > + return (ACCESS_ONCE(sk->sk_ll_usec) << 10) + sched_clock(); > +} > This is the fourth time you try to introduce an overflow in this code. (same for ll_end_time()) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/