posix timers: Expand exitsting info in proc file
Subsystems (2)
cover posix timers: Expand exitsting info in proc file
Hi.
I'm working on the checkpoint-restore project (http://criu.org), on realisation of posix-timers. To compleatly checkpoint and restore these timers we need to know which clock they are using. So I d'like to add this information to existing syscall which shows posix-timers info.
Pavel Tikhomirov (1):
posix-timers: Show clock ID in proc file
fs/proc/base.c | 1 + 1 file changed, 1 insertion(+)
Signature · 1 line
1.7.9.5
PATCH 1/1 posix-timers: Show clock ID in proc file
Expand information about posix-timers in /proc/<pid>/timers by adding info about clock, with which the timer was created. I.e. in the forth line of timer info after "notify:" line go "ClockID: <clock_id>".
--- fs/proc/base.c | 1 + 1 file changed, 1 insertion(+)
fs/proc/base.c +1 -0
@@ -2079,6 +2079,7 @@ static int show_timer(struct seq_file *m, void *v) nstr[notify & ~SIGEV_THREAD_ID ], (notify &SIGEV_THREAD_ID ) ?"tid" :"pid" , pid_nr_ns(timer->it_pid, tp->ns)); +seq_printf (m,"ClockID: %d\n" , timer->it_clock);return 0 ; }
Signature · 1 line
1.7.9.5
Re: [PATCH 1/1] posix-timers: Show clock ID in proc file
Quoted 14 lines · Pavel Tikhomirov
Expand information about posix-timers in /proc/<pid>/timers by adding info about clock, with which the timer was created. I.e. in the forth line of timer info after "notify:" line go "ClockID: <
clock_id>".Signed-off-by Pavel Tikhomirov <[email protected]>--- fs/proc/base.c | 1 + 1 file changed, 1 insertion(+)fs/proc/base.c +0
-0
fs/proc/base.c static int show_timer(struct seq_file *m, void *v) · line 2082
Quoted 4 lines
fs/proc/base.c +1
-0@@ -2079,6 +2079,7 @@ static int show_timer(struct seq_file *m, void *v) nstr[notify & ~SIGEV_THREAD_ID ], (notify &SIGEV_THREAD_ID ) ?"tid" :"pid" , pid_nr_ns(timer->it_pid, tp->ns)); +seq_printf (m,"ClockID: %d\n" , timer->it_clock);
What userspace tool just broke by adding a new field to this file?
thanks,
greg k-h
Re: [PATCH 1/1] posix-timers: Show clock ID in proc file
Quoted 10 lines · Greg KH
Quoted 9 lines · Pavel Tikhomirov
Expand information about posix-timers in /proc/<pid>/timers by adding info about clock, with which the timer was created. I.e. in the forth line of timer info after "notify:" line go "ClockID: <
clock_id>".Signed-off-by Pavel Tikhomirov <[email protected]>--- fs/proc/base.c | 1 + 1 file changed, 1 insertion(+)
Quoted 11 lines
fs/proc/base.c static int show_timer(struct seq_file *m, void *v) · line 2082
Quoted 9 lines
fs/proc/base.c +1
-0@@ -2079,6 +2079,7 @@ static int show_timer(struct seq_file *m, void *v) nstr[notify & ~SIGEV_THREAD_ID ], (notify &SIGEV_THREAD_ID ) ?"tid" :"pid" , pid_nr_ns(timer->it_pid, tp->ns)); +seq_printf (m,"ClockID: %d\n" , timer->it_clock);What userspace tool just broke by adding a new field to this file?
Zero for two reasons:
1. this proc file appeared this merge window
2. this file format is
<name>: <value>
and should be parsed line-by-line by applications like e.g. /proc/pid/status or /proc/pid/smaps. Both these files were extended with fields in the past with no worries to tools, so should be this new one.
Quoted 5 lines
thanks,
greg k-h
.
Thanks,
Pavel
Re: [PATCH 1/1] posix-timers: Show clock ID in proc file
Quoted 25 lines · Pavel Emelyanov
Quoted 10 lines · Greg KH
Quoted 9 lines · Pavel Tikhomirov
Expand information about posix-timers in /proc/<pid>/timers by adding info about clock, with which the timer was created. I.e. in the forth line of timer info after "notify:" line go "ClockID: <
clock_id>".Signed-off-by Pavel Tikhomirov <[email protected]>--- fs/proc/base.c | 1 + 1 file changed, 1 insertion(+)Quoted 11 lines
fs/proc/base.c static int show_timer(struct seq_file *m, void *v) · line 2082
Quoted 9 lines
fs/proc/base.c +1
-0@@ -2079,6 +2079,7 @@ static int show_timer(struct seq_file *m, void *v) nstr[notify & ~SIGEV_THREAD_ID ], (notify &SIGEV_THREAD_ID ) ?"tid" :"pid" , pid_nr_ns(timer->it_pid, tp->ns)); +seq_printf (m,"ClockID: %d\n" , timer->it_clock);What userspace tool just broke by adding a new field to this file?
Zero for two reasons:
Quoted 8 lines
1. this proc file appeared this merge window
2. this file format is<name>: <value>
and should be parsed line-by-line by applications like e.g.
/proc/pid/statusor/proc/pid/smaps. Both these files were extended with fields in the past with no worries to tools, so should be this new one.
Ok, just making sure :)
Re: [PATCH 1/1] posix-timers: Show clock ID in proc file
In reply to Pavel TikhomirovQuoted 5 lines · Pavel Tikhomirov
Expand information about posix-timers in /proc/<pid>/timers by adding info about clock, with which the timer was created. I.e. in the forth line of timer info after "notify:" line go "ClockID: <
clock_id>".Signed-off-by Pavel Tikhomirov <[email protected]>
Quoted 17 lines
--- fs/proc/base.c | 1 + 1 file changed, 1 insertion(+)fs/proc/base.c +1
-0@@ -2079,6 +2079,7 @@ static int show_timer(struct seq_file *m, void *v) nstr[notify & ~SIGEV_THREAD_ID ], (notify &SIGEV_THREAD_ID ) ?"tid" :"pid" , pid_nr_ns(timer->it_pid, tp->ns)); +seq_printf (m,"ClockID: %d\n" , timer->it_clock);return 0 ; }
tip-bot for Pavel Tikhomirov
merge bot[tip:timers/urgent] posix-timers: Show clock ID in proc file
In reply to Pavel Tikhomirovposix-timers: Show clock ID in proc file
Commit-ID: 15ef0298deb3929eb6ad6d2334fd2059fd53807c Gitweb: http://git.kernel.org/tip/15ef0298deb3929eb6ad6d2334fd2059fd53807c Author: Pavel Tikhomirov <[email protected]> AuthorDate: Fri, 17 May 2013 02:12:03 +0400 Committer: Thomas Gleixner <[email protected]> CommitDate: Tue, 28 May 2013 11:41:14 +0200
posix-timers: Show clock ID in proc file
Expand information about posix-timers in /proc/<pid>/timers by adding info about clock, with which the timer was created. I.e. in the forth line of timer info after "notify:" line go "ClockID: <clock_id>".
--- fs/proc/base.c | 1 + 1 file changed, 1 insertion(+)
fs/proc/base.c +1 -0
@@ -2118,6 +2118,7 @@ static int show_timer(struct seq_file *m, void *v) nstr[notify & ~SIGEV_THREAD_ID ], (notify &SIGEV_THREAD_ID ) ?"tid" :"pid" , pid_nr_ns(timer->it_pid, tp->ns)); +seq_printf (m,"ClockID: %d\n" , timer->it_clock);return 0 ; }