[PATCH 1/9] sched: test below 0 on unsigned sysctl_sched_rt_period



Peter, you added the test in global_rt_runtime(), in commit
d0b27fa77854b149ad4af08b0fe47fe712a47ade
could you take a look at it and tell whether this test should
be replaced by something else?

The patch was only checkpatch tested
---
sysctl_sched_rt_period is unsigned so the test doesn't work.
state_filter is an unsigned long so the test didn't work

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
diff --git a/kernel/sched.c b/kernel/sched.c
index 99e6d85..2030340 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -832,9 +832,6 @@ static inline u64 global_rt_period(void)

static inline u64 global_rt_runtime(void)
{
- if (sysctl_sched_rt_period < 0)
- return RUNTIME_INF;
-
return (u64)sysctl_sched_rt_runtime * NSEC_PER_USEC;
}

@@ -5707,7 +5704,7 @@ void show_state_filter(unsigned long state_filter)
/*
* Only show locks if all tasks are dumped:
*/
- if (state_filter == -1)
+ if (state_filter == -1ul)
debug_show_all_locks();
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Row-X (SX) lock on materialized view
    ... :>: refresh logs to check against. ... :> I have been asked to check why an application has locking issues, ... :> One key table typically has a dozen row locks (users editing in the main ... The commit merely means it ...
    (comp.databases.oracle.misc)
  • Re: Repeatable read. What is it exactly...
    ... SQL Server will hold locks on the data you have read ... can change change the data until you commit or rollback. ... SQL Server locks the data you read. ... > as transaction Isolation levels go. ...
    (microsoft.public.sqlserver.server)
  • Re: Behavior of Connection.commit()
    ... the DBMS message when when the DBMS has already killed the whole tx, and in that case, throw an exception from any subsequent connection, statement or result set method that would/could do an update or query saying "The DBMS has killed the current transaction. ... The user application may depend on holding locks in order, and once it is allowed to proceed obtaining the lock for data 2, it may then go on to obtain other locks before trying to commit, and this not-expected order of locking may cause deadlocks that could kill other innocent, correct transactions. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: MM kernels 2.6.24-rc*-mm*, 2.6.24-mm1: gnome-terminal stuck in tty_poll
    ... Over a couple of days I bisected it down to this commit: ... This fully untangles hrtimer locks from the scheduler locks, ...
    (Linux-Kernel)
  • Re: MM kernels 2.6.24-rc*-mm*, 2.6.24-mm1: gnome-terminal stuck in tty_poll
    ... Over a couple of days I bisected it down to this commit: ... This fully untangles hrtimer locks from the scheduler locks, ... Try reverting that patch and see if your gnome-terminal freezes go away. ...
    (Linux-Kernel)