From owner-svn-src-all@FreeBSD.ORG Tue Mar 3 17:41:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8931658C; Tue, 3 Mar 2015 17:41:44 +0000 (UTC) Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 02D6ADBF; Tue, 3 Mar 2015 17:41:44 +0000 (UTC) Received: by lbiz12 with SMTP id z12so15861593lbi.5; Tue, 03 Mar 2015 09:41:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=yNp99YyyUSJzWs0JBQjz6CXE/EcYtuf+f5gZbpXNRXk=; b=f8BbTSL14kuCAlRiL+lVgpWS7uPImh7/AJYYcQpNUk7qUDYKdGUV6/PiBSb/Noqjf+ Dmkf67YfSUeJmpT/m9LsiUgGv1+F6W152S1zEEBZNTPRM/fV8uHOxddzL5xf8hoEnpTw TBsqfBeEQMgPPSWOP5c6o+/DqSoeoPYiIR6OPmYcWSjwbYkOr87mcgPORmLXt+f/tpol upwizK7nti/pOIUTSafZ6d82KR803gLoAiS+Z0hDofp7/69nlMKEOKRSp5Ilsz93xoYe N17GywESTZaYEyMqXlMlW0sjUWVzNHyXSsS2YEeDOdw3k9r4ma9h8PbRYQm65iWs9yw7 JnNg== MIME-Version: 1.0 X-Received: by 10.152.197.34 with SMTP id ir2mr62823lac.36.1425404501991; Tue, 03 Mar 2015 09:41:41 -0800 (PST) Sender: davide.italiano@gmail.com Received: by 10.25.217.8 with HTTP; Tue, 3 Mar 2015 09:41:41 -0800 (PST) Received: by 10.25.217.8 with HTTP; Tue, 3 Mar 2015 09:41:41 -0800 (PST) In-Reply-To: <20150303172745.GO32329@funkthat.com> References: <201503022005.t22K5HTL062907@svn.freebsd.org> <54F57CC6.9050109@freebsd.org> <20150303172745.GO32329@funkthat.com> Date: Tue, 3 Mar 2015 09:41:41 -0800 X-Google-Sender-Auth: NcYLQVMLFCGdh4GcXGA5eBw01io Message-ID: Subject: Re: svn commit: r279539 - head/sys/sys From: Davide Italiano To: John-Mark Gurney Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "src-committers@freebsd.org" , Julian Elischer , Neel Natu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2015 17:41:44 -0000 On Mar 3, 2015 9:27 AM, "John-Mark Gurney" wrote: > > Julian Elischer wrote this message on Tue, Mar 03, 2015 at 01:20 -0800: > > On 3/2/15 4:55 PM, Neel Natu wrote: > > > Hi Davide, > > > > > > On Mon, Mar 2, 2015 at 12:26 PM, Davide Italiano wrote: > > >> On Mon, Mar 2, 2015 at 12:05 PM, John-Mark Gurney wrote: > > >>> Author: jmg > > >>> Date: Mon Mar 2 20:05:16 2015 > > >>> New Revision: 279539 > > >>> URL: https://svnweb.freebsd.org/changeset/base/279539 > > >>> > > >>> Log: > > >>> give others fair warning that _SPARE2 isn't just cxgb, but used by large > > >>> number of other subsystems, so you probably don't want _SPARE2.. > > >>> > > >>> ktr needs an overhaul to really only compile in the ones you want, > > >>> we've long passed the 31 bits it provides.. > > >>> > > >> If you really want to do the overhaul (which would be honestly great), > > >> I might consider revamping my work for per-cpu KTR buffer and include > > >> that in the change. Originally it was just an exercise, but then it > > >> evolved and I've been sitting with it in my local tree for a while. I > > >> never had the chutzpah to upstream it because it involves fundamental > > >> changes and breaks compatibility with the old ktrdump(1) format. > > >> A rather outdated (and maybe not completely functional) version of the > > >> patch can be found here: > > >> http://people.freebsd.org/~davide/locking/ktr_percpu.4.diff , which > > >> should give you an high level view of the change. > > >> I can update it to the last version and bring up for review, if > > >> somebody think it might be a sane idea avoiding synchronization on a > > >> single buffer for KTR. > > I think it would be a problem... > > one of the truely useful things about ktr is that it does use a single > > buffer. > > this means that you get the true interaction between CPUS. > > Schedgraph relies on this (as one example). > > Don't some systems provide a syncronized P-state invariant TSC? If so, > we can use the TSC clock to tell ordering between cores.. > > I could definately seeing it be a tunable that lets people force either > single buffer, or PCPU buffer KTR... Where we know TSC is syncronized, > we default to PCPU and others a single buffer... > I can't talk about schedgraph because I'm not familiar with the implementation. Can you please elaborate how things will break with a per-CPU buf? I know that everything after Nehalem has a synchronized TSC.Also I've just noticed Matt Dillon introduced a change similar to mine in Dragonfly about 10 years ago. The way they cope with TSC skew is that of resynchronizing the timers periodically, e.g. 1 msec. This is exposed via a SYSCTL that can be disabled on modern processors. Anyhow, I tend to agree this kind of change might be kind of risky as is, and I havent evaluated that on !IA32, which makes the proposal even more problematic. About the double implementation, I think it's not worth our time duplicating the code + the burden of maintaining it. Either single or per-CPU buffer. Given the initial opposition I'm inclined to leave the code as is. -- Davide