Commit Graph

159381 Commits

Author SHA1 Message Date
Linus Walleij
73b6dbc7f7 sched: Drop all load weight manipulation for RT tasks
Load weights are for the CFS, they do not belong in the RT task. This makes all
RT scheduling classes leave the CFS weights alone.

This fixes a real bug as well: I noticed the following phonomena: a process
elevated to SCHED_RR forks with SCHED_RESET_ON_FORK set, and the child is
indeed SCHED_OTHER, and the niceval is indeed reset to 0. However the weight
inserted by set_load_weight() remains at 0, giving the task insignificat
priority.

With this fix, the weight is reset to what the task had before being elevated
to SCHED_RR/SCHED_FIFO.

Cc: Lennart Poettering <lennart@poettering.net>
Cc: stable@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1286807811-10568-1-git-send-email-linus.walleij@stericsson.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-02-03 08:43:57 -06:00
Mike Galbraith
71e0766675 sched: Add SCHED_RESET_ON_FORK functionality for nice < 0 tasks
Signed-off-by: Mike Galbraith <efault@gmx.de>
Acked-by: Lennart Poettering <mzxreary@0pointer.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1245228482.27326.1.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
(cherry picked from commit 6c697bdf08a09ce461e305a22362973036e95db3)
2011-02-03 08:26:52 -06:00
Mike Galbraith
f0cd3c30b2 sched: Clean up SCHED_RESET_ON_FORK
Make SCHED_RESET_ON_FORK sched_fork() bits a self-contained unlikely code path.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Acked-by: Lennart Poettering <mzxreary@0pointer.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1245228361.18329.6.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
(cherry picked from commit b9dc29e72fd3dc2a739ce8eafd958220d0745734)
2011-02-03 08:26:31 -06:00
Lennart Poettering
29d449ffbc sched: Introduce SCHED_RESET_ON_FORK scheduling policy flag
This patch introduces a new flag SCHED_RESET_ON_FORK which can be passed
to the kernel via sched_setscheduler(), ORed in the policy parameter. If
set this will make sure that when the process forks a) the scheduling
priority is reset to DEFAULT_PRIO if it was higher and b) the scheduling
policy is reset to SCHED_NORMAL if it was either SCHED_FIFO or SCHED_RR.

Why have this?

Currently, if a process is real-time scheduled this will 'leak' to all
its child processes. For security reasons it is often (always?) a good
idea to make sure that if a process acquires RT scheduling this is
confined to this process and only this process. More specifically this
makes the per-process resource limit RLIMIT_RTTIME useful for security
purposes, because it makes it impossible to use a fork bomb to
circumvent the per-process RLIMIT_RTTIME accounting.

This feature is also useful for tools like 'renice' which can then
change the nice level of a process without having this spill to all its
child processes.

Why expose this via sched_setscheduler() and not other syscalls such as
prctl() or sched_setparam()?

prctl() does not take a pid parameter. Due to that it would be
impossible to modify this flag for other processes than the current one.

The struct passed to sched_setparam() can unfortunately not be extended
without breaking compatibility, since sched_setparam() lacks a size
parameter.

How to use this from userspace? In your RT program simply replace this:

  sched_setscheduler(pid, SCHED_FIFO, &param);

by this:

  sched_setscheduler(pid, SCHED_FIFO|SCHED_RESET_ON_FORK, &param);

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090615152714.GA29092@tango.0pointer.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
(cherry picked from commit ca94c442535a44d508c99a77e54f21a59f4fc462)
2011-02-03 08:25:26 -06:00
Saleem Abdulrasool
fc88ab894a sbs: better macro names 2011-02-01 23:05:25 -08:00
Saleem Abdulrasool
b31ad5bebf sbs: log information for relearn cycle requests and !initialised states 2011-02-01 22:45:57 -08:00
Saleem Abdulrasool
d6bc5bf05f sbs: add delayed work to refresh the data 2011-02-01 21:15:31 -08:00
Saleem Abdulrasool
ba4bddc525 sbs: change timeout to 10s 2011-02-01 21:08:28 -08:00
Matt Sealey
4a29415639 mtl017: fix some build warnings 2011-02-01 21:33:06 -06:00
Matt Sealey
c11ec49aac backlight: reduce number of levels for backlight, add in power hook support 2011-02-01 19:52:49 -06:00
Matt Sealey
9fe867f10d backlight: implement backlight power on/off and power state tracking 2011-02-01 19:52:09 -06:00
Matt Sealey
93b58cfb3d backlight: add power management hook to pwm backlight platform data 2011-02-01 19:51:33 -06:00
Matt Sealey
816d426d45 sb: remove unused platform data for display for DI0 as it's unused 2011-02-01 15:54:39 -06:00
Matt Sealey
0a117b10c5 Revert "sb: remove redundant DI0 mode since it's not used."
This reverts commit f65e9384d5.
2011-02-01 06:32:33 -06:00
Matt Sealey
0fb5fdc51b modedb: remove CEA modes from the standard list, and add #4 to the CEA list. Strip the really weirdo SVDs and interlaced modes. 2011-01-31 03:57:51 -06:00
Matt Sealey
4c35807736 siihdmi: cull modes with inadequate lower_margin rather than vsync_len 2011-01-31 03:06:19 -06:00
Matt Sealey
a58fa782d3 siihdmi: support the new fb_edid_add_monspecs function by passing it extensions
produces some odd behavior and some odd modes added, but our culling code is
adequately removing the weird stuff by fluke. Yay.
2011-01-30 21:09:50 -06:00
Matt Sealey
f65e9384d5 sb: remove redundant DI0 mode since it's not used. 2011-01-30 21:08:58 -06:00
Guennadi Liakhovetski
08235ab815 fbdev: when parsing E-EDID blocks, also use SVD entries
Add parsing of E-EDID SVD entries. In this first version only a few
CEA/EIA-861E modes are implemented, more can be added as needed.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-30 20:37:06 -06:00
Guennadi Liakhovetski
39274f9d7c fbdev: export fb_edid_add_monspecs() for modules, improve algorithm
fb_edid_add_monspecs() should also be exported for use in modules, and it
requires a dummy version for the case, when CONFIG_FB_MODE_HELPERS is not
selected. This patch also improves the algorithm by removing a redundant
memory allocation, adds function documentation, adds data verification and
replaces memmove() with memcpy().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-30 20:36:53 -06:00
Erik Gilling
4779967299 video: add fb_edid_add_monspecs for parsing extended edid information
Modern monitors/tvs have more extended EDID information blocks which can
contain extra detailed modes.  This adds a fb_edid_add_monspecs function
which drivers can use to parse those additions blocks.

