Re: [PATCH v2] arm64: mm: Fix memmap to be initialized for the entire section

2016-12-09 Thread Yisheng Xie
On 2016/12/9 20:23, Hanjun Guo wrote: > On 12/09/2016 08:19 PM, Ard Biesheuvel wrote: >> On 9 December 2016 at 12:14, Yisheng Xie wrote: >>> Hi Robert, >>> We have merged your patch to 4.9.0-rc8, however we still meet the similar >>> problem >>>

Re: [PATCH] arm64: mm: Fix NOMAP page initialization

2016-12-11 Thread Yisheng Xie
hi Robert, On 2016/12/10 2:10, Robert Richter wrote: > On ThunderX systems with certain memory configurations we see the > following BUG_ON(): > > kernel BUG at mm/page_alloc.c:1848! > > This happens for some configs with 64k page size enabled. The BUG_ON() > checks if start and end page of a m

Re: [PATCH] arm64: mm: Fix NOMAP page initialization

2016-12-12 Thread Yisheng Xie
hi Robert, On 2016/12/12 11:12, Yisheng Xie wrote: > hi Robert, > > On 2016/12/10 2:10, Robert Richter wrote: >> On ThunderX systems with certain memory configurations we see the >> following BUG_ON(): >> >> kernel BUG at mm/page_alloc.c:1848! >> >>

[PATCH v5] mm/vmscan: more restrictive condition for retry in do_try_to_free_pages

2017-03-22 Thread Yisheng Xie
From: Yisheng Xie By reviewing code, I find that when enter do_try_to_free_pages, the may_thrash is always clear, and it will retry shrink zones to tap cgroup's reserves memory by setting may_thrash when the former shrink_zones reclaim nothing. However, when memcg is disabled or on l

[PATCH v4] mm/vmscan: more restrictive condition for retry in do_try_to_free_pages

2017-03-15 Thread Yisheng Xie
on, set it if there is any memcg protected by low limit and only do the retry when memcg_low_protection is set while may_thrash is clear. Signed-off-by: Yisheng Xie Suggested-by: Michal Hocko Suggested-by: Shakeel Butt Reviewed-by: Shakeel Butt --- v4: - add a new field in scan_con

Re: [PATCH v4] mm/vmscan: more restrictive condition for retry in do_try_to_free_pages

2017-03-16 Thread Yisheng Xie
Hi Michal Thanks for reviewing. On 2017/3/15 20:41, Michal Hocko wrote: > On Wed 15-03-17 19:36:48, Yisheng Xie wrote: >> By reviewing code, I find that when enter do_try_to_free_pages, the >> may_thrash is always clear, and it will retry shrink zones to tap >> cgroup's

Re: [RFC v2 10/10] mm, page_alloc: introduce MIGRATE_MIXED migratetype

2017-03-07 Thread Yisheng Xie
ood_pages); It seems this move_freepages_block() should be removed, if we can steal whole block then just do it. If not we can check whether we can set it as mixed mt, right? Please let me know if I miss something.. Thanks Yisheng Xie > + > + new_block_type = old_block_type = get_page

[RFC] mm/compaction: ignore block suitable after check large free page

2017-03-09 Thread Yisheng Xie
If the migrate target is a large free page and we ignore suitable, it may not good for defrag. So move the ignore block suitable after check large free page. Signed-off-by: Yisheng Xie --- mm/compaction.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/compaction.c

Re: [RFC] mm/compaction: ignore block suitable after check large free page

2017-03-10 Thread Yisheng Xie
Hi Vlastimil, Thanks for comment. On 2017/3/10 15:30, Vlastimil Babka wrote: > On 03/10/2017 05:20 AM, Yisheng Xie wrote: >> If the migrate target is a large free page and we ignore suitable, >> it may not good for defrag. So move the ignore block suitable after >>

[PATCH RFC] mm/vmscan: donot retry shrink zones when memcg is disabled

2017-03-10 Thread Yisheng Xie
From: Yisheng Xie When we enter do_try_to_free_pages, the may_thrash is always clear, and it will retry shrink zones to tap cgroup's reserves memory by setting may_thrash when the former shrink_zones reclaim nothing. However, if CONFIG_MEMCG=n, it should not do this useless retry at all, f

Re: [PATCH RFC] mm/vmscan: donot retry shrink zones when memcg is disabled

2017-03-11 Thread Yisheng Xie
Hi Shakeel, Thanks for reviewing. On 03/11/2017 11:40 AM, Shakeel Butt wrote: > On Fri, Mar 10, 2017 at 6:19 PM, Yisheng Xie wrote: >> From: Yisheng Xie >> >> When we enter do_try_to_free_pages, the may_thrash is always clear, and >> it will retry shrink zones to t

[PATCH v2 RFC] mm/vmscan: more restrictive condition for retry in do_try_to_free_pages

2017-03-11 Thread Yisheng Xie
From: Yisheng Xie When we enter do_try_to_free_pages, the may_thrash is always clear, and it will retry shrink zones to tap cgroup's reserves memory by setting may_thrash when the former shrink_zones reclaim nothing. However, when memcg is disabled or on legacy hierarchy, it should not do

[PATCH v2 RFC] mm/vmscan: more restrictive condition for retry in do_try_to_free_pages

