Re: [PATCH] slub: Fix misleading 'age' in verbose slub prints

From: Christopher Lameter
Date: Thu Mar 08 2018 - 13:09:57 EST


On Thu, 8 Mar 2018, Chintan Pandya wrote:

> > If you print the raw value, then you can do the subtraction yourself;
> > if you've subtracted it from jiffies each time, you've at least introduced
> > jitter, and possibly enough jitter to confuse and mislead.
> >
> This is exactly what I was thinking. But looking up 'age' is easy compared to
> 'when' and this seems required as from Christopher's
> reply. So, will raise new patch cleaning commit message a bit.

Well then you need to provide some sort of log text processor I think.
Otherwise you need to get the object address from the log message, then
scan back through the log to find the correct allocation entry, retrieve
both jiffy values and subtract them. If the age is there then you can
simply see how far in the past the object was allocated.

One advantage in favor of jiffies would be the ability to correlate
multiple events if each log line would have a jiffies like timestamps.

But it does not. So I think outputting jiffies there is causing more
problems that benefits.