History

Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton: "8 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: mm, numa: really disable NUMA balancing by default on single node machines MAINTAINERS: update Jingoo Han's email address CMA: page_isolation: check buddy before accessing it uidgid: make uid_valid and gid_valid work with !CONFIG_MULTIUSER kernfs: do not account ino_ida allocations to memcg gfp: add __GFP_NOACCOUNT tools/vm: fix page-flags build drivers/rtc/rtc-armada38x.c: remove unused local `flags'

Linus Torvalds committed 11 years ago

Commit 03361042 parents f0897f4 b0dc2b910 files · +28 −13Browse files

Unified · Split

10 files
  1. MAINTAINERS +5 −5
  2. drivers/rtc/rtc-armada38x.c +1 −1
  3. fs/kernfs/dir.c +8 −1
  4. include/linux/gfp.h +2 −0
  5. include/linux/memcontrol.h +4 −0
  6. include/linux/uidgid.h +2 −2
  7. mm/kmemleak.c +2 −1
  8. mm/mempolicy.c +1 −1
  9. mm/page_isolation.c +2 −1
  10. tools/vm/Makefile +1 −1
MAINTAINERS+5−5
@@ -1935,7 +1935,7 @@ S: Maintained · 1934 unmodified lines
1935F: drivers/net/wireless/b43legacy/1935F: drivers/net/wireless/b43legacy/
1936 1936
1937BACKLIGHT CLASS/SUBSYSTEM1937BACKLIGHT CLASS/SUBSYSTEM
1938M: Jingoo Han <jg1.han@samsung.com>1938M: Jingoo Han <jingoohan1@gmail.com>
1939M: Lee Jones <lee.jones@linaro.org>1939M: Lee Jones <lee.jones@linaro.org>
1940S: Maintained1940S: Maintained
1941F: drivers/video/backlight/1941F: drivers/video/backlight/
@@ -3918,7 +3918,7 @@ F: drivers/extcon/ · 1976 unmodified lines
3918F: Documentation/extcon/3918F: Documentation/extcon/
3919 3919
3920EXYNOS DP DRIVER3920EXYNOS DP DRIVER
3921M: Jingoo Han <jg1.han@samsung.com>3921M: Jingoo Han <jingoohan1@gmail.com>
3922L: dri-devel@lists.freedesktop.org3922L: dri-devel@lists.freedesktop.org
3923S: Maintained3923S: Maintained
3924F: drivers/gpu/drm/exynos/exynos_dp*3924F: drivers/gpu/drm/exynos/exynos_dp*
@@ -7557,7 +7557,7 @@ S: Maintained · 3632 unmodified lines
7557F: drivers/pci/host/*rcar*7557F: drivers/pci/host/*rcar*
7558 7558
7559PCI DRIVER FOR SAMSUNG EXYNOS7559PCI DRIVER FOR SAMSUNG EXYNOS
7560M: Jingoo Han <jg1.han@samsung.com>7560M: Jingoo Han <jingoohan1@gmail.com>
7561L: linux-pci@vger.kernel.org7561L: linux-pci@vger.kernel.org
7562L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)7562L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
7563L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)7563L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
@@ -7565,7 +7565,7 @@ S: Maintained · 1 unmodified line
7565F: drivers/pci/host/pci-exynos.c7565F: drivers/pci/host/pci-exynos.c
7566 7566
7567PCI DRIVER FOR SYNOPSIS DESIGNWARE7567PCI DRIVER FOR SYNOPSIS DESIGNWARE
7568M: Jingoo Han <jg1.han@samsung.com>7568M: Jingoo Han <jingoohan1@gmail.com>
7569L: linux-pci@vger.kernel.org7569L: linux-pci@vger.kernel.org
7570S: Maintained7570S: Maintained
7571F: drivers/pci/host/*designware*7571F: drivers/pci/host/*designware*
@@ -8521,7 +8521,7 @@ S: Supported · 949 unmodified lines
8521F: sound/soc/samsung/8521F: sound/soc/samsung/
8522 8522
8523SAMSUNG FRAMEBUFFER DRIVER8523SAMSUNG FRAMEBUFFER DRIVER
8524M: Jingoo Han <jg1.han@samsung.com>8524M: Jingoo Han <jingoohan1@gmail.com>
8525L: linux-fbdev@vger.kernel.org8525L: linux-fbdev@vger.kernel.org
8526S: Maintained8526S: Maintained
8527F: drivers/video/fbdev/s3c-fb.c8527F: drivers/video/fbdev/s3c-fb.c
drivers/rtc/rtc-armada38x.c+1−1
@@ -64,7 +64,7 @@ static void rtc_delayed_write(u32 val, struct armada38x_rtc *rtc, int offset) · 63 unmodified lines
64static int armada38x_rtc_read_time(struct device *dev, struct rtc_time *tm)64static int armada38x_rtc_read_time(struct device *dev, struct rtc_time *tm)
65{65{
66 struct armada38x_rtc *rtc = dev_get_drvdata(dev);66 struct armada38x_rtc *rtc = dev_get_drvdata(dev);
67 unsigned long time, time_check, flags;67 unsigned long time, time_check;
68 68
69 mutex_lock(&rtc->mutex_time);69 mutex_lock(&rtc->mutex_time);
70 time = readl(rtc->regs + RTC_TIME);70 time = readl(rtc->regs + RTC_TIME);
fs/kernfs/dir.c+8−1
@@ -518,7 +518,14 @@ static struct kernfs_node *__kernfs_new_node(struct kernfs_root *root, · 517 unmodified lines
518 if (!kn)518 if (!kn)
519 goto err_out1;519 goto err_out1;
520 520
521 ret = ida_simple_get(&root->ino_ida, 1, 0, GFP_KERNEL);521 /*
522 * If the ino of the sysfs entry created for a kmem cache gets
523 * allocated from an ida layer, which is accounted to the memcg that
524 * owns the cache, the memcg will get pinned forever. So do not account
525 * ino ida allocations.
526 */
527 ret = ida_simple_get(&root->ino_ida, 1, 0,
528 GFP_KERNEL | __GFP_NOACCOUNT);
522 if (ret < 0)529 if (ret < 0)
523 goto err_out2;530 goto err_out2;
524 kn->ino = ret;531 kn->ino = ret;
include/linux/gfp.h+2−0
@@ -30,6 +30,7 @@ struct vm_area_struct; · 29 unmodified lines
30#define ___GFP_HARDWALL 0x20000u30#define ___GFP_HARDWALL 0x20000u
31#define ___GFP_THISNODE 0x40000u31#define ___GFP_THISNODE 0x40000u
32#define ___GFP_RECLAIMABLE 0x80000u32#define ___GFP_RECLAIMABLE 0x80000u
33#define ___GFP_NOACCOUNT 0x100000u
33#define ___GFP_NOTRACK 0x200000u34#define ___GFP_NOTRACK 0x200000u
34#define ___GFP_NO_KSWAPD 0x400000u35#define ___GFP_NO_KSWAPD 0x400000u
35#define ___GFP_OTHER_NODE 0x800000u36#define ___GFP_OTHER_NODE 0x800000u
@@ -87,6 +88,7 @@ struct vm_area_struct; · 51 unmodified lines
87#define __GFP_HARDWALL ((__force gfp_t)___GFP_HARDWALL) /* Enforce hardwall cpuset memory allocs */88#define __GFP_HARDWALL ((__force gfp_t)___GFP_HARDWALL) /* Enforce hardwall cpuset memory allocs */
88#define __GFP_THISNODE ((__force gfp_t)___GFP_THISNODE)/* No fallback, no policies */89#define __GFP_THISNODE ((__force gfp_t)___GFP_THISNODE)/* No fallback, no policies */
89#define __GFP_RECLAIMABLE ((__force gfp_t)___GFP_RECLAIMABLE) /* Page is reclaimable */90#define __GFP_RECLAIMABLE ((__force gfp_t)___GFP_RECLAIMABLE) /* Page is reclaimable */
91#define __GFP_NOACCOUNT ((__force gfp_t)___GFP_NOACCOUNT) /* Don't account to kmemcg */
90#define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */92#define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */
91 93
92#define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD)94#define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD)
include/linux/memcontrol.h+4−0
@@ -463,6 +463,8 @@ memcg_kmem_newpage_charge(gfp_t gfp, struct mem_cgroup **memcg, int order) · 462 unmodified lines
463 if (!memcg_kmem_enabled())463 if (!memcg_kmem_enabled())
464 return true;464 return true;
465 465
466 if (gfp & __GFP_NOACCOUNT)
467 return true;
466 /*468 /*
467 * __GFP_NOFAIL allocations will move on even if charging is not469 * __GFP_NOFAIL allocations will move on even if charging is not
468 * possible. Therefore we don't even try, and have this allocation470 * possible. Therefore we don't even try, and have this allocation
@@ -522,6 +524,8 @@ memcg_kmem_get_cache(struct kmem_cache *cachep, gfp_t gfp) · 53 unmodified lines
522{524{
523 if (!memcg_kmem_enabled())525 if (!memcg_kmem_enabled())
524 return cachep;526 return cachep;
527 if (gfp & __GFP_NOACCOUNT)
528 return cachep;
525 if (gfp & __GFP_NOFAIL)529 if (gfp & __GFP_NOFAIL)
526 return cachep;530 return cachep;
527 if (in_interrupt() || (!current->mm) || (current->flags & PF_KTHREAD))531 if (in_interrupt() || (!current->mm) || (current->flags & PF_KTHREAD))
include/linux/uidgid.h+2−2
@@ -109,12 +109,12 @@ static inline bool gid_lte(kgid_t left, kgid_t right) · 108 unmodified lines
109 109
110static inline bool uid_valid(kuid_t uid)110static inline bool uid_valid(kuid_t uid)
111{111{
112 return !uid_eq(uid, INVALID_UID);112 return __kuid_val(uid) != (uid_t) -1;
113}113}
114 114
115static inline bool gid_valid(kgid_t gid)115static inline bool gid_valid(kgid_t gid)
116{116{
117 return !gid_eq(gid, INVALID_GID);117 return __kgid_val(gid) != (gid_t) -1;
118}118}
119 119
120#ifdef CONFIG_USER_NS120#ifdef CONFIG_USER_NS
mm/kmemleak.c+2−1
@@ -115,7 +115,8 @@ · 114 unmodified lines
115#define BYTES_PER_POINTER sizeof(void *)115#define BYTES_PER_POINTER sizeof(void *)
116 116
117/* GFP bitmask for kmemleak internal allocations */117/* GFP bitmask for kmemleak internal allocations */
118#define gfp_kmemleak_mask(gfp) (((gfp) & (GFP_KERNEL | GFP_ATOMIC)) | \118#define gfp_kmemleak_mask(gfp) (((gfp) & (GFP_KERNEL | GFP_ATOMIC | \
119 __GFP_NOACCOUNT)) | \
119 __GFP_NORETRY | __GFP_NOMEMALLOC | \120 __GFP_NORETRY | __GFP_NOMEMALLOC | \
120 __GFP_NOWARN)121 __GFP_NOWARN)
121 122
mm/mempolicy.c+1−1
@@ -2518,7 +2518,7 @@ static void __init check_numabalancing_enable(void) · 2517 unmodified lines
2518 if (numabalancing_override)2518 if (numabalancing_override)
2519 set_numabalancing_state(numabalancing_override == 1);2519 set_numabalancing_state(numabalancing_override == 1);
2520 2520
2521 if (nr_node_ids > 1 && !numabalancing_override) {2521 if (num_online_nodes() > 1 && !numabalancing_override) {
2522 pr_info("%s automatic NUMA balancing. "2522 pr_info("%s automatic NUMA balancing. "
2523 "Configure with numa_balancing= or the "2523 "Configure with numa_balancing= or the "
2524 "kernel.numa_balancing sysctl",2524 "kernel.numa_balancing sysctl",
mm/page_isolation.c+2−1
@@ -101,7 +101,8 @@ void unset_migratetype_isolate(struct page *page, unsigned migratetype) · 100 unmodified lines
101 buddy_idx = __find_buddy_index(page_idx, order);101 buddy_idx = __find_buddy_index(page_idx, order);
102 buddy = page + (buddy_idx - page_idx);102 buddy = page + (buddy_idx - page_idx);
103 103
104 if (!is_migrate_isolate_page(buddy)) {104 if (pfn_valid_within(page_to_pfn(buddy)) &&
105 !is_migrate_isolate_page(buddy)) {
105 __isolate_free_page(page, order);106 __isolate_free_page(page, order);
106 kernel_map_pages(page, (1 << order), 1);107 kernel_map_pages(page, (1 << order), 1);
107 set_page_refcounted(page);108 set_page_refcounted(page);
tools/vm/Makefile+1−1
@@ -3,7 +3,7 @@ · 2 unmodified lines
3TARGETS=page-types slabinfo page_owner_sort3TARGETS=page-types slabinfo page_owner_sort
4 4
5LIB_DIR = ../lib/api5LIB_DIR = ../lib/api
6LIBS = $(LIB_DIR)/libapikfs.a6LIBS = $(LIB_DIR)/libapi.a
7 7
8CC = $(CROSS_COMPILE)gcc8CC = $(CROSS_COMPILE)gcc
9CFLAGS = -Wall -Wextra -I../lib/9CFLAGS = -Wall -Wextra -I../lib/