2017-03-11 Thread Yisheng Xie
From: Yisheng Xie When we enter do_try_to_free_pages, the may_thrash is always clear, and it will retry shrink zones to tap cgroup's reserves memory by setting may_thrash when the former shrink_zones reclaim nothing. However, when memcg is disabled or on legacy hierarchy, it should not do

Re: [PATCH v2 RFC] mm/vmscan: more restrictive condition for retry in do_try_to_free_pages

2017-03-12 Thread Yisheng Xie
hi, Shakeel, On 03/12/2017 01:52 AM, Shakeel Butt wrote: > On Sat, Mar 11, 2017 at 5:51 AM, Yisheng Xie wrote: >> From: Yisheng Xie >> >> When we enter do_try_to_free_pages, the may_thrash is always clear, and >> it will retry shrink zones to tap cgroup&#

[PATCH v3 RFC] mm/vmscan: more restrictive condition for retry of shrink_zones

2017-03-12 Thread Yisheng Xie
From: Yisheng Xie When we enter do_try_to_free_pages, the may_thrash is always clear, and it will retry shrink zones to tap cgroup's reserves memory by setting may_thrash when the former shrink_zones reclaim nothing. However, when memcg is disabled or on legacy hierarchy, it should not do

Re: [RFC v2 10/10] mm, page_alloc: introduce MIGRATE_MIXED migratetype

2017-03-12 Thread Yisheng Xie
Hi, Vlastimil, On 2017/3/8 15:07, Vlastimil Babka wrote: > On 03/08/2017 03:16 AM, Yisheng Xie wrote: >> Hi Vlastimil , >> >> On 2017/2/11 1:23, Vlastimil Babka wrote: >>> @@ -1977,7 +1978,7 @@ static void steal_suitable_fallback(struct zone >>> *zone,

Re: [PATCH v3 RFC] mm/vmscan: more restrictive condition for retry of shrink_zones

2017-03-13 Thread Yisheng Xie
out these. > > On Sun 12-03-17 19:06:10, Yisheng Xie wrote: >> From: Yisheng Xie >> >> When we enter do_try_to_free_pages, the may_thrash is always clear, and >> it will retry shrink zones to tap cgroup's reserves memory by setting >> may_thrash when the former

Re: [RFC] mm/compaction: ignore block suitable after check large free page

2017-03-13 Thread Yisheng Xie
Hi Vlastimil, Thanks for comment. On 2017/3/13 17:51, Vlastimil Babka wrote: > On 03/10/2017 10:53 AM, Yisheng Xie wrote: >> Hi Vlastimil, >> >> Thanks for comment. >> On 2017/3/10 15:30, Vlastimil Babka wrote: >>> On 03/10/2017 05:20 AM, Yisheng Xie wrote: &

[PATCH v1] mm/compaction: ignore block suitable after check large free page

2017-03-14 Thread Yisheng Xie
patch is just based on logical analyses which might be better for future-proofing the function and it is most likely won't have any visible effect right now, for direct compaction shouldn't have to be called if there's a >=pageblock_order page already available. Signed-off-by: Yi

Re: [RFC] 3.10 kernel- oom with about 24G free memory

2017-02-10 Thread Yisheng Xie
Hi Michal, Thanks for comment! On 2017/2/10 15:09, Michal Hocko wrote: > On Fri 10-02-17 09:13:58, Yisheng Xie wrote: >> hi Michal, >> Thanks for your comment. >> >> On 2017/2/9 21:41, Michal Hocko wrote: >>> On Thu 09-02-17 14:26:28, Michal Hocko wrote: >&g

Re: [RFC] 3.10 kernel- oom with about 24G free memory

2017-02-10 Thread Yisheng Xie
Hi Michal, Thanks for comment! On 2017/2/10 16:52, Michal Hocko wrote: > On Fri 10-02-17 16:48:58, Yisheng Xie wrote: >> Hi Michal, >> >> Thanks for comment! >> On 2017/2/10 15:09, Michal Hocko wrote: >>> On Fri 10-02-17 09:13:58, Yisheng Xie wrote: >>

[RFC] mm/zsmalloc: remove redundant SetPagePrivate2 in create_page_chain

2017-02-14 Thread Yisheng Xie
age :) Signed-off-by: Yisheng Xie --- mm/zsmalloc.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 9cc3c0b..aa90f14 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -24,7 +24,6 @@ * * Usage of struct page flags: * PG_private:

[PATCH RFC] arm64/mm: handle memmap kernel option

2017-02-24 Thread Yisheng Xie
following memmap variants: - memmap=nn[KMG]$ss[KMG]: mark specified memory as reserved; - memmap=nn[KMG]@ss[KMG]: force usage of a specific region of memory; Reported-by: Bob Dong Signed-off-by: Yisheng Xie --- arch/arm64/mm/init.c | 46 ++ 1 file changed

Re: [PATCH RFC] arm64/mm: handle memmap kernel option

2017-02-26 Thread Yisheng Xie
Hi Ard, Thanks for comment. On 2017/2/26 18:46, Ard Biesheuvel wrote: > On 25 February 2017 at 06:47, Yisheng Xie wrote: >> When use device tree mode, user can reserve memory by changes the dts, >> however, when boot with ACPI, user cannot reserve memory except by >> chang

Re: [PATCH RFC] arm64/mm: handle memmap kernel option

2017-02-27 Thread Yisheng Xie
hi Mark, Thanks for comment On 2017/2/27 16:48, Mark Rutland wrote: > Hi, > > On Mon, Feb 27, 2017 at 11:48:50AM +0800, Yisheng Xie wrote: >> On 2017/2/26 18:46, Ard Biesheuvel wrote: >>> On 25 February 2017 at 06:47, Yisheng Xie wrote: > >>>> To make us

