I see a boost here of ~25/30%.. must be very system related.
We need to sort only:
- usage of construct priority (gcc version related)
- documentation
- second set of review and port of the world.
Fabio
On Fri, 2009-04-03 at 12:31 -0700, Steven Dake wrote:
> must be a laptop ism i dont see it on a physical machine.
>
> regards
> -steve
>
> On Fri, 2009-04-03 at 12:02 -0700, Steven Dake wrote:
> > I see serious performance regressions.
> >
> > On Fri, 2009-04-03 at 20:36 +0200, Fabio M. Di Nitto wrote:
> > > Hi guys,
> > >
> > > this is a major rework, and hopefully the last one, for logsys.
> > >
> > > The patch is big, so I strongly recommend to read the new code rather
> > > than looking at the diff itself.
> > >
> > > Those are the major changes:
> > >
> > > logsys.h:
> > > - add lots of comments and make it more tidy.
> > > - drop of the whole NOSUBSYS concept. Absorbed into code.
> > > - reduce the Internal API exports.
> > > - drop logsys_init and logsys_conf.
> > > - drop logsys_atsegv as it was a 100% dup of logsys_atexit.
> > > - add all possible runtime configuration options.
> > > - from logsys.h: LOGSYS_DECLARE_SUBSYS needs a feature review (see
> > > below).
> > >
> > > logsys.c:
> > > - increase SUBSYS_MAX to 63. Allocate one extra for SYSTEM (or default
> > > settings).
> > > - make it so that SYSTEM holds the application defaults and SUBSYSTEM
> > > can override SYSTEM settings (see also below).
> > > - unify the concept of SYSTEM and SUBSYSTEM within the same data
> > > structure.
> > > - make output to targets flexible by subsystem/system priority.
> > > - fix a bug (also present in current implementation) where loglevel was
> > > being augmented by one for no reasons (decreasing the output).
> > > - add a bunch of static helper functions to reduce code duplications a
> > > lot.
> > > - add _logsys_system_setup helper to init system and defaults. This
> > > reduces the amount of code to be built in the construct header.
> > > - SUBSYSTEM creation automatically inherit default settings from SYSTEM.
> > > - cleanup usage of subsys and subsysid to be consistent in functions
> > > interfaces.
> > > - give a pretty good boost to error return codes.
> > >
> > > So generally an example code with the new interface will look like:
> > >
> > > #include <corosync/engine/logsys.h>
> > >
> > > LOGSYS_DECLARE_SYSTEM("FOO",
> > > LOG_MODE_OUTPUT_FILE | LOG_MODE_OUTPUT_SYSLOG |
> > > LOG_MODE_OUTPUT_STDERR | LOG_MODE_THREADED |
> > > LOG_MODE_FORK,
> > > 0, /* debug */
> > > "/root/test.log", /* logfile */
> > > LOG_LEVEL_INFO, /* logfile_priority */
> > > LOG_DAEMON, /* syslog facility */
> > > LOG_LEVEL_INFO, /* syslog level */
> > > 0, /* tags */
> > > NULL, /* use default format */
> > > 1000000); /* flight recorder size */
> > >
> > > and this will set and init the logging for the whole application.
> > >
> > > Optionally for each file you can create a subsystem:
> > >
> > > LOGSYS_DECLARE_SUBSYS("main")
> > >
> > > if not specified the file.c will automatically use the main settings.
> > >
> > > The new API allows configuration changes to all entries both for the
> > > SYSTEM and SUBSYSTEM settings..
> > >
> > > So it means that you can do at runtime:
> > >
> > > logsys_config_file_set("FOO", &err, "/root/newfile.log");
> > > or
> > > logsys_config_file_set(NULL, &err, "/root/newfile.log");
> > >
> > > (the two calls above are equivalent. you can either specify the SYSTEM
> > > name or pass NULL and default to SYSTEM).
> > >
> > > and everything outside a subsystem will start use the new logfile.
> > >
> > > the SUBSYSTEM "main" is not affected by the change.
> > >
> > > This is now true for all options in a consistent way.
> > >
> > > ----
> > >
> > > This new implementation allows a great deal of flexibility and maintain
> > > all the core features of logsys v2 such as threading and flight
> > > recorder.
> > >
> > > At this point in time I have only a bunch of test files to use against
> > > the new implementation.
> > >
> > > Before porting corosync/openais, I'd like to finalize the interface in
> > > case something is not right.
> > >
> > > Specifically I am not able to make up my mind about
> > > LOGSYS_DECLARE_SUBSYS. Should it provide a similar interface as
> > > DECLARE_SYSTEM to allow immediate overrides? or should we keep it simple
> > > and just let the user do runtime config changes to the SUBSYSTEM when
> > > required? Both and pro and cons..
> > > I have also consider this option (pseudo code warning):
> > >
> > > #define LOGSYS_DECLARE_SUBSYS(subsys,config_override_function)
> > > [SNIP]
> > > if config_override_function {
> > > config_override_function(subsys);
> > > }
> > >
> > > Cheers
> > > Fabio
> > > _______________________________________________
> > > Openais mailing list
> > > [email protected]
> > > https://lists.linux-foundation.org/mailman/listinfo/openais
> > _______________________________________________
> > Openais mailing list
> > [email protected]
> > https://lists.linux-foundation.org/mailman/listinfo/openais
>
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais