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]
Message-ID: <20140812073319.GB1128@krava.brq.redhat.com>
Date:	Tue, 12 Aug 2014 09:33:20 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	Jiri Olsa <jolsa@...nel.org>, linux-kernel@...r.kernel.org,
	Adrian Hunter <adrian.hunter@...el.com>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	David Ahern <dsahern@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...nel.org>,
	Jean Pihet <jean.pihet@...aro.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [RFC 00/20] perf: Finish sampling commands when events are closed

On Mon, Aug 11, 2014 at 05:28:12PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Aug 11, 2014 at 05:12:49PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Mon, Aug 11, 2014 at 10:49:54AM +0200, Jiri Olsa escreveu:
> > > hi,
> > > adding support to quit sampling commands:
> > >   record,top,trace,kvm stat live
> > > 
> > > when all the monitored events are closed, like following perf
> > > command will now exit when monitored process (pid 1234) exits:
> > > 
> > >   $ perf record -p 1234
> > > 
> > > I added independent poller object to handle basic polling
> > > tasks. I had to factor some parts, so sending this as RFC,
> > 
> > Why? I'm trying to figure out why this poller class is needed, just from
> > reading the changelog entries, no luck so far.
> 
> So this is all about accounting for when all events are closed? I.e. as
> we receive the ERR and HUP we go on closing the entries in the pollfd?
> Then, when none are closed, then we exit, is that the case?
> 
> Why not just mark them -1 and decrement evlist->nr_open_fds (new field)?
> 
> struct pollfds {
> 	struct pollfd *pollfds;
> 	int    nr_fds;
> 	int    nr_open_fds;
> };
> 
> Don't use callbacks and then that poller_item doesn't need to exist :-\

I think callbacks are convenient when having different kind
of events combined in polling, as described in my reply to
your first email

> 
> I'll try to cook a patch with those ideas later today, if for anything,
> to validate your patches :-)

ok ;-) thanks

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