[PATCH] mm/vmstats: add thp_split_pud event for clarify

2017-02-28 Thread Yisheng Xie
We added supporting for PUD-sized transparent hugepages, however count the event "thp split pud" into thp_split_pmd event. To clarify the event count of thp split pud from pmd, this patch add a new event named thp_split_pud. Signed-off-by: Yisheng Xie --- include/linux/vm_event_

Re: [PATCH v6 4/4] mm/hotplug: enable memory hotplug for non-lru movable pages

2017-02-05 Thread Yisheng Xie
Hi Naoya Horiguchi, Thanks for reviewing. On 2017/2/6 11:29, Naoya Horiguchi wrote: > On Fri, Feb 03, 2017 at 03:59:30PM +0800, Yisheng Xie wrote: >> We had considered all of the non-lru pages as unmovable before commit >> bda807d44454 ("mm: migrate: support non-lru movable pa

[PATCH] mm balloon: umount balloon_mnt when remove vb device

2017-02-07 Thread Yisheng Xie
With CONFIG_BALLOON_COMPACTION=y, it will mount balloon_mnt for balloon page migration when probe a virtio_balloon device, however do not unmount it when remove the device, fix it. Fixes: b1123ea6d3b3 ("mm: balloon: use general non-lru movable page feature") Signed-off-by: Y

[PATCH] mm/zsmalloc: fix comment in zsmalloc

2017-02-08 Thread Yisheng Xie
The class index and fullness group are not encoded in (first)page->mapping any more, after commit 3783689a1aa8 ("zsmalloc: introduce zspage structure"). Instead, they are store in struct zspage. Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: Nitin Gupta Cc: Hanjun Guo Signed-off-by

[PATCH v2] mm/zsmalloc: fix comment in zsmalloc

2017-02-08 Thread Yisheng Xie
The class index and fullness group are not encoded in (first)page->mapping any more, after commit 3783689a1aa8 ("zsmalloc: introduce zspage structure"). Instead, they are store in struct zspage. Just delete this unneeded comment. Signed-off-by: Yisheng Xie Suggested-by: Serge

[RFC] 3.10 kernel- oom with about 24G free memory

2017-02-09 Thread Yisheng Xie
have any idea about it? Any comment is more than welcome! Thanks Yisheng Xie - [ 81.234289] DefSch0200 invoked oom-killer: gfp_mask=0xd0, order=0, oom_score_adj=0 [ 81.234295] DefSch0200 cpuset=/ mems_allowed=0 [ 81.234299] CPU: 3 PID: 8284 Comm: DefSch0200 Tainted: G

Re: [RFC] 3.10 kernel- oom with about 24G free memory

2017-02-09 Thread Yisheng Xie
hi Michal, Thanks for your comment. On 2017/2/9 21:41, Michal Hocko wrote: > On Thu 09-02-17 14:26:28, Michal Hocko wrote: >> On Thu 09-02-17 20:54:49, Yisheng Xie wrote: >>> Hi all, >>> I get an oom on a linux 3.10 kvm guest OS. when it triggers the oom >>> it

Re: [PATCH v5 1/4] mm/migration: make isolate_movable_page() return int type

2017-02-02 Thread Yisheng Xie
, ys...@foxmail.com wrote: >>>> From: Yisheng Xie >>>> >>>> This patch changes the return type of isolate_movable_page() >>>> from bool to int. It will return 0 when isolate movable page >>>> successfully, return -EINVAL when the page is n

Re: [PATCH v5 1/4] mm/migration: make isolate_movable_page() return int type

2017-02-02 Thread Yisheng Xie
17 15:48:21, Minchan Kim wrote: >>>>> Hi Yisheng, >>>>> >>>>> On Tue, Jan 31, 2017 at 09:06:18PM +0800, ys...@foxmail.com wrote: >>>>>> From: Yisheng Xie >>>>>> >>>>>> This patch changes the retu

[PATCH v6 0/4] HWPOISON: soft offlining for non-lru movable page

2017-02-03 Thread Yisheng Xie
ge to avoid isolated count mismatch, as Minchan Kim's suggestion. v2: * delete function soft_offline_movable_page() and hanle non-lru movable page in __soft_offline_page() as Michal Hocko suggested. Yisheng Xie (4): mm/migration: make isolate_movable_page() return int type mm/mig

[PATCH v6 4/4] mm/hotplug: enable memory hotplug for non-lru movable pages

2017-02-03 Thread Yisheng Xie
ion. This patch straightforwardly adds non-lru migration code, which means adding non-lru related code to the functions which scan over pfn and collect pages to be migrated and isolate them before migration. Signed-off-by: Yisheng Xie Cc: Michal Hocko Cc: Minchan Kim Cc: Naoya Horiguchi Cc:

[PATCH v6 2/4] mm/migration: make isolate_movable_page always defined

2017-02-03 Thread Yisheng Xie
Define isolate_movable_page as a static inline function when CONFIG_MIGRATION is not enable. It should return -EBUSY here which means failed to isolate movable pages. This patch do not have any functional change but prepare for later patch. Signed-off-by: Yisheng Xie Acked-by: Minchan Kim

[PATCH v6 3/4] HWPOISON: soft offlining for non-lru movable page

2017-02-03 Thread Yisheng Xie
to another page and disable the original (maybe half-broken) one. Signed-off-by: Yisheng Xie Suggested-by: Michal Hocko Suggested-by: Minchan Kim Reviewed-by: Minchan Kim Acked-by: Naoya Horiguchi Cc: Vlastimil Babka Cc: Andi Kleen Cc: Hanjun Guo Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Mel

[PATCH v6 1/4] mm/migration: make isolate_movable_page() return int type

2017-02-03 Thread Yisheng Xie
Change the return type of isolate_movable_page() from bool to int. It will return 0 when isolate movable page successfully, and return -EBUSY when it isolates failed. There is no functional change within this patch but prepare for later patch. Signed-off-by: Yisheng Xie Suggested-by: Michal

Re: [PATCH resend 4.9] hw_random: Don't use a stack buffer in add_early_randomness()

2017-02-03 Thread Yisheng Xie
_rng with CONFIG_VMAP_STACK=y? Could you please give me more info. about it. Really thanks for that! Yisheng Xie. > > Reported-by: Matt Mullins > Tested-by: Matt Mullins > Fixes: d3cc7996473a ("hwrng: fetch randomness only after device init") > Signed-off-by: Andy Lutomir

Re: [PATCH resend 4.9] hw_random: Don't use a stack buffer in add_early_randomness()

2017-02-04 Thread Yisheng Xie
hi, Matt, Thanks for your reply. On 2017/2/4 12:34, Matt Mullins wrote: > On Sat, Feb 04, 2017 at 11:47:38AM +0800, Yisheng Xie wrote: >> On 2016/10/18 1:06, Andy Lutomirski wrote: >>> hw_random carefully avoids using a stack buffer except in >>> add_early_randomness

Re: [RFC PATCH v3 0/2] arm64/hugetlb: enable gigantic page

2016-08-27 Thread Yisheng Xie
Hi Andrew, Can this patchset be merged? Or have any other comments? Thanks Xie Yisheng On 2016/8/26 18:26, Will Deacon wrote: > On Mon, Aug 22, 2016 at 09:20:02PM +0800, Xie Yisheng wrote: >> >> Xie Yisheng (2): >> mm/hugetlb: Introduce ARCH_HAS_GIGANTIC_PAGE >> arm64 Kconfig: Select gigantic

Re: [RFC PATCH] arm64/hugetlb enable gigantic hugepage

2016-08-19 Thread Yisheng Xie
add more, hi all, Could anyone do me a favor and give some comments? Thanks Xie Yisheng On 2016/8/18 20:05, Xie Yisheng wrote: > As we know, arm64 also support gigantic hugepage eg. 1G. > So I try to use this function by adding hugepagesz=1G > in kernel parameters, with CONFIG_CMA=y. > However,

Re: [RFC PATCH] arm64/hugetlb enable gigantic hugepage

2016-08-19 Thread Yisheng Xie
On 2016/8/19 18:25, Michal Hocko wrote: > On Thu 18-08-16 20:05:29, Xie Yisheng wrote: >> As we know, arm64 also support gigantic hugepage eg. 1G. > > Well, I do not know that. How can I check? > Hi Michal, Thank you for your reply. Maybe you can check the setup_hugepagesz() in ./arch/arm64/hug

[RFC]mm/zsmalloc,: trigger BUG_ON in function zs_map_object.

2017-03-28 Thread Yisheng Xie
it happened. Any idea about it? Any comment is more than welcome! Thanks Yisheng Xie

Re: [RFC]mm/zsmalloc,: trigger BUG_ON in function zs_map_object.

2017-03-29 Thread Yisheng Xie
Hi Minchan, Thanks for your comment! On 2017/3/29 8:20, Minchan Kim wrote: > Hello, > > On Tue, Mar 28, 2017 at 03:20:22PM +0800, Yisheng Xie wrote: >> Hi, all, >> >> We had backport the no-lru migration to linux-4.1, meanwhile change the >> ZS_MAX_ZSPAGE_ORDER t

Re: [RFC]mm/zsmalloc,: trigger BUG_ON in function zs_map_object.

2017-03-29 Thread Yisheng Xie
Hi Sergey, Thanks for your comment! On 2017/3/29 14:42, Sergey Senozhatsky wrote: > On (03/29/17 09:20), Minchan Kim wrote: >> Hello, >> >> On Tue, Mar 28, 2017 at 03:20:22PM +0800, Yisheng Xie wrote: >>> Hi, all, >>> >>> We had backport the no-

[RFC PATCH] vmalloc: show more detail info in vmallocinfo for clarify

2017-05-19 Thread Yisheng Xie
480 vm_map_ram 0xf0099000-0xf00aa000 69632 vm_map_ram 0xf100-0xf5001000 67112960 devm_ioremap+0x38/0x7c phys=4000 ioremap after apply this patch. Signed-off-by: Yisheng Xie --- mm/vmalloc.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/

Re: [Question] Mlocked count will not be decreased

2017-05-24 Thread Yisheng Xie
Hi Kefeng, Could you please try this patch. Thanks Yisheng Xie - >From a70ae975756e8e97a28d49117ab25684da631689 Mon Sep 17 00:00:00 2001 From: Yisheng Xie Date: Wed, 24 May 2017 16:01:24 +0800 Subject: [PATCH] mlock: fix mlock count can not decrease in race condition Kefeng repor

Re: [Question] Mlocked count will not be decreased

2017-05-24 Thread Yisheng Xie
(page); >> } >> ... >> >> I think we should add yisheng's patch, also we should add the following >> change. >> I think it is better than use lru_add_drain_all(). > > I agree about yisheng's fix (but v2 didn't address my comm

[PATCH v2] mlock: fix mlock count can not decrease in race condition

2017-05-24 Thread Yisheng Xie
cleared. Fixes: 1ebb7cc6a583 (" mm: munlock: batch NR_MLOCK zone state updates") Signed-off-by: Yisheng Xie Reported-by: Kefeng Wang Tested-by: Kefeng Wang Cc: Vlastimil Babka Cc: Joern Engel Cc: Mel Gorman Cc: Michel Lespinasse Cc: Hugh Dickins Cc: Rik van Riel Cc: Johannes Wei

Re: [PATCH v2] mlock: fix mlock count can not decrease in race condition

2017-05-24 Thread Yisheng Xie
Hi Vlastimil, Thanks for comment! On 2017/5/25 14:32, Vlastimil Babka wrote: > On 05/25/2017 04:13 AM, Yisheng Xie wrote: >> Kefeng reported that when run the follow test the mlock count > >> in meminfo >> cannot be decreased: > > "increases permanently."

[PATCH v3] mlock: fix mlock count can not decrease in race condition

2017-05-25 Thread Yisheng Xie
hal Hocko Cc: Xishi Qiu CC: zhongjiang Cc: Hanjun Guo Cc: --- v2: - use delta_munlocked for it doesn't do the increment in fastpath - Vlastimil v3: - change the changelog to make it more clear - Vlastimil Hi Andrew: Could you please help to fold this? Thanks Yisheng Xie mm/mlock.c | 5 +++

Re: What differences and relations between SVM, HSA, HMM and Unified Memory?

2017-07-17 Thread Yisheng Xie
id* p = clSVMAlloc ( context, // an OpenCL context where this buffer is available CL_MEM_READ_WRITE | CL_MEM_SVM_FINE_GRAIN_BUFFER, size, // amount of memory to allocate (in bytes) 0 // alignment in bytes (0 means default) ); where this RAM come from, device RAM or

Re: What differences and relations between SVM, HSA, HMM and Unified Memory?

2017-07-17 Thread Yisheng Xie
Hi Jérôme and Jean-Philippe , Get it, thanks for all of your detail explain. Thanks Yisheng Xie On 2017/7/17 22:27, Jerome Glisse wrote: > On Mon, Jul 17, 2017 at 07:57:23PM +0800, Yisheng Xie wrote: >> Hi Jean-Philippe, >> >> On 2017/6/12 19:37, Jean-Philippe Bru

Re: [PATCH 00/15] HMM (Heterogeneous Memory Management) v24

2017-07-19 Thread Yisheng Xie
an address of a process is migrated to device memory, it should call migrate_vma() to migrate a range of address back to CPU ? If it is so, I think it should somewhere call this function in this patchset, however, I do not find anywhere in this patchset call this function. Or am I miss anything? Thanks Yisheng Xie

Re: [PATCH 00/15] HMM (Heterogeneous Memory Management) v24

2017-07-21 Thread Yisheng Xie
Hi Jerome, On 2017/7/21 1:18, Jerome Glisse wrote: > On Wed, Jul 19, 2017 at 07:48:08PM +0800, Yisheng Xie wrote: >> Hi Jérôme >> >> On 2017/6/29 2:00, Jérôme Glisse wrote: >>> >>> Patchset is on top of git://git.cmpxchg.org/linux-mmotm.git so i >>&g

Re: [PATCH v2 4/9] staging: android: ion: Avoid NULL point in error path

2018-02-22 Thread Yisheng Xie
Hi Greg, Sorry for late responds for I was on vacation. On 2018/2/17 0:27, Greg KH wrote: > On Mon, Feb 12, 2018 at 06:43:09PM +0800, Yisheng Xie wrote: >> If we failed to create debugfs for ion at ion_device_create, the >> debug_root of ion_device will be NULL, and then when try

[PATCH -next 2/2] staging: android: ion: Remove check of idev->debug_root

2018-02-22 Thread Yisheng Xie
We will go on initial idev if failed to create debug_root, and it does not matter to check the return value of this debugfs call, just remove it. Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/android/ion

[PATCH -next 1/2] staging: android: ion: Remove check of debug_file

2018-02-22 Thread Yisheng Xie
There's no need to check the return value of debug_file for it is just a debugfs and we will go on the following process if we failed to create debug_file. So just remove it. Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.c | 9 ++--- 1 file changed, 2 insertions(

Re: [PATCH resend 1/3] staging: android: ion: Remove unused declaration ion_buffer_fault_user_mappings

2018-02-13 Thread Yisheng Xie
Hi Greg On 2018/2/12 19:40, Yisheng Xie wrote: > Hi Greg, > > JFYI, I have rebase this patchset to v4.15-rc1.[1] Ah, sorry , I mean v4.16-rc1, and the same to other threads. Thanks Yisheng > > [1] https://lkml.org/lkml/2018/2/12/204 > > Thanks > Yisheng > >

Re: [PATCH 2/2] staging: android: ion: Combine cache and uncache pools

2018-02-07 Thread Yisheng Xie
Hi Sumit, On 2018/2/7 22:34, Sumit Semwal wrote: > Hello Yisheng, > > On 7 February 2018 at 09:29, Yisheng Xie wrote: >> Now we call dma_map in the dma_buf API callbacks and handle explicit >> caching by the dma_buf sync API, which make cache and uncache pools >>

[PATCH] ftrace: nuke clear_ftrace_function

2018-02-01 Thread Yisheng Xie
clear_ftrace_function is not used outside of ftrace.c and is not help to use a function, so nuke it per Steve's suggestion. Suggested-by: Steven Rostedt Signed-off-by: Yisheng Xie --- include/linux/ftrace.h | 2 -- kernel/trace/ftrace.c | 13 + 2 files changed, 1 insertion(+

[PATCH 2/2] staging: android: ion: Return void instead of int

2018-02-04 Thread Yisheng Xie
Now, nobody care about the return value of ion_page_pool_add, therefore we can just make it return void. Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion_page_pool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/android/ion/ion_page_pool.c

[PATCH 1/2] staging: android: ion: Remove dead code in ion_page_pool_free

2018-02-04 Thread Yisheng Xie
ion_page_pool_add will always return 0, however ion_page_pool_free will call ion_page_pool_free_pages when ion_page_pool_add's return value is not 0, so it is a dead code which can be removed. Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion_page_pool.c | 6 +- 1 file ch

[PATCH v2 3/9] staging: android: ion: Nuke ion_page_pool_init

2018-02-12 Thread Yisheng Xie
ion_page_pool.c now is used to apply pool APIs for system heap, which do not need do any initial at device_initcall. Therefore ion_page_pool_init can be nuked. Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion_page_pool.c | 7 --- 1 file changed, 7 deletions(-) diff --git a

[PATCH v2 4/9] staging: android: ion: Avoid NULL point in error path

2018-02-12 Thread Yisheng Xie
debug_root, then a NULL point will occur. Fix this by avoiding call dentry_path, but show the debug name only when failed to create debug file for shrinker. Acked-by: Laura Abbott Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.c | 10 +++--- 1 file changed, 3 insertions(+), 7

[PATCH v2 9/9] staging: android: ion: Combine cache and uncache pools

2018-02-12 Thread Yisheng Xie
Now we call dma_map in the dma_buf API callbacks and handle explicit caching by the dma_buf sync API, which make cache and uncache pools in the same handling flow, which can be combined. Acked-by: Sumit Semwal Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.c | 5

[PATCH v2 5/9] staging: android: ion: Remove lable debugfs_done

2018-02-12 Thread Yisheng Xie
When failed to create debug_root, we will go on initail other part of ion, so we can just info this message to user and do not need a lable to jump. Acked-by: Laura Abbott Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.c | 5 + 1 file changed, 1 insertion(+), 4 deletions

[PATCH v2 6/9] staging: android: ion: Remove dead code in ion_page_pool_free

2018-02-12 Thread Yisheng Xie
ion_page_pool_add will always return 0, however ion_page_pool_free will call ion_page_pool_free_pages when ion_page_pool_add's return value is not 0, so it is a dead code which can be removed. Acked-by: Laura Abbott Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion_page_pool.

[PATCH v2 8/9] staging: android: ion: Cleanup ion_page_pool_alloc_pages

2018-02-12 Thread Yisheng Xie
ion_page_pool_alloc_pages calls alloc_pages to allocate pages for page pools. If alloc_pages return NULL, it will return NULL, or it will return the pages allocate from alloc_pages. So we can just return alloc_pages without any judgement. Acked-by: Sumit Semwal Signed-off-by: Yisheng Xie

[PATCH v2 0/9] staging: android: ion: Some cleanup about ion

2018-02-12 Thread Yisheng Xie
acks and rebase them to v4.15-rc1. Thanks. [1] https://lkml.org/lkml/2018/1/31/711 [2] https://lkml.org/lkml/2018/2/1/240 [3] https://lkml.org/lkml/2018/2/4/320 [4] https://lkml.org/lkml/2018/2/6/949 Yisheng Xie (9): staging: android: ion: Remove unused declaration

[PATCH v2 7/9] staging: android: ion: Return void instead of int

2018-02-12 Thread Yisheng Xie
Now, nobody care about the return value of ion_page_pool_add, therefore we can just make it return void. Acked-by: Laura Abbott Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion_page_pool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging

[PATCH v2 2/9] staging: android: ion: Remove unused include files for ion_page_pool.c

2018-02-12 Thread Yisheng Xie
After rewrite of ion_page_pool, some of its include file is no need anymore, just remove it. Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion_page_pool.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android

[PATCH v2 1/9] staging: android: ion: Remove unused declaration ion_buffer_fault_user_mappings

2018-02-12 Thread Yisheng Xie
ion_buffer_fault_user_mappings's definition has been removed and not be used anymore, just remove its useless declaration. Acked-by: Laura Abbott Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.h | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/an

Re: [PATCH v6] devres: combine function devm_ioremap*

2018-02-12 Thread Yisheng Xie
Hi Greg, Christophe, Any comment about this version? And sorry to disturb :) Thanks Yisheng On 2018/1/29 19:48, Yisheng Xie wrote: > When I tried to use devm_ioremap function and review related > code, I found devm_ioremap_* almost have the similar realize > with each other, whi

Re: [PATCH v2 0/9] staging: android: ion: Some cleanup about ion

2018-02-12 Thread Yisheng Xie
Hi Dan, On 2018/2/12 19:17, Dan Carpenter wrote: > On Mon, Feb 12, 2018 at 06:43:05PM +0800, Yisheng Xie wrote: >> Hi all, >> >> When I tried to review the code of ion, I find that there are many place >> can be cleanup, so I post this patchset. >> >> I mar

Re: [PATCH 1/2] staging: android: ion: Avoid NULL point in error path

2018-02-12 Thread Yisheng Xie
Hi Greg, JFYI, I have rebase this patchset to v4.15-rc1.[1] [1] https://lkml.org/lkml/2018/2/12/204 Thanks Yisheng On 2018/2/1 20:34, Yisheng Xie wrote: > If we failed to create debugfs for ion at ion_device_create, the > debug_root of ion_device will be NULL, and then when try to create

Re: [PATCH resend 1/3] staging: android: ion: Remove unused declaration ion_buffer_fault_user_mappings

2018-02-12 Thread Yisheng Xie
Hi Greg, JFYI, I have rebase this patchset to v4.15-rc1.[1] [1] https://lkml.org/lkml/2018/2/12/204 Thanks Yisheng On 2018/2/1 9:54, Yisheng Xie wrote: > ion_buffer_fault_user_mappings's definition has been removed and not be > used anymore, just remove its useless declaration. >

Re: [PATCH 1/2] staging: android: ion: Remove dead code in ion_page_pool_free

2018-02-12 Thread Yisheng Xie
Hi Greg, JFYI, I have rebase this patchset to v4.15-rc1.[1] [1] https://lkml.org/lkml/2018/2/12/204 Thanks Yisheng On 2018/2/5 11:26, Yisheng Xie wrote: > ion_page_pool_add will always return 0, however ion_page_pool_free will > call ion_page_pool_free_pages when ion_page_pool_add&#x

Re: [PATCH 1/2] staging: android: ion: Cleanup ion_page_pool_alloc_pages

2018-02-12 Thread Yisheng Xie
Hi Greg, JFYI, I have rebase this patchset to v4.15-rc1.[1] [1] https://lkml.org/lkml/2018/2/12/204 Thanks Yisheng On 2018/2/7 11:59, Yisheng Xie wrote: > ion_page_pool_alloc_pages calls alloc_pages to allocate pages for page > pools. If alloc_pages return NULL, it will return NULL, or i

Re: [PATCH v6] devres: combine function devm_ioremap*

2018-02-12 Thread Yisheng Xie
Hi Christophe, On 2018/2/12 19:21, Christophe LEROY wrote: > Hi Yisheng, > > I don't have any comment. > > Reviewed-by: Thanks Yisheng > > Christophe > > Le 12/02/2018 à 12:07, Yisheng Xie a écrit : >> Hi Greg, Christophe, >> >> Any

Re: [PATCH] staging: android: ion: minor cleanup for ion_page_pool

2018-02-06 Thread Yisheng Xie
Hi Laura, On 2018/2/7 6:51, Laura Abbott wrote: > On 01/31/2018 01:50 AM, Yisheng Xie wrote: >> ion_page_pool.c now is used to apply pool APIs for system heap, which do >> not need do any initial at device_initcall. >> >> Meanwhile, this patch also remove some useless i

Re: [PATCH 1/2] staging: android: ion: Remove dead code in ion_page_pool_free

2018-02-06 Thread Yisheng Xie
Hi Laura, On 2018/2/7 7:11, Laura Abbott wrote: > On 02/06/2018 03:10 PM, Laura Abbott wrote: >> On 02/04/2018 07:26 PM, Yisheng Xie wrote: >>> ion_page_pool_add will always return 0, however ion_page_pool_free will >>> call ion_page_pool_free_pages when ion_page

[PATCH 2/2] staging: android: ion: Combine cache and uncache pools

2018-02-06 Thread Yisheng Xie
Now we call dma_map in the dma_buf API callbacks and handle explicit caching by the dma_buf sync API, which make cache and uncache pools in the same handling flow, which can be combined. Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.c | 5 -- drivers/staging

[PATCH 1/2] staging: android: ion: Cleanup ion_page_pool_alloc_pages

2018-02-06 Thread Yisheng Xie
ion_page_pool_alloc_pages calls alloc_pages to allocate pages for page pools. If alloc_pages return NULL, it will return NULL, or it will return the pages allocate from alloc_pages. So we can just return alloc_pages without any judgement. Signed-off-by: Yisheng Xie --- drivers/staging/android

[PATCH v3 0/3] some fixes and clean up for mempolicy

2017-11-16 Thread Yisheng Xie
et_nodes's mask miscalculation * remove redundant check in get_nodes * fix the check of nodemask from user - per Vlastimil Any comment and complain is welome. Thanks Yisheng Xie [1] https://patchwork.kernel.org/patch/10012005/ [2] https://patchwork.kernel.org/patch/10013329/ Yisheng Xie (3):

[PATCH v3 1/3] mm/mempolicy: remove redundant check in get_nodes

2017-11-16 Thread Yisheng Xie
We have already checked whether maxnode is a page worth of bits, by: maxnode > PAGE_SIZE*BITS_PER_BYTE So no need to check it once more. Acked-by: Vlastimil Babka Signed-off-by: Yisheng Xie --- mm/mempolicy.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/mempolicy.c b

[PATCH v3 3/3] mm/mempolicy: add nodes_empty check in SYSC_migrate_pages

2017-11-16 Thread Yisheng Xie
check whether AND node_states[N_MEMORY] is empty. Signed-off-by: Yisheng Xie --- mm/mempolicy.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 65df28d..f604b22 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1433,10 +14

[PATCH v3 2/3] mm/mempolicy: fix the check of nodemask from user

2017-11-16 Thread Yisheng Xie
ind.2.html [3] http://man7.org/linux/man-pages/man2/migrate_pages.2.html Reported-by: Tan Xiaojun Signed-off-by: Yisheng Xie --- mm/mempolicy.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 6e867a8..65df28d 1

[PATCH] kmemcheck: add scheduling point to kmemleak_scan

2017-11-16 Thread Yisheng Xie
] ? selinux_file_permission+0xda/0x130 [ 220.784479] ? _cond_resched+0x15/0x30 [ 220.788221] vfs_write+0xad/0x1a0 [ 220.791529] SyS_write+0x52/0xc0 [ 220.794758] do_syscall_64+0x61/0x1a0 [ 220.798411] entry_SYSCALL64_slow_path+0x25/0x25 Fix this by adding cond_resched every 1024 pages. Signed-off-by: Yisheng