Signed-off-by: Erik Gilling <konkers@android.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-30 20:36:28 -06:00
Matt Sealey
f0100e2ab7 config,mx: update for new battery and synaptics (disable for desktop) 2011-01-30 15:37:19 -06:00
Saleem Abdulrasool
ef41ea5e36 siihdmi: fix hotplug resource definition
IORESOURCE_IRQ_HIGHEDGE is active low, it should be IORESOURCE_IRQ_LOWEDGE
2011-01-30 13:24:47 -08:00
Saleem Abdulrasool
5e80a986dd siihdmi: remove siihdmi_ps_to_hz in favour of PICOS2KHZ 2011-01-30 13:22:36 -08:00
Saleem Abdulrasool
c5a3079b84 siihdmi: fix interrupt handler 2011-01-30 13:03:58 -08:00
Saleem Abdulrasool
e3219471bd siihdmi: siihdmi_init_fb -> siihdmi_setup_display 2011-01-30 13:03:26 -08:00
Saleem Abdulrasool
ffb135860c siihdmi: tx -> D3 if !sink 2011-01-30 13:02:32 -08:00
Saleem Abdulrasool
4278ca1df0 siihdmi: clear AVI InfoFrame for DVI 2011-01-30 11:57:19 -08:00
Saleem Abdulrasool
883606b612 siihdmi: style 2011-01-30 11:57:18 -08:00
Saleem Abdulrasool
7d2a2137f8 siihdmi: fix printf string 2011-01-30 11:57:18 -08:00
Saleem Abdulrasool
82d7751991 siihdmi: the deferred timeout is not a settle period 2011-01-30 11:57:00 -08:00
Saleem Abdulrasool
4dfc578385 siihdmi: cleanup hotplug initialisation codepath 2011-01-30 01:21:06 -08:00
Saleem Abdulrasool
b5c1c5277f siihdmi: upgrade some debug to warning/error 2011-01-30 01:13:47 -08:00
Saleem Abdulrasool
55034cc99c siihdmi: style 2011-01-30 00:29:29 -08:00
Saleem Abdulrasool
7947d19306 siihdmi: log error reason when trying to register hotplug IRQ handler 2011-01-30 00:29:28 -08:00
Saleem Abdulrasool
8c048724e7 siihdmi: remove unnecessary passing of struct fb_info * 2011-01-30 00:29:28 -08:00
Saleem Abdulrasool
cdba556632 siihdmi: remove unnecessary log spew 2011-01-30 00:29:27 -08:00
Saleem Abdulrasool
254c0d583d siihdmi: fix for operator precedence 2011-01-30 00:29:26 -08:00
Saleem Abdulrasool
f1b420c6e5 siihdmi: checksum edid blocks 2011-01-30 00:29:25 -08:00
Saleem Abdulrasool
e662ceb086 siihdmi: prettier output 2011-01-30 00:29:25 -08:00
Saleem Abdulrasool
38a89ac217 cea861: vsdb is entirely opaque 2011-01-30 00:29:24 -08:00
Saleem Abdulrasool
ec9fa83266 siihdmi: rework edid exporting to userspace 2011-01-30 00:29:23 -08:00
Saleem Abdulrasool
464c35b5f6 siihdmi: style 2011-01-30 00:29:23 -08:00
Saleem Abdulrasool
5dd29cec57 siihdmi: use struct resource over int for irq 2011-01-30 00:29:22 -08:00
Saleem Abdulrasool
47f43e08a4 sbs: define additional chemistries 2011-01-29 20:58:09 -08:00
Saleem Abdulrasool
d08f0d6429 edid: a few minor fixes for edid header 2011-01-29 20:58:09 -08:00
Saleem Abdulrasool
663b36a881 platform: fix up warnings due to unused variables 2011-01-29 20:58:08 -08:00
Saleem Abdulrasool
4655f71d0f sbs: add support for presence/alert IRQs 2011-01-29 20:58:08 -08:00
Saleem Abdulrasool
bbd965e08c sbs: initialise the returned value for mains 2011-01-29 15:52:26 -08:00
Saleem Abdulrasool
848faa6023 sbs: check function pointer before actually using it 2011-01-29 15:52:26 -08:00