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
19351935 F: drivers/net/wireless/b43legacy/
19361936
19371937 BACKLIGHT CLASS/SUBSYSTEM
1938−M: Jingoo Han <jg1.han@samsung.com>
1938+M: Jingoo Han <jingoohan1@gmail.com>
19391939 M: Lee Jones <lee.jones@linaro.org>
19401940 S: Maintained
19411941 F: drivers/video/backlight/
@@ -3918,7 +3918,7 @@ F: drivers/extcon/ · 1976 unmodified lines
39183918 F: Documentation/extcon/
39193919
39203920 EXYNOS DP DRIVER
3921−M: Jingoo Han <jg1.han@samsung.com>
3921+M: Jingoo Han <jingoohan1@gmail.com>
39223922 L: dri-devel@lists.freedesktop.org
39233923 S: Maintained
39243924 F: drivers/gpu/drm/exynos/exynos_dp*
@@ -7557,7 +7557,7 @@ S: Maintained · 3632 unmodified lines
75577557 F: drivers/pci/host/*rcar*
75587558
75597559 PCI DRIVER FOR SAMSUNG EXYNOS
7560−M: Jingoo Han <jg1.han@samsung.com>
7560+M: Jingoo Han <jingoohan1@gmail.com>
75617561 L: linux-pci@vger.kernel.org
75627562 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
75637563 L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
@@ -7565,7 +7565,7 @@ S: Maintained · 1 unmodified line
75657565 F: drivers/pci/host/pci-exynos.c
75667566
75677567 PCI DRIVER FOR SYNOPSIS DESIGNWARE
7568−M: Jingoo Han <jg1.han@samsung.com>
7568+M: Jingoo Han <jingoohan1@gmail.com>
75697569 L: linux-pci@vger.kernel.org
75707570 S: Maintained
75717571 F: drivers/pci/host/*designware*
@@ -8521,7 +8521,7 @@ S: Supported · 949 unmodified lines
85218521 F: sound/soc/samsung/
85228522
85238523 SAMSUNG FRAMEBUFFER DRIVER
8524−M: Jingoo Han <jg1.han@samsung.com>
8524+M: Jingoo Han <jingoohan1@gmail.com>
85258525 L: linux-fbdev@vger.kernel.org
85268526 S: Maintained
85278527 F: 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
6464 static int armada38x_rtc_read_time(struct device *dev, struct rtc_time *tm)
6565 {
6666 struct armada38x_rtc *rtc = dev_get_drvdata(dev);
67− unsigned long time, time_check, flags;
67+ unsigned long time, time_check;
6868
6969 mutex_lock(&rtc->mutex_time);
7070 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
518518 if (!kn)
519519 goto err_out1;
520520
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);
522529 if (ret < 0)
523530 goto err_out2;
524531 kn->ino = ret;
include/linux/gfp.h+2−0
@@ -30,6 +30,7 @@ struct vm_area_struct; · 29 unmodified lines
3030 #define ___GFP_HARDWALL 0x20000u
3131 #define ___GFP_THISNODE 0x40000u
3232 #define ___GFP_RECLAIMABLE 0x80000u
33+#define ___GFP_NOACCOUNT 0x100000u
3334 #define ___GFP_NOTRACK 0x200000u
3435 #define ___GFP_NO_KSWAPD 0x400000u
3536 #define ___GFP_OTHER_NODE 0x800000u
@@ -87,6 +88,7 @@ struct vm_area_struct; · 51 unmodified lines
8788 #define __GFP_HARDWALL ((__force gfp_t)___GFP_HARDWALL) /* Enforce hardwall cpuset memory allocs */
8889 #define __GFP_THISNODE ((__force gfp_t)___GFP_THISNODE)/* No fallback, no policies */
8990 #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 */
9092 #define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */
9193
9294 #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
463463 if (!memcg_kmem_enabled())
464464 return true;
465465
466+ if (gfp & __GFP_NOACCOUNT)
467+ return true;
466468 /*
467469 * __GFP_NOFAIL allocations will move on even if charging is not
468470 * 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
522524 {
523525 if (!memcg_kmem_enabled())
524526 return cachep;
527+ if (gfp & __GFP_NOACCOUNT)
528+ return cachep;
525529 if (gfp & __GFP_NOFAIL)
526530 return cachep;
527531 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
109109
110110 static inline bool uid_valid(kuid_t uid)
111111 {
112− return !uid_eq(uid, INVALID_UID);
112+ return __kuid_val(uid) != (uid_t) -1;
113113 }
114114
115115 static inline bool gid_valid(kgid_t gid)
116116 {
117− return !gid_eq(gid, INVALID_GID);
117+ return __kgid_val(gid) != (gid_t) -1;
118118 }
119119
120120 #ifdef CONFIG_USER_NS
mm/kmemleak.c+2−1
@@ -115,7 +115,8 @@ · 114 unmodified lines
115115 #define BYTES_PER_POINTER sizeof(void *)
116116
117117 /* 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)) | \
119120 __GFP_NORETRY | __GFP_NOMEMALLOC | \
120121 __GFP_NOWARN)
121122
mm/mempolicy.c+1−1
@@ -2518,7 +2518,7 @@ static void __init check_numabalancing_enable(void) · 2517 unmodified lines
25182518 if (numabalancing_override)
25192519 set_numabalancing_state(numabalancing_override == 1);
25202520
2521− if (nr_node_ids > 1 && !numabalancing_override) {
2521+ if (num_online_nodes() > 1 && !numabalancing_override) {
25222522 pr_info("%s automatic NUMA balancing. "
25232523 "Configure with numa_balancing= or the "
25242524 "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
101101 buddy_idx = __find_buddy_index(page_idx, order);
102102 buddy = page + (buddy_idx - page_idx);
103103
104− if (!is_migrate_isolate_page(buddy)) {
104+ if (pfn_valid_within(page_to_pfn(buddy)) &&
105+ !is_migrate_isolate_page(buddy)) {
105106 __isolate_free_page(page, order);
106107 kernel_map_pages(page, (1 << order), 1);
107108 set_page_refcounted(page);
tools/vm/Makefile+1−1
@@ -3,7 +3,7 @@ · 2 unmodified lines
33 TARGETS=page-types slabinfo page_owner_sort
44
55 LIB_DIR = ../lib/api
6−LIBS = $(LIB_DIR)/libapikfs.a
6+LIBS = $(LIB_DIR)/libapi.a
77
88 CC = $(CROSS_COMPILE)gcc
99 CFLAGS = -Wall -Wextra -I../lib/