Re: [PATCH v2] devres: use MACRO instead of function for devm_ioremap

2017-12-21 Thread Yisheng Xie
Hi Greg, On 2017/12/19 18:52, Yisheng Xie wrote: > Hi Greg, > > On 2017/12/19 16:46, Greg KH wrote: >> On Sat, Nov 25, 2017 at 05:23:33PM +0800, Yisheng Xie wrote: >>> Default ioremap is ioremap_nocache, so devm_ioremap has the same function >>> with devm_i

Re: [PATCH v2] devres: use MACRO instead of function for devm_ioremap

2017-12-22 Thread Yisheng Xie
Hi Greg, On 2017/12/21 23:08, Greg KH wrote: > On Thu, Dec 21, 2017 at 07:50:16PM +0800, Yisheng Xie wrote: >> Hi Greg, >> >> On 2017/12/19 18:52, Yisheng Xie wrote: >>> Hi Greg, >>> >>> On 2017/12/19 16:46, Greg KH wrote: >>>>

[PATCH v2] kmemleak: add scheduling point to kmemleak_scan

2017-11-23 Thread Yisheng Xie
: Catalin Marinas Signed-off-by: Yisheng Xie --- v2: * call cond_resched() every MAX_SCAN_SIZE for consistency with the other places * fix the subject of the patch. - Both per Catalin mm/kmemleak.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/kmemleak.c b/mm/kmemleak.c index e4738d5

