From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2772 invoked by alias); 25 Feb 2013 20:24:42 -0000 Received: (qmail 2762 invoked by uid 22791); 25 Feb 2013 20:24:39 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Feb 2013 20:24:28 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1PKNtoB026035 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Feb 2013 15:24:20 -0500 Received: from t510.usersys.redhat.com (dhcp-10-15-1-83.hsv.redhat.com [10.15.1.83]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1PJ77pa032023 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 25 Feb 2013 14:07:07 -0500 Message-ID: <512BB65A.9060604@redhat.com> Date: Mon, 25 Feb 2013 20:24:00 -0000 From: David Smith User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 MIME-Version: 1.0 To: Christian Babeux CC: lttng-dev@lists.lttng.org, systemtap@sourceware.org Subject: Re: [lttng-dev] Using lttng-ust's libringbuffer outside lttng-ust References: <511A9E5A.4010303@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2013-q1/txt/msg00194.txt.bz2 On 02/15/2013 02:36 PM, Christian Babeux wrote: > Hi David, Thanks for the response. >> The next question would be what is the best way of using libringbuffer >> outside lttng-ust. One (not great) possibility would be to just copy the >> code into systemtap. Of course the problem there is keeping the code up >> to date with changes in lttng-ust. The next possibility would be to make >> it a separate project (more like userspace-rcu). > > Splitting libringbuffer from the UST tree right now would prove to be > quite a challenge. We would need to expose an API to the "clients" of > the ringbuffer. Currently there are two levels of abstraction that one > can use with the ringbuffer: a "high-level" one where you use a > predefined "client" with the associated performance degradation and a > "low-level" one where you know exactly which kind of "client" you are > using with the associated fast-path inlined. > > We would need to discuss which level of abstraction we expose to the > user: a generic one or "N apis" for the different low-level "clients". In my head, I was planning on using the APIs defined in libringbuffer/*.h (like lib_ring_buffer_{reserve,commit,write} from frontend_api.h). But, perhaps we could back up a sec and you could describe a bit more the low-level vs. high-level levels of abstraction. Feel free to point me at some code. -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax)