lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 4 Mar 2019 21:41:00 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Song Liu <songliubraving@...com>
Cc:     Netdev <netdev@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        "ast@...nel.org" <ast@...nel.org>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        Kernel Team <Kernel-team@...com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "acme@...hat.com" <acme@...hat.com>,
        "jolsa@...nel.org" <jolsa@...nel.org>,
        "namhyung@...nel.org" <namhyung@...nel.org>
Subject: Re: [PATCH v4 perf,bpf 14/15] perf: introduce side band thread

On Mon, Mar 04, 2019 at 07:49:06PM +0000, Song Liu wrote:
> 
> 
> > On Mar 4, 2019, at 5:52 AM, Jiri Olsa <jolsa@...hat.com> wrote:
> > 
> > On Wed, Feb 27, 2019 at 05:52:52PM +0000, Song Liu wrote:
> >> 
> >> 
> >>> On Feb 27, 2019, at 5:21 AM, Jiri Olsa <jolsa@...hat.com> wrote:
> >>> 
> >>> On Mon, Feb 25, 2019 at 04:20:18PM -0800, Song Liu wrote:
> >>> 
> >>> SNIP
> >>> 
> >>>> diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
> >>>> index 8c902276d4b4..61b87c8111e6 100644
> >>>> --- a/tools/perf/util/evlist.c
> >>>> +++ b/tools/perf/util/evlist.c
> >>>> @@ -19,6 +19,7 @@
> >>>> #include "debug.h"
> >>>> #include "units.h"
> >>>> #include "asm/bug.h"
> >>>> +#include "bpf-event.h"
> >>>> #include <signal.h>
> >>>> #include <unistd.h>
> >>>> 
> >>>> @@ -1841,3 +1842,102 @@ struct perf_evsel *perf_evlist__reset_weak_group(struct perf_evlist *evsel_list,
> >>>> 	}
> >>>> 	return leader;
> >>>> }
> >>>> +
> >>>> +static struct perf_evlist *sb_evlist;
> >>>> +pthread_t poll_thread;
> >>> 
> >>> so some of the things are static and some like poll_args
> >>> you alloced on the stack.. I dont like this interface,
> >>> could we come up with something generic? perhaps
> >>> encapsulated in perf_evlist, like:
> >> 
> >> I picked global sb_evlist and poll_thread because there 
> >> should be only one sb_evlist and one thread polling it. 
> >> There might be multiple evsel on the sb_evlist. 
> >> 
> >> I am not sure I understand your suggestion..
> >> 
> >>> struct perf_evlist {
> >>> 	...
> >>> 	struct {
> >>> 		pthread_t	th;
> >>> 		int		state;
> >>> 	} thread;
> >> 
> >> This will not be used by the main perf_evlist, right?
> > 
> > no, just by the thread interface
> 
> What is "state" here?

it's replacement for the 'done' pointer u had,
which I did not like.. leting each thread having
its own state is better IMO

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