[systemd-devel] [PATCH] util: preserve get_process_capeff behavior

Shawn shawn at churchofgit.com
Thu Sep 19 10:40:48 PDT 2013


We can't optimize the strcspn(t, WHITESPACE); to a strchr(t, '\n') - t;
because of the " kB" that meminfo and a few other places have, that we want
to drop.

get_status_field() has to be run every time we log a message, and I am
starting to not like this function at all. I think we should go back to
having it hand-rolled in get_process_capeff(), at least for that one in the
hot-path.

patch coming...


On Tue, Sep 17, 2013 at 4:39 PM, Zbigniew Jędrzejewski-Szmek <
zbyszek at in.waw.pl> wrote:

> On Tue, Sep 17, 2013 at 03:48:46PM -0700, Shawn Landden wrote:
> > 69ab80881552d5f79ca95f6b3be48ad122ab1ec2 tried to unify
> > parsing of status files, but removed the logic of skipping
> > extra '0's when getting the effective capabilities. Restore
> > that logic.
> Oh, I removed the logic on purpose, because I didn't know what
> it was for. I applied a different fix now, which is a bit hacky,
> but simplifies our hot path a bit. I've also added some comments
> to make it clearer why 0's are skipped.
>
> Zbyszek
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130919/ed7ebac3/attachment.html>


More information about the systemd-devel mailing list