Re: [PATCH v2] devres: use MACRO instead of function for devm_ioremap

2017-12-18 Thread Yisheng Xie
Hi Greg, On 2017/12/18 22:40, Greg KH wrote: > On Mon, Dec 11, 2017 at 04:23:11PM +0800, Yisheng Xie wrote: >> Ping... and sorry to disturb. >> >> Hi maintainers, >> Could you please help to review this patch? > > Wow, I don't think anyone "maintains&qu

Re: [PATCH v2] devres: use MACRO instead of function for devm_ioremap

2017-12-19 Thread Yisheng Xie
Hi Greg, On 2017/12/19 16:46, Greg KH wrote: > On Sat, Nov 25, 2017 at 05:23:33PM +0800, Yisheng Xie wrote: >> Default ioremap is ioremap_nocache, so devm_ioremap has the same function >> with devm_ioremap_nocache, which may just be killed. However, there are >>

[PATCH v3 00/27] kill devm_ioremap_nocache

2017-12-23 Thread Yisheng Xie
kill devm_ioremap_nocache for no need to keep a macro around for the duplicate thing. So here comes v3 and please help to review. Thanks so much! Yisheng Xie [1] https://lkml.org/lkml/2017/11/20/135 [2] https://lkml.org/lkml/2017/11/25/21 Yisheng Xie (27): ASOC: replace devm_ioremap_nocache

