All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Usefulness of xt_recent's "last seen" and "oldest_pkt" on a tickless system
@ 2015-01-11 10:23 Jan Engelhardt
  2015-01-11 15:52 ` David Hagood
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2015-01-11 10:23 UTC (permalink / raw)
  To: David Hagood; +Cc: Netfilter user mailing list


>are just a count of the number of jiffies since boot. However, on a 
>tickless kernel, there is really no well defined number of jiffies per 
>second as far as I can tell

You might want to have a look at
static void tick_do_update_jiffies64(ktime_t now) in
kernel/time/tick-sched.c ;-)


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Usefulness of xt_recent's "last seen" and "oldest_pkt" on a tickless system
@ 2015-01-11  1:27 David Hagood
  0 siblings, 0 replies; 5+ messages in thread
From: David Hagood @ 2015-01-11  1:27 UTC (permalink / raw)
  To: netfilter

First of all, this is about the third time I've asked about this subject 
on this mailing list, and I've never had anybody reply.
/taps microphone
Is this thing on?

I have been trying for several months to work out a way to parse the the 
output of "cat /proc/net/xt_recent/<name of rule>", and return 
meaningful numbers for the "last_seen" and "oldest_pkt" fields. As best 
as I can determine, these are just a count of the number of jiffies 
since boot. However, on a tickless kernel, there is really no well 
defined number of jiffies per second as far as I can tell - it's going 
to be a function of how often things need the system to wake up, and 
will vary from moment to moment based upon the workload of the system.

If this is so, then this calls into question the utility of reporting 
jiffies to the user - there's no way the user has to relate those values 
to anything meaningful. It also calls into question the whole idea that 
a recent rule can meaningfully specify a number of seconds for a packet 
to be tested, if all that is stored is a number of jiffies.

So, the first question I have is: is there any meaningful way a 
userspace tool can convert the values reported by /proc/net/xt_recent/* 
into a wall clock time?

The second question is: if the answer to the first question is no, then 
why report those values at all? The whole point of a procfile interface 
is to report data to userspace, but if there is no meaningful way to use 
that information, what good is it?

The third question is: wouldn't make more sense to capture the actual 
wall-clock time of a packet, and report that to user space in a 
meaningful way from the procfile interface? At least report time from 
epoch in seconds - something that can be manipulated in a meaningful way?


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-11 23:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-11 10:23 Usefulness of xt_recent's "last seen" and "oldest_pkt" on a tickless system Jan Engelhardt
2015-01-11 15:52 ` David Hagood
2015-01-11 18:49   ` Jan Engelhardt
2015-01-11 23:24     ` David Hagood
  -- strict thread matches above, loose matches on Subject: below --
2015-01-11  1:27 David Hagood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.