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'
Unified · Split
| @@ -1935,7 +1935,7 @@ S: Maintained · 1934 unmodified lines | ||
| 1935 | 1935 | F: drivers/net/wireless/b43legacy/ |
| 1936 | 1936 | |
| 1937 | 1937 | BACKLIGHT CLASS/SUBSYSTEM |
| 1938 | −M: Jingoo Han <jg1.han@samsung.com> | |
| 1938 | +M: Jingoo Han <jingoohan1@gmail.com> | |
| 1939 | 1939 | M: Lee Jones <lee.jones@linaro.org> |
| 1940 | 1940 | S: Maintained |
| 1941 | 1941 | F: drivers/video/backlight/ |
| @@ -3918,7 +3918,7 @@ F: drivers/extcon/ · 1976 unmodified lines | ||
| 3918 | 3918 | F: Documentation/extcon/ |
| 3919 | 3919 | |
| 3920 | 3920 | EXYNOS DP DRIVER |
| 3921 | −M: Jingoo Han <jg1.han@samsung.com> | |
| 3921 | +M: Jingoo Han <jingoohan1@gmail.com> | |
| 3922 | 3922 | L: dri-devel@lists.freedesktop.org |
| 3923 | 3923 | S: Maintained |
| 3924 | 3924 | F: drivers/gpu/drm/exynos/exynos_dp* |
| @@ -7557,7 +7557,7 @@ S: Maintained · 3632 unmodified lines | ||
| 7557 | 7557 | F: drivers/pci/host/*rcar* |
| 7558 | 7558 | |
| 7559 | 7559 | PCI DRIVER FOR SAMSUNG EXYNOS |
| 7560 | −M: Jingoo Han <jg1.han@samsung.com> | |
| 7560 | +M: Jingoo Han <jingoohan1@gmail.com> | |
| 7561 | 7561 | L: linux-pci@vger.kernel.org |
| 7562 | 7562 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 7563 | 7563 | L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers) |
| @@ -7565,7 +7565,7 @@ S: Maintained · 1 unmodified line | ||
| 7565 | 7565 | F: drivers/pci/host/pci-exynos.c |
| 7566 | 7566 | |
| 7567 | 7567 | PCI DRIVER FOR SYNOPSIS DESIGNWARE |
| 7568 | −M: Jingoo Han <jg1.han@samsung.com> | |
| 7568 | +M: Jingoo Han <jingoohan1@gmail.com> | |
| 7569 | 7569 | L: linux-pci@vger.kernel.org |
| 7570 | 7570 | S: Maintained |
| 7571 | 7571 | F: drivers/pci/host/*designware* |
| @@ -8521,7 +8521,7 @@ S: Supported · 949 unmodified lines | ||
| 8521 | 8521 | F: sound/soc/samsung/ |
| 8522 | 8522 | |
| 8523 | 8523 | SAMSUNG FRAMEBUFFER DRIVER |
| 8524 | −M: Jingoo Han <jg1.han@samsung.com> | |
| 8524 | +M: Jingoo Han <jingoohan1@gmail.com> | |
| 8525 | 8525 | L: linux-fbdev@vger.kernel.org |
| 8526 | 8526 | S: Maintained |
| 8527 | 8527 | F: drivers/video/fbdev/s3c-fb.c |
| @@ -64,7 +64,7 @@ static void rtc_delayed_write(u32 val, struct armada38x_rtc *rtc, int offset) · 63 unmodified lines | ||
| 64 | 64 | static int armada38x_rtc_read_time(struct device *dev, struct rtc_time *tm) |
| 65 | 65 | { |
| 66 | 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 | 69 | mutex_lock(&rtc->mutex_time); |
| 70 | 70 | time = readl(rtc->regs + RTC_TIME); |
| @@ -518,7 +518,14 @@ static struct kernfs_node *__kernfs_new_node(struct kernfs_root *root, · 517 unmodified lines | ||
| 518 | 518 | if (!kn) |
| 519 | 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 | 529 | if (ret < 0) |
| 523 | 530 | goto err_out2; |
| 524 | 531 | kn->ino = ret; |
| @@ -30,6 +30,7 @@ struct vm_area_struct; · 29 unmodified lines | ||
| 30 | 30 | #define ___GFP_HARDWALL 0x20000u |
| 31 | 31 | #define ___GFP_THISNODE 0x40000u |
| 32 | 32 | #define ___GFP_RECLAIMABLE 0x80000u |
| 33 | +#define ___GFP_NOACCOUNT 0x100000u | |
| 33 | 34 | #define ___GFP_NOTRACK 0x200000u |
| 34 | 35 | #define ___GFP_NO_KSWAPD 0x400000u |
| 35 | 36 | #define ___GFP_OTHER_NODE 0x800000u |
| @@ -87,6 +88,7 @@ struct vm_area_struct; · 51 unmodified lines | ||
| 87 | 88 | #define __GFP_HARDWALL ((__force gfp_t)___GFP_HARDWALL) /* Enforce hardwall cpuset memory allocs */ |
| 88 | 89 | #define __GFP_THISNODE ((__force gfp_t)___GFP_THISNODE)/* No fallback, no policies */ |
| 89 | 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 | 92 | #define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */ |
| 91 | 93 | |
| 92 | 94 | #define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) |
| @@ -463,6 +463,8 @@ memcg_kmem_newpage_charge(gfp_t gfp, struct mem_cgroup **memcg, int order) · 462 unmodified lines | ||
| 463 | 463 | if (!memcg_kmem_enabled()) |
| 464 | 464 | return true; |
| 465 | 465 | |
| 466 | + if (gfp & __GFP_NOACCOUNT) | |
| 467 | + return true; | |
| 466 | 468 | /* |
| 467 | 469 | * __GFP_NOFAIL allocations will move on even if charging is not |
| 468 | 470 | * 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 | 525 | if (!memcg_kmem_enabled()) |
| 524 | 526 | return cachep; |
| 527 | + if (gfp & __GFP_NOACCOUNT) | |
| 528 | + return cachep; | |
| 525 | 529 | if (gfp & __GFP_NOFAIL) |
| 526 | 530 | return cachep; |
| 527 | 531 | if (in_interrupt() || (!current->mm) || (current->flags & PF_KTHREAD)) |
| @@ -109,12 +109,12 @@ static inline bool gid_lte(kgid_t left, kgid_t right) · 108 unmodified lines | ||
| 109 | 109 | |
| 110 | 110 | static 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 | |
| 115 | 115 | static 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 | 120 | #ifdef CONFIG_USER_NS |
| @@ -115,7 +115,8 @@ · 114 unmodified lines | ||
| 115 | 115 | #define BYTES_PER_POINTER sizeof(void *) |
| 116 | 116 | |
| 117 | 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 | 120 | __GFP_NORETRY | __GFP_NOMEMALLOC | \ |
| 120 | 121 | __GFP_NOWARN) |
| 121 | 122 | |
| @@ -2518,7 +2518,7 @@ static void __init check_numabalancing_enable(void) · 2517 unmodified lines | ||
| 2518 | 2518 | if (numabalancing_override) |
| 2519 | 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 | 2522 | pr_info("%s automatic NUMA balancing. " |
| 2523 | 2523 | "Configure with numa_balancing= or the " |
| 2524 | 2524 | "kernel.numa_balancing sysctl", |
| @@ -101,7 +101,8 @@ void unset_migratetype_isolate(struct page *page, unsigned migratetype) · 100 unmodified lines | ||
| 101 | 101 | buddy_idx = __find_buddy_index(page_idx, order); |
| 102 | 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 | 106 | __isolate_free_page(page, order); |
| 106 | 107 | kernel_map_pages(page, (1 << order), 1); |
| 107 | 108 | set_page_refcounted(page); |
| @@ -3,7 +3,7 @@ · 2 unmodified lines | ||
| 3 | 3 | TARGETS=page-types slabinfo page_owner_sort |
| 4 | 4 | |
| 5 | 5 | LIB_DIR = ../lib/api |
| 6 | −LIBS = $(LIB_DIR)/libapikfs.a | |
| 6 | +LIBS = $(LIB_DIR)/libapi.a | |
| 7 | 7 | |
| 8 | 8 | CC = $(CROSS_COMPILE)gcc |
| 9 | 9 | CFLAGS = -Wall -Wextra -I../lib/ |