aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-05-29backlight: tosa_lcd: use devm_ functionsJingoo Han1-5/+3
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc of these functions. Signed-off-by: Jingoo Han <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: tosa_bl: use devm_ functionsJingoo Han1-6/+5
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc of these functions. Signed-off-by: Jingoo Han <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: tdo24m: use devm_ functionsJingoo Han1-15/+6
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc of these functions. Signed-off-by: Jingoo Han <[email protected]> Cc: Eric Miao <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: s6e63m0: use devm_ functionsJingoo Han1-10/+5
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc of these functions. Signed-off-by: Jingoo Han <[email protected]> Cc: InKi Dae <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: ltv350qv: use devm_ functionsJingoo Han1-16/+7
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc of these functions. Signed-off-by: Jingoo Han <[email protected]> Cc: Haavard Skinnemoen <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: lms283gf05: use devm_ functionsJingoo Han1-6/+3
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc of these functions. Signed-off-by: Jingoo Han <[email protected]> Acked-by: Marek Vasut <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: ld9040: use devm_ functionsJingoo Han1-8/+6
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc of these functions. Signed-off-by: Jingoo Han <[email protected]> Cc: Donghwa Lee <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: l4f00242t03: use devm_ functionsJingoo Han1-14/+11
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc of these functions. Signed-off-by: Jingoo Han <[email protected]> Cc: Alberto Panizzo <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: ili9320: use devm_ functionsJingoo Han1-7/+2
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc of these functions. Signed-off-by: Jingoo Han <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: corgi_lcd: use devm_ functionsJingoo Han1-8/+4
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc of these functions. Signed-off-by: Jingoo Han <[email protected]> Cc: Eric Miao <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: ams369fg06: use devm_ functionsJingoo Han1-10/+5
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc of these functions. Signed-off-by: Jingoo Han <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: adp8870: use devm_ functionsJingoo Han1-15/+7
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc of these functions. Signed-off-by: Jingoo Han <[email protected]> Acked-by: Michael Hennerich <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: adp8860: use devm_ functionsJingoo Han1-15/+7
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc of these functions. Signed-off-by: Jingoo Han <[email protected]> Acked-by: Michael Hennerich <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: initialize struct backlight_properties properlyCorentin Chary5-0/+5
In all these files, the .power field was never correctly initialized. Signed-off-by: Corentin Chary <[email protected]> Cc: Jingoo Han <[email protected]> Cc: Dave Airlie <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29drivers/video/backlight/l4f00242t03.c: use pr_fmtJingoo Han1-0/+2
This driver uses pr_debug(), so provide it with the appropriate prefixing. Signed-off-by: Jingoo Han <[email protected]> Cc: Alberto Panizzo <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: progear: use pr_err() instead of printk()Jingoo Han1-2/+4
Use pr_err() instead of printk() to allow dynamic debugging. The pr_fmt prefix for pr_ macros is used. Also fix checkpatch warnings as below: WARNING: printk() should include KERN_ facility level [[email protected]: use KBUILD_MODNAME, per Joe] Signed-off-by: Jingoo Han <[email protected]> Cc: Marcin Juszkiewicz <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: omap1: use pr_info() instead of printk()Jingoo Han1-1/+3
Use pr_info() instead of printk() to allow dynamic debugging. The pr_fmt prefix for pr_ macros is used. Also fix checkpatch warning as below: WARNING: Prefer pr_info(... to printk(KERN_INFO, ... [[email protected]: use KBUILD_MODNAME, per Joe] Signed-off-by: Jingoo Han <[email protected]> Cc: Andrzej Zaborowski <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: jornada720: use pr_err()/pr_info() instead of printk()Jingoo Han2-9/+13
Use pr_err()/pr_info() instead of printk() to allow dynamic debugging. The pr_fmt prefix for pr_ macros is used. Also fix checkpatch warnings as below: WARNING: Prefer pr_err(... to printk(KERN_ERR, ... WARNING: Prefer pr_info(... to printk(KERN_INFO, ... [[email protected]: use KBUILD_MODNAME, per Joe] Signed-off-by: Jingoo Han <[email protected]> Acked-by: Kristoffer Ericson <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: generic_bl: use pr_info() instead of printk()Jingoo Han1-2/+4
Use pr_info() instead of printk() to allow dynamic debugging. The pr_fmt prefix for pr_ macros is used. Also fix checkpatch warnings as below: WARNING: printk() should include KERN_ facility level [[email protected]: use KBUILD_MODNAME, per Joe] Signed-off-by: Jingoo Han <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: cr_bllcd: use pr_err()/pr_info() instead of printk()Jingoo Han1-4/+5
Use pr_err()/pr_info() instead of printk() to allow dynamic debugging. The pr_fmt prefix for pr_ macros is used. Also fix checkpatch warnings as below: WARNING: printk() should include KERN_ facility level WARNING: Prefer pr_err(... to printk(KERN_ERR, ... [[email protected]: use KBUILD_MODNAME, per Joe] Signed-off-by: Jingoo Han <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: apple_bl: use pr_debug()/pr_err() instead of printk()Jingoo Han1-12/+8
Use pr_debug()/pr_err() instead of printk() to allow dynamic debugging. The pr_fmt prefix for pr_ macros is used. Also fix checkpatch warnings as below: WARNING: Prefer pr_debug(... to printk(KERN_DEBUG, ... WARNING: Prefer pr_err(... to printk(KERN_ERR, ... [[email protected]: use KBUILD_MODNAME, per Joe] Signed-off-by: Jingoo Han <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: use pr_warn() and pr_debug() instead of printk()Jingoo Han2-9/+12
Use pr_warn() and pr_debug() instead of printk to allow dynamic debugging. The pr_fmt prefix for pr_ macros is used. Also fix checkpatch warnings as below: WARNING: Prefer pr_warn(... to printk(KERN_WARNING, ... [[email protected]: use KBUILD_MODNAME, per Joe] Signed-off-by: Jingoo Han <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29drivers/video/backlight/adp5520_bl.c: use kstrtoul()Jingoo Han1-2/+2
The usage of strict_strtoul() is not preferred. Thus, kstrtoul should be used. Signed-off-by: Jingoo Han <[email protected]> Cc: Michael Hennerich <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29drivers/video/backlight/adp8870_bl.c: use kstrtoul()Jingoo Han1-3/+3
The usage of strict_strtoul() is not preferred. Thus, kstrtoul should be used. Signed-off-by: Jingoo Han <[email protected]> Cc: Michael Hennerich <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29drivers/video/backlight/adp8860_bl.c: use kstrtoul()Jingoo Han1-3/+3
The usage of strict_strtoul() is not preferred. Thus, kstrtoul should be used. Signed-off-by: Jingoo Han <[email protected]> Cc: Michael Hennerich <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29backlight: add LM3533 backlight driverJohan Hovold4-0/+484
Add sub-driver for the backlights on National Semiconductor / TI LM3533 lighting power chips. The chip provides 256 brightness levels and ambient-light-sensor and pwm input control. [[email protected]: fix warning] [[email protected]: fix the type of `mode'] Signed-off-by: Johan Hovold <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Rob Landley <[email protected]> Cc: Samuel Ortiz <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Florian Tobias Schandinat <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Mark Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29drivers/video/backlight/apple_bl.c: include header for exported symbol ↵H Hartley Sweeten2-1/+2
prototypes Include the header to pickup the exported symbol prototype. Quiets the sparse warning: warning: symbol 'apple_bl_register' was not declared. Should it be static? warning: symbol 'apple_bl_unregister' was not declared. Should it be static? [[email protected]: fix resulting build error] Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Florian Tobias Schandinat <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29lcd: add callbacks for early fb event blank supportInki Dae2-0/+20
This patchset adds early fb blank feature that a callback of lcd panel driver is called prior to specific fb driver's one. In the case of MIPI-DSI based video mode LCD Panel, for lcd power off, the power off commands should be transferred to lcd panel with display and mipi-dsi controller enabled because the commands is set to lcd panel at vsync porch period. and in opposite case, the callback of fb driver should be called prior to lcd panel driver's one because of same issue. Also if fb_blank mode is changed to FB_BLANK_POWERDOWN then display controller would be off(clock disable) but lcd panel would be still on. at this time, you could see some issue like sparkling on lcd panel because video clock to be delivered to ldi module of lcd panel was disabled. this issue could occurs for all lcd panels. The callback order is as the following: at fb_blank function of fbmem.c -> fb_notifier_call_chain(FB_EARLY_EVENT_BLANK) -> lcd panel driver's early_set_power() -> info->fbops->fb_blank() -> spcefic fb driver's fb_blank() -> fb_notifier_call_chain(FB_EVENT_BLANK) -> lcd panel driver's set_power() -> fb_notifier_call_chain(FB_R_EARLY_EVENT_BLANK) if info->fops->fb_blank() was failed. fb_notifier_call_chain(FB_R_EARLY_EVENT_BLANK) would be called to revert the effects of previous FB_EARLY_EVENT_BLANK call. and note that if early_set_power() of lcd_ops is NULL then early fb blank callback would be ignored. This patch: Add early_set_power and r_early_set_power callbacks. early_set_power callback is called prior to fb_blank() of fbmem.c and r_early_set_power callback is called if fb_blank() was failed to revert the effects of the early_set_power call of lcd panel driver. Signed-off-by: Inki Dae <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Cc: Lars-Peter Clausen <[email protected]> Cc: Florian Tobias Schandinat <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29fbdev: add events for early fb event supportInki Dae2-6/+19
Add FB_EARLY_EVENT_BLANK and FB_R_EARLY_EVENT_BLANK event mode supports. first, fb_notifier_call_chain() is called with FB_EARLY_EVENT_BLANK and fb_blank() of specific fb driver is called and then fb_notifier_call_chain() is called with FB_EVENT_BLANK again at fb_blank(). and if fb_blank() was failed then fb_nitifier_call_chain() would be called with FB_R_EARLY_EVENT_BLANK to revert the previous effects. Signed-off-by: Inki Dae <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Cc: Lars-Peter Clausen <[email protected]> Acked-by: Florian Tobias Schandinat <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29blacklight: remove redundant spi driver bus initializationLars-Peter Clausen4-4/+0
In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_driver_register() so we can drop the manual assignment. The patch was generated using the following coccinelle semantic patch: // <smpl> @@ identifier _driver; @@ struct spi_driver _driver = { .driver = { - .bus = &spi_bus_type, }, }; // </smpl> Signed-off-by: Lars-Peter Clausen <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29MAINTAINERS: remove AlessandroAlessandro Rubini1-6/+0
I'm definitely not up to date on the subject matter any more and haven't been able to comment on the messages on the topic. Signed-off-by: Alessandro Rubini <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29hamradio/scc: orphan driver in MAINTAINERSUwe Kleine-König1-3/+1
The email address doesn't exist anymore and the website yields a 404. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29memcg: decrement static keys at real destroy timeGlauber Costa3-9/+78
We call the destroy function when a cgroup starts to be removed, such as by a rmdir event. However, because of our reference counters, some objects are still inflight. Right now, we are decrementing the static_keys at destroy() time, meaning that if we get rid of the last static_key reference, some objects will still have charges, but the code to properly uncharge them won't be run. This becomes a problem specially if it is ever enabled again, because now new charges will be added to the staled charges making keeping it pretty much impossible. We just need to be careful with the static branch activation: since there is no particular preferred order of their activation, we need to make sure that we only start using it after all call sites are active. This is achieved by having a per-memcg flag that is only updated after static_key_slow_inc() returns. At this time, we are sure all sites are active. This is made per-memcg, not global, for a reason: it also has the effect of making socket accounting more consistent. The first memcg to be limited will trigger static_key() activation, therefore, accounting. But all the others will then be accounted no matter what. After this patch, only limited memcgs will have its sockets accounted. [[email protected]: move enum sock_flag_bits into sock.h, document enum sock_flag_bits, convert memcg_proto_active() and memcg_proto_activated() to test_bit(), redo tcp_update_limit() comment to 80 cols] Signed-off-by: Glauber Costa <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Li Zefan <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Michal Hocko <[email protected]> Acked-by: David Miller <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29memcg: always free struct memcg through schedule_work()Glauber Costa1-11/+13
Right now we free struct memcg with kfree right after a rcu grace period, but defer it if we need to use vfree() to get rid of that memory area. We do that by need, because we need vfree to be called in a process context. This patch unifies this behavior, by ensuring that even kfree will happen in a separate thread. The goal is to have a stable place to call the upcoming jump label destruction function outside the realm of the complicated and quite far-reaching cgroup lock (that can't be held when holding either the cpu_hotplug.lock or jump_label_mutex) [[email protected]: tweak comment] Signed-off-by: Glauber Costa <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Li Zefan <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Johannes Weiner <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: David Miller <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29mm/memcg: apply add/del_page to lruvecHugh Dickins8-181/+122
Take lruvec further: pass it instead of zone to add_page_to_lru_list() and del_page_from_lru_list(); and pagevec_lru_move_fn() pass lruvec down to its target functions. This cleanup eliminates a swathe of cruft in memcontrol.c, including mem_cgroup_lru_add_list(), mem_cgroup_lru_del_list() and mem_cgroup_lru_move_lists() - which never actually touched the lists. In their place, mem_cgroup_page_lruvec() to decide the lruvec, previously a side-effect of add, and mem_cgroup_update_lru_size() to maintain the lru_size stats. Whilst these are simplifications in their own right, the goal is to bring the evaluation of lruvec next to the spin_locking of the lrus, in preparation for a future patch. Signed-off-by: Hugh Dickins <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: Konstantin Khlebnikov <[email protected]> Cc: Johannes Weiner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29mm: trivial cleanups in vmscan.cHugh Dickins1-21/+10
Utter trivia in mm/vmscan.c, mostly just reducing the linecount slightly; most exciting change being get_scan_count() calling vmscan_swappiness() once instead of twice. Signed-off-by: Hugh Dickins <[email protected]> Acked-by: KOSAKI Motohiro <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Acked-by: Konstantin Khlebnikov <[email protected]> Reviewed-by: Michal Hocko <[email protected]> Cc: Johannes Weiner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29mm/memcg: get_lru_size not get_lruvec_sizeHugh Dickins3-17/+16
Konstantin just introduced mem_cgroup_get_lruvec_size() and get_lruvec_size(), I'm about to add mem_cgroup_update_lru_size(): but we're dealing with the same thing, lru_size[lru]. We ought to agree on the naming, and I do think lru_size is the more correct: so rename his ones to get_lru_size(). Signed-off-by: Hugh Dickins <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Acked-by: Konstantin Khlebnikov <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Johannes Weiner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29mm: memcg: print statistics from live countersJohannes Weiner1-102/+66
Directly print statistics and event counters instead of going through an intermediate accumulation stage into a separate array, which used to require defining statistic items in more than one place. [[email protected]: checkpatch fixes] Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Ying Han <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29mm: memcg: group swapped-out statistics counter logicallyJohannes Weiner1-2/+2
The counter of currently swapped out pages in a memcg (hierarchy) is sitting amidst ever-increasing event counters. Move this item to the other counters that reflect current state rather than history. This technically breaks the kernel ABI, but hopefully nobody relies on the order of items in memory.stat. Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Ying Han <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29mm: memcg: keep ratelimit counter separate from event countersJohannes Weiner1-3/+3
All events except the ratelimit counter are statistics exported to userspace. Keep this internal value out of the event count array. Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Ying Han <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29mm: memcg: print statistics directly to seq_fileJohannes Weiner1-28/+27
Being able to use seq_printf() allows being smarter about statistics name strings, which are currently listed twice, with the only difference being a "total_" prefix on the hierarchical version. Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Ying Han <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29mm: memcg: convert numa stat to read_seq_string interfaceJohannes Weiner1-20/+3
Instead of using the raw seq_file file interface, switch over to the read_seq_string cftype callback and let cgroup core code set up the seq_file. Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Ying Han <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29mm: memcg: remove obsolete statistics array boundary enum itemJohannes Weiner1-2/+1
MEM_CGROUP_STAT_DATA is a leftover from when item counters were living in the same array as ever-increasing event counters. It's no longer needed, use MEM_CGROUP_STAT_NSTATS to iterate over the stat array. Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Ying Han <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29rescounter: remove __must_check from res_counter_charge_nofail()Glauber Costa1-1/+1
Since we will succeed with the allocation no matter what, there isn't a need to use __must_check with it. It can very well be optional. Signed-off-by: Glauber Costa <[email protected]> Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Aneesh Kumar K.V <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ying Han <[email protected]> Reviewed-by: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29memcg: don't uncharge in mem_cgroup_move_account()KAMEZAWA Hiroyuki1-14/+6
Now, all callers pass 'false' for 'bool uncharge' so remove this argument. Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Aneesh Kumar K.V <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ying Han <[email protected]> Cc: Glauber Costa <[email protected]> Reviewed-by: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29memcg: move charges to root cgroup if use_hierarchy=0KAMEZAWA Hiroyuki2-28/+19
Presently, at removal of cgroup, ->pre_destroy() is called and moves charges to the parent cgroup. A major reason for returning -EBUSY from ->pre_destroy() is that the 'moving' hits the parent's resource limitation. It happens only when use_hierarchy=0. Considering use_hierarchy=0, all cgroups should be flat. So, no one cannot justify moving charges to parent...parent and children are in flat configuration, not hierarchical. This patch modifes the code to move charges to the root cgroup at rmdir/force_empty if use_hierarchy==0. This will much simplify rmdir() and reduce error in ->pre_destroy. Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Aneesh Kumar K.V <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ying Han <[email protected]> Cc: Glauber Costa <[email protected]> Reviewed-by: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29memcg: use res_counter_uncharge_until() in move_parent()KAMEZAWA Hiroyuki1-6/+36
By using res_counter_uncharge_until(), we can avoid race and unnecessary charging. Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Aneesh Kumar K.V <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ying Han <[email protected]> Cc: Glauber Costa <[email protected]> Reviewed-by: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29rescounters: add res_counter_uncharge_until()Frederic Weisbecker3-2/+19
When killing a res_counter which is a child of other counter, we need to do res_counter_uncharge(child, xxx) res_counter_charge(parent, xxx) This is not atomic and wastes CPU. This patch adds res_counter_uncharge_until(). This function's uncharge propagates to ancestors until specified res_counter. res_counter_uncharge_until(child, parent, xxx) Now the operation is atomic and efficient. Signed-off-by: Frederic Weisbecker <[email protected]> Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Aneesh Kumar K.V <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Ying Han <[email protected]> Cc: Glauber Costa <[email protected]> Reviewed-by: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29mm/vmscan: kill struct mem_cgroup_zoneKonstantin Khlebnikov1-20/+6
Kill struct mem_cgroup_zone and rename shrink_mem_cgroup_zone() to shrink_lruvec(), it always shrinks one lruvec which it takes as an argument. Signed-off-by: Konstantin Khlebnikov <[email protected]> Cc: Mel Gorman <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Acked-by: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-05-29mm/vmscan: push lruvec pointer into should_continue_reclaim()Konstantin Khlebnikov1-5/+3
Signed-off-by: Konstantin Khlebnikov <[email protected]> Cc: Mel Gorman <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Acked-by: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>