Re: [patch 13/26] posix-timers: Rename do_schedule_next_timer
On Thu, Jun 01, 2017 at 10:50:42PM +0200, Thomas Gleixner wrote: > On Wed, 31 May 2017, Christoph Hellwig wrote: > > > On Tue, May 30, 2017 at 11:15:46PM +0200, Thomas Gleixner wrote: > > > That function is a misnomer. Rename it with a proper prefix to > > > posixtimer_rearm(). > > > > Please also move it out of asm-generic/siginfo.h as it's implemented > > and used in generic code only, and there is no arch override at all. > > > > In fact it seems like asm-generic/siginfo.h should probably just move > > to include/linux/signinfo.h. > > That's one convoluted mess. Yes. I tried to give it some love 2 days ago but my first attempt failed badly. Here is what I'm at now, but it's not quite ready for prime time: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/siginfo
Re: [patch 13/26] posix-timers: Rename do_schedule_next_timer
On Thu, Jun 01, 2017 at 10:50:42PM +0200, Thomas Gleixner wrote: > On Wed, 31 May 2017, Christoph Hellwig wrote: > > > On Tue, May 30, 2017 at 11:15:46PM +0200, Thomas Gleixner wrote: > > > That function is a misnomer. Rename it with a proper prefix to > > > posixtimer_rearm(). > > > > Please also move it out of asm-generic/siginfo.h as it's implemented > > and used in generic code only, and there is no arch override at all. > > > > In fact it seems like asm-generic/siginfo.h should probably just move > > to include/linux/signinfo.h. > > That's one convoluted mess. Yes. I tried to give it some love 2 days ago but my first attempt failed badly. Here is what I'm at now, but it's not quite ready for prime time: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/siginfo
Re: [patch 13/26] posix-timers: Rename do_schedule_next_timer
On Wed, 31 May 2017, Christoph Hellwig wrote: > On Tue, May 30, 2017 at 11:15:46PM +0200, Thomas Gleixner wrote: > > That function is a misnomer. Rename it with a proper prefix to > > posixtimer_rearm(). > > Please also move it out of asm-generic/siginfo.h as it's implemented > and used in generic code only, and there is no arch override at all. > > In fact it seems like asm-generic/siginfo.h should probably just move > to include/linux/signinfo.h. That's one convoluted mess. # find -name siginfo.h | xargs grep 'include.*siginfo.h' ./arch/score/include/uapi/asm/siginfo.h:#include ./arch/powerpc/include/uapi/asm/siginfo.h:#include ./arch/sparc/include/asm/siginfo.h:#include ./arch/sparc/include/uapi/asm/siginfo.h:#include ./arch/metag/include/uapi/asm/siginfo.h:#include ./arch/frv/include/uapi/asm/siginfo.h:#include ./arch/x86/include/uapi/asm/siginfo.h:#include ./arch/alpha/include/uapi/asm/siginfo.h:#include ./arch/tile/include/uapi/asm/siginfo.h:#include ./arch/mn10300/include/uapi/asm/siginfo.h:#include ./arch/m32r/include/uapi/asm/siginfo.h:#include ./arch/blackfin/include/uapi/asm/siginfo.h:#include ./arch/ia64/include/asm/siginfo.h:#include ./arch/ia64/include/uapi/asm/siginfo.h:#include ./arch/arm64/include/uapi/asm/siginfo.h:#include ./arch/parisc/include/uapi/asm/siginfo.h:#include ./arch/mips/include/uapi/asm/siginfo.h:#include ./arch/s390/include/uapi/asm/siginfo.h: * Derived from "include/asm-i386/siginfo.h" ./arch/s390/include/uapi/asm/siginfo.h:#include ./arch/microblaze/include/uapi/asm/siginfo.h:#include ./include/asm-generic/siginfo.h:#include Why the heck include uapi headers asm-generic/siginfo.h ??? Thanks, tglx
Re: [patch 13/26] posix-timers: Rename do_schedule_next_timer
On Wed, 31 May 2017, Christoph Hellwig wrote: > On Tue, May 30, 2017 at 11:15:46PM +0200, Thomas Gleixner wrote: > > That function is a misnomer. Rename it with a proper prefix to > > posixtimer_rearm(). > > Please also move it out of asm-generic/siginfo.h as it's implemented > and used in generic code only, and there is no arch override at all. > > In fact it seems like asm-generic/siginfo.h should probably just move > to include/linux/signinfo.h. That's one convoluted mess. # find -name siginfo.h | xargs grep 'include.*siginfo.h' ./arch/score/include/uapi/asm/siginfo.h:#include ./arch/powerpc/include/uapi/asm/siginfo.h:#include ./arch/sparc/include/asm/siginfo.h:#include ./arch/sparc/include/uapi/asm/siginfo.h:#include ./arch/metag/include/uapi/asm/siginfo.h:#include ./arch/frv/include/uapi/asm/siginfo.h:#include ./arch/x86/include/uapi/asm/siginfo.h:#include ./arch/alpha/include/uapi/asm/siginfo.h:#include ./arch/tile/include/uapi/asm/siginfo.h:#include ./arch/mn10300/include/uapi/asm/siginfo.h:#include ./arch/m32r/include/uapi/asm/siginfo.h:#include ./arch/blackfin/include/uapi/asm/siginfo.h:#include ./arch/ia64/include/asm/siginfo.h:#include ./arch/ia64/include/uapi/asm/siginfo.h:#include ./arch/arm64/include/uapi/asm/siginfo.h:#include ./arch/parisc/include/uapi/asm/siginfo.h:#include ./arch/mips/include/uapi/asm/siginfo.h:#include ./arch/s390/include/uapi/asm/siginfo.h: * Derived from "include/asm-i386/siginfo.h" ./arch/s390/include/uapi/asm/siginfo.h:#include ./arch/microblaze/include/uapi/asm/siginfo.h:#include ./include/asm-generic/siginfo.h:#include Why the heck include uapi headers asm-generic/siginfo.h ??? Thanks, tglx
Re: [patch 13/26] posix-timers: Rename do_schedule_next_timer
On Tue, May 30, 2017 at 11:15:46PM +0200, Thomas Gleixner wrote: > That function is a misnomer. Rename it with a proper prefix to > posixtimer_rearm(). Please also move it out of asm-generic/siginfo.h as it's implemented and used in generic code only, and there is no arch override at all. In fact it seems like asm-generic/siginfo.h should probably just move to include/linux/signinfo.h.
Re: [patch 13/26] posix-timers: Rename do_schedule_next_timer
On Tue, May 30, 2017 at 11:15:46PM +0200, Thomas Gleixner wrote: > That function is a misnomer. Rename it with a proper prefix to > posixtimer_rearm(). Please also move it out of asm-generic/siginfo.h as it's implemented and used in generic code only, and there is no arch override at all. In fact it seems like asm-generic/siginfo.h should probably just move to include/linux/signinfo.h.
[patch 13/26] posix-timers: Rename do_schedule_next_timer
That function is a misnomer. Rename it with a proper prefix to posixtimer_rearm(). Signed-off-by: Thomas Gleixner--- include/asm-generic/siginfo.h |2 +- kernel/signal.c|2 +- kernel/time/posix-cpu-timers.c |2 +- kernel/time/posix-timers.c | 10 +- 4 files changed, 8 insertions(+), 8 deletions(-) --- a/include/asm-generic/siginfo.h +++ b/include/asm-generic/siginfo.h @@ -15,7 +15,7 @@ #define __SI_CODE(T,N) ((T) | ((N) & 0x)) struct siginfo; -void do_schedule_next_timer(struct siginfo *info); +void posixtimer_rearm(struct siginfo *info); extern int copy_siginfo_to_user(struct siginfo __user *to, const struct siginfo *from); --- a/kernel/signal.c +++ b/kernel/signal.c @@ -629,7 +629,7 @@ int dequeue_signal(struct task_struct *t * about to disable them again anyway. */ spin_unlock(>sighand->siglock); - do_schedule_next_timer(info); + posixtimer_rearm(info); spin_lock(>sighand->siglock); } #endif --- a/kernel/time/posix-cpu-timers.c +++ b/kernel/time/posix-cpu-timers.c @@ -973,7 +973,7 @@ static void check_process_timers(struct } /* - * This is called from the signal code (via do_schedule_next_timer) + * This is called from the signal code (via posixtimer_rearm) * when the last timer signal was delivered and we have to reload the timer. */ void posix_cpu_timer_schedule(struct k_itimer *timer) --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -305,7 +305,7 @@ static void schedule_next_timer(struct k * To protect against the timer going away while the interrupt is queued, * we require that the it_requeue_pending flag be set. */ -void do_schedule_next_timer(struct siginfo *info) +void posixtimer_rearm(struct siginfo *info) { struct k_itimer *timr; unsigned long flags; @@ -336,12 +336,12 @@ int posix_timer_event(struct k_itimer *t int shared, ret = -1; /* * FIXME: if ->sigq is queued we can race with -* dequeue_signal()->do_schedule_next_timer(). +* dequeue_signal()->posixtimer_rearm(). * * If dequeue_signal() sees the "right" value of -* si_sys_private it calls do_schedule_next_timer(). +* si_sys_private it calls posixtimer_rearm(). * We re-queue ->sigq and drop ->it_lock(). -* do_schedule_next_timer() locks the timer +* posixtimer_rearm() locks the timer * and re-schedules it while ->sigq is pending. * Not really bad, but not that we want. */ @@ -701,7 +701,7 @@ SYSCALL_DEFINE2(timer_gettime, timer_t, * accumulating overruns on the next timer. The overrun is frozen when * the signal is delivered, either at the notify time (if the info block * is not queued) or at the actual delivery time (as we are informed by - * the call back to do_schedule_next_timer(). So all we need to do is + * the call back to posixtimer_rearm(). So all we need to do is * to pick up the frozen overrun. */ SYSCALL_DEFINE1(timer_getoverrun, timer_t, timer_id)
[patch 13/26] posix-timers: Rename do_schedule_next_timer
That function is a misnomer. Rename it with a proper prefix to posixtimer_rearm(). Signed-off-by: Thomas Gleixner --- include/asm-generic/siginfo.h |2 +- kernel/signal.c|2 +- kernel/time/posix-cpu-timers.c |2 +- kernel/time/posix-timers.c | 10 +- 4 files changed, 8 insertions(+), 8 deletions(-) --- a/include/asm-generic/siginfo.h +++ b/include/asm-generic/siginfo.h @@ -15,7 +15,7 @@ #define __SI_CODE(T,N) ((T) | ((N) & 0x)) struct siginfo; -void do_schedule_next_timer(struct siginfo *info); +void posixtimer_rearm(struct siginfo *info); extern int copy_siginfo_to_user(struct siginfo __user *to, const struct siginfo *from); --- a/kernel/signal.c +++ b/kernel/signal.c @@ -629,7 +629,7 @@ int dequeue_signal(struct task_struct *t * about to disable them again anyway. */ spin_unlock(>sighand->siglock); - do_schedule_next_timer(info); + posixtimer_rearm(info); spin_lock(>sighand->siglock); } #endif --- a/kernel/time/posix-cpu-timers.c +++ b/kernel/time/posix-cpu-timers.c @@ -973,7 +973,7 @@ static void check_process_timers(struct } /* - * This is called from the signal code (via do_schedule_next_timer) + * This is called from the signal code (via posixtimer_rearm) * when the last timer signal was delivered and we have to reload the timer. */ void posix_cpu_timer_schedule(struct k_itimer *timer) --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -305,7 +305,7 @@ static void schedule_next_timer(struct k * To protect against the timer going away while the interrupt is queued, * we require that the it_requeue_pending flag be set. */ -void do_schedule_next_timer(struct siginfo *info) +void posixtimer_rearm(struct siginfo *info) { struct k_itimer *timr; unsigned long flags; @@ -336,12 +336,12 @@ int posix_timer_event(struct k_itimer *t int shared, ret = -1; /* * FIXME: if ->sigq is queued we can race with -* dequeue_signal()->do_schedule_next_timer(). +* dequeue_signal()->posixtimer_rearm(). * * If dequeue_signal() sees the "right" value of -* si_sys_private it calls do_schedule_next_timer(). +* si_sys_private it calls posixtimer_rearm(). * We re-queue ->sigq and drop ->it_lock(). -* do_schedule_next_timer() locks the timer +* posixtimer_rearm() locks the timer * and re-schedules it while ->sigq is pending. * Not really bad, but not that we want. */ @@ -701,7 +701,7 @@ SYSCALL_DEFINE2(timer_gettime, timer_t, * accumulating overruns on the next timer. The overrun is frozen when * the signal is delivered, either at the notify time (if the info block * is not queued) or at the actual delivery time (as we are informed by - * the call back to do_schedule_next_timer(). So all we need to do is + * the call back to posixtimer_rearm(). So all we need to do is * to pick up the frozen overrun. */ SYSCALL_DEFINE1(timer_getoverrun, timer_t, timer_id)