[PATCH v3 01/27] ASOC: replace devm_ioremap_nocache with devm_ioremap

2017-12-23 Thread Yisheng Xie
devm_ioremap_nocache. Cc: Liam Girdwood Cc: Mark Brown Cc: alsa-de...@alsa-project.org Signed-off-by: Yisheng Xie --- sound/soc/au1x/ac97c.c| 4 ++-- sound/soc/au1x/i2sc.c | 4 ++-- sound/soc/intel/atom/sst/sst_acpi.c | 20 ++-- sound/soc/intel

[PATCH v3 03/27] staging: replace devm_ioremap_nocache with devm_ioremap

2017-12-23 Thread Yisheng Xie
devm_ioremap_nocache. Cc: Greg Kroah-Hartman Cc: de...@driverdev.osuosl.org Signed-off-by: Yisheng Xie --- drivers/staging/fsl-mc/bus/mc-io.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/mc-io.c b/drivers/staging/fsl-mc/bus/mc-io.c index

[PATCH v3 02/27] spi: replace devm_ioremap_nocache with devm_ioremap

2017-12-23 Thread Yisheng Xie
devm_ioremap_nocache. Cc: Mark Brown Cc: linux-...@vger.kernel.org Signed-off-by: Yisheng Xie --- drivers/spi/spi-jcore.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi-jcore.c b/drivers/spi/spi-jcore.c index cebfea5..32f538e 100644 --- a/drivers/spi/spi

<    1   2   3   4   5   >