hmem pages are
still a part of it.
Signed-off-by: Yang Shi
Cc: Hugh Dickins
Cc: Kirill A. Shutemov
---
mm/huge_memory.c | 4 ++--
mm/memory.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 1cd7c1a..2687f7c 100644
--- a/mm/hug
On 6/19/18 3:02 AM, Peter Zijlstra wrote:
On Tue, Jun 19, 2018 at 07:34:16AM +0800, Yang Shi wrote:
diff --git a/mm/mmap.c b/mm/mmap.c
index fc41c05..e84f80c 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2686,6 +2686,141 @@ int split_vma(struct mm_struct *mm, struct
vm_area_struct *vma
commit 1efff914afac8a965ad63817ecf8861a927c2ace ("fs: add
dirtytime_expire_seconds sysctl") introduced dirtytime_expire_seconds
knob, but there is not description about it in
Documentation/sysctl/vm.txt.
Add the description for it.
Cc: Theodore Ts'o
Signed-off-by: Yang Shi
-
On 7/2/18 11:17 PM, Michal Hocko wrote:
On Mon 02-07-18 11:10:23, Yang Shi wrote:
On 7/2/18 10:57 AM, Michal Hocko wrote:
[...]
Why would you even care about shared mappings?
Just thought about we are dealing with VM_DEAD, which means the vma will be
tore down soon regardless it is shared
On 7/2/18 11:09 PM, Michal Hocko wrote:
On Mon 02-07-18 13:48:45, Andrew Morton wrote:
On Mon, 2 Jul 2018 16:05:02 +0200 Michal Hocko wrote:
On Fri 29-06-18 20:15:47, Andrew Morton wrote:
[...]
Would one of your earlier designs have addressed all usecases? I
expect the dumb unmap-a-littl
On 7/3/18 3:39 AM, Theodore Y. Ts'o wrote:
On Tue, Jul 03, 2018 at 12:11:18PM +0800, Yang Shi wrote:
direct reclaim doesn't write out filesystem page, only kswapd could do
it. So, if the call comes from direct reclaim, it is definitely a bug.
And, Mel Gormane also mentioned &
On 7/2/18 11:09 PM, Michal Hocko wrote:
On Mon 02-07-18 13:48:45, Andrew Morton wrote:
On Mon, 2 Jul 2018 16:05:02 +0200 Michal Hocko wrote:
On Fri 29-06-18 20:15:47, Andrew Morton wrote:
[...]
Would one of your earlier designs have addressed all usecases? I
expect the dumb unmap-a-littl
On 7/3/18 10:05 AM, Yang Shi wrote:
On 7/3/18 3:39 AM, Theodore Y. Ts'o wrote:
On Tue, Jul 03, 2018 at 12:11:18PM +0800, Yang Shi wrote:
direct reclaim doesn't write out filesystem page, only kswapd could do
it. So, if the call comes from direct reclaim, it is definitely a bug.
ping
Ted,
Any comment is appreciated.
Regards,
Yang
On 5/30/18 4:56 PM, Yang Shi wrote:
commit 1efff914afac8a965ad63817ecf8861a927c2ace ("fs: add
dirtytime_expire_seconds sysctl") introduced dirtytime_expire_seconds
knob, but there is not description about it in
Documentat
ped to us level
from second.
munmap_test-15002 [008] 594.380138: funcgraph_entry: | vm_munmap_zap_rlock()
{
munmap_test-15002 [008] 594.380146: funcgraph_entry: !2485684 us |
unmap_region();
munmap_test-15002 [008] 596.865836: funcgraph_exit: !2485692 us | }
Here the excuti
: Vlastimil Babka
Signed-off-by: Yang Shi
---
mm/mmap.c | 106 +++---
1 file changed, 74 insertions(+), 32 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index 17bbf4d..f05f49b 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2681,35 +2681,42
When unmapping VM_HUGETLB mappings, vm flags need to be updated. Since
the vmas have been detached, so it sounds safe to update vm flags with
read mmap_sem.
Cc: Michal Hocko
Cc: Vlastimil Babka
Signed-off-by: Yang Shi
---
mm/mmap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
When unmapping VM_PFNMAP mappings, vm flags need to be updated. Since
the vmas have been detached, so it sounds safe to update vm flags with
read mmap_sem.
Cc: Michal Hocko
Cc: Vlastimil Babka
Signed-off-by: Yang Shi
---
mm/mmap.c | 13 +
1 file changed, 5 insertions(+), 8
d mmap_sem, then the remaining time is used with holding
exclusive lock.
[1] https://lwn.net/Articles/753269/
Suggested-by: Michal Hocko
Suggested-by: Kirill A. Shutemov
Cc: Matthew Wilcox
Cc: Laurent Dufour
Cc: Vlastimil Babka
Cc: And
Zijlstra
Cc: Ingo Molnar
Cc: Arnaldo Carvalho de Melo
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Vlastimil Babka
Signed-off-by: Yang Shi
---
include/linux/uprobes.h | 7 +++
kernel/events/uprobes.c | 23 ---
2 files changed, 23 insertions(+), 7 deletions
On 8/15/18 2:09 PM, Matthew Wilcox wrote:
On Wed, Aug 15, 2018 at 12:16:06PM -0700, Matthew Wilcox wrote:
(not even compiled, and I can see a good opportunity for combining the
VM_LOCKED loop with the has_uprobes loop)
I was rushing to get that sent earlier. Here it is tidied up to
actually
On 8/15/18 7:46 PM, Matthew Wilcox wrote:
On Wed, Aug 15, 2018 at 02:54:13PM -0700, Yang Shi wrote:
On 8/15/18 2:09 PM, Matthew Wilcox wrote:
On Wed, Aug 15, 2018 at 12:16:06PM -0700, Matthew Wilcox wrote:
(not even compiled, and I can see a good opportunity for combining the
VM_LOCKED
Cc'ed Peter, Ingo and Waiman.
It took me a few days to look into this warning, but I got lost in
lockdep code.
The problem is the commit dd2283f2605e ("mm: mmap: zap pages with read
mmap_sem in munmap") does an optimization for munmap by downgrading
write mmap_sem to read before zapping pa
On 12/13/18 7:29 AM, Kirill Tkhai wrote:
This patch adds an optimization for KSM pages almost
in the same way, that we have for ordinary anonymous
pages. If there is a write fault in a page, which is
mapped to an only pte, and it is not related to swap
cache; the page may be reused without cop
ive stall
for such case.
Cc: Huang Ying
Cc: Tim Chen
Cc: Minchan Kim
Signed-off-by: Yang Shi
---
mm/swap_state.c | 4
1 file changed, 4 insertions(+)
diff --git a/mm/swap_state.c b/mm/swap_state.c
index fd2f21e..7cc3c29 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -538,11 +538
swap_vma_readahead()'s comment is missed, just add it.
Cc: Huang Ying
Cc: Tim Chen
Cc: Minchan Kim
Signed-off-by: Yang Shi
---
mm/swap_state.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/mm/swap_state.c b/mm/swap_state.c
index 7cc3c29..c12aedf 100644
---
On 12/18/18 11:29 AM, Tim Chen wrote:
On 12/17/18 10:52 PM, Yang Shi wrote:
diff --git a/mm/swap_state.c b/mm/swap_state.c
index fd2f21e..7cc3c29 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -538,11 +538,15 @@ struct page *swap_cluster_readahead(swp_entry_t entry,
gfp_t gfp_mask
On 12/18/18 4:16 PM, Tim Chen wrote:
On 12/18/18 3:43 PM, Yang Shi wrote:
On 12/18/18 11:29 AM, Tim Chen wrote:
On 12/17/18 10:52 PM, Yang Shi wrote:
diff --git a/mm/swap_state.c b/mm/swap_state.c
index fd2f21e..7cc3c29 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -538,11
On 12/19/18 9:28 AM, Tim Chen wrote:
On 12/18/18 9:56 PM, Yang Shi wrote:
On 12/18/18 4:16 PM, Tim Chen wrote:
On 12/18/18 3:43 PM, Yang Shi wrote:
On 12/18/18 11:29 AM, Tim Chen wrote:
On 12/17/18 10:52 PM, Yang Shi wrote:
diff --git a/mm/swap_state.c b/mm/swap_state.c
index fd2f21e
On 12/19/18 11:00 AM, Tim Chen wrote:
On 12/19/18 10:40 AM, Yang Shi wrote:
I don't think your dereference inode = si->swap_file->f_mapping->host
is always safe. You should do it only when (si->flags & SWP_FS) is true.
Do you mean it is not safe for swap partition?
On 12/14/18 1:26 AM, Kirill Tkhai wrote:
On 13.12.2018 22:15, Yang Shi wrote:
On 12/13/18 7:29 AM, Kirill Tkhai wrote:
This patch adds an optimization for KSM pages almost
in the same way, that we have for ordinary anonymous
pages. If there is a write fault in a page, which is
mapped to an
On Fri, Dec 14, 2018 at 3:03 PM Mel Gorman wrote:
>
> Pages with no migration handler use a fallback hander which sometimes
> works and sometimes persistently fails such as blockdev pages. Migration
A minor correction. The above statement sounds not accurate anymore
since Jan Kara had patch serie
ive stall
for such case.
Cc: Huang Ying
Cc: Tim Chen
Cc: Minchan Kim
Signed-off-by: Yang Shi
---
v2: Check the swap device type per Tim Chen
mm/swap_state.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/mm/swap_state.c b/mm/swap_state.c
index fd2f21e..ba7e334 100644
--- a/mm/swap_stat
swap_vma_readahead()'s comment is missed, just add it.
Cc: Huang Ying
Cc: Tim Chen
Cc: Minchan Kim
Signed-off-by: Yang Shi
---
mm/swap_state.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/mm/swap_state.c b/mm/swap_state.c
index ba7e334..b96f369 100644
---
On 12/20/18 10:04 PM, Hugh Dickins wrote:
On Thu, 20 Dec 2018, Andrew Morton wrote:
Is anyone interested in reviewing this? Seems somewhat serious.
Thanks.
Somewhat serious, but no need to rush.
From: Yang Shi
Subject: mm: vmscan: skip KSM page in direct reclaim if priority is low
When
On 12/21/18 10:34 AM, Tim Chen wrote:
On 12/20/18 4:21 PM, Yang Shi wrote:
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -538,11 +538,17 @@ struct page *swap_cluster_readahead(swp_entry_t entry,
gfp_t gfp_mask,
bool do_poll = true, page_allocated;
struct vm_area_struct
ive stall
for such case.
Cc: Huang Ying
Cc: Tim Chen
Cc: Minchan Kim
Signed-off-by: Yang Shi
---
v3: Move inode deference under swap device type check per Tim Chen
v2: Check the swap device type per Tim Chen
mm/swap_state.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/mm/swap_state.
swap_vma_readahead()'s comment is missed, just add it.
Cc: Huang Ying
Cc: Tim Chen
Cc: Minchan Kim
Signed-off-by: Yang Shi
---
mm/swap_state.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/mm/swap_state.c b/mm/swap_state.c
index 78d500e..dd8f698 100644
---
On 12/21/18 2:42 PM, Tim Chen wrote:
On 12/21/18 1:40 PM, Yang Shi wrote:
Swap readahead would read in a few pages regardless if the underlying
device is busy or not. It may incur long waiting time if the device is
congested, and it may also exacerbate the congestion.
Use
On 1/4/19 12:03 PM, Greg Thelen wrote:
Yang Shi wrote:
On 1/3/19 11:23 AM, Michal Hocko wrote:
On Thu 03-01-19 11:10:00, Yang Shi wrote:
On 1/3/19 10:53 AM, Michal Hocko wrote:
On Thu 03-01-19 10:40:54, Yang Shi wrote:
On 1/3/19 10:13 AM, Michal Hocko wrote:
[...]
Is there any reason
On 1/4/19 12:03 PM, Greg Thelen wrote:
Yang Shi wrote:
On 1/3/19 11:23 AM, Michal Hocko wrote:
On Thu 03-01-19 11:10:00, Yang Shi wrote:
On 1/3/19 10:53 AM, Michal Hocko wrote:
On Thu 03-01-19 10:40:54, Yang Shi wrote:
On 1/3/19 10:13 AM, Michal Hocko wrote:
[...]
Is there any reason
On 1/4/19 2:57 PM, Yang Shi wrote:
On 1/4/19 12:03 PM, Greg Thelen wrote:
Yang Shi wrote:
On 1/3/19 11:23 AM, Michal Hocko wrote:
On Thu 03-01-19 11:10:00, Yang Shi wrote:
On 1/3/19 10:53 AM, Michal Hocko wrote:
On Thu 03-01-19 10:40:54, Yang Shi wrote:
On 1/3/19 10:13 AM, Michal
#1: Fix some obsolete information about force_empty in the document
Patch #2: A minor improvement to skip swap for force_empty
Patch #3: Introduces wipe_on_offline interface
Patch #4: Being force_empty into default hierarchy
Patch #5: Document update
Yang Shi (5):
doc: memcontrol: fix the obs
Add desprition of wipe_on_offline interface in cgroup documents.
Cc: Michal Hocko
Cc: Johannes Weiner
Signed-off-by: Yang Shi
---
Documentation/admin-guide/cgroup-v2.rst | 9 +
Documentation/cgroup-v1/memory.txt | 10 ++
2 files changed, 19 insertions(+)
diff --git a
force_empty is still needed by some
usecases which want to get the memory reclaimed immediately. So, bring
force_empty interface in default hierarchy too.
Cc: Michal Hocko
Cc: Johannes Weiner
Signed-off-by: Yang Shi
---
Documentation/admin-guide/cgroup-v2.rst | 14 ++
e for such usecase sounds
reasonable. Introduced a new interface, called wipe_on_offline for both
default and legacy hierarchy, which does memory reclaim in css offline
kworker.
Writing to 1 would enable it, writing 0 would disable it.
Suggested-by: Michal Hocko
Cc: Johannes Weiner
Signed-off-by
10473001049356
Without doing swap, force empty can reclaim 2MB more memory in 1GB page
cache.
Cc: Michal Hocko
Cc: Johannes Weiner
Signed-off-by: Yang Shi
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
We don't do page cache reparent anymore when offlining memcg, so update
force empty related content accordingly.
Reviewed-by: Shakeel Butt
Acked-by: Michal Hocko
Cc: Johannes Weiner
Signed-off-by: Yang Shi
---
Documentation/cgroup-v1/memory.txt | 7 ---
1 file changed, 4 insertions(
empty synchronously, any
other value will tell kernel to do force empty in css offline worker.
Patch #1: Fix some obsolete information about force_empty in the document
Patch #2: A minor improvement to skip swap for force_empty
Patch #3: Implement delayed force_empty
Yang Shi (3):
doc: memcontrol
10473001049356
Without doing swap, force empty can reclaim 2MB more memory in 1GB page
cache.
Cc: Michal Hocko
Cc: Johannes Weiner
Signed-off-by: Yang Shi
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
We don't do page cache reparent anymore when offlining memcg, so update
force empty related content accordingly.
Cc: Michal Hocko
Cc: Johannes Weiner
Signed-off-by: Yang Shi
---
Documentation/cgroup-v1/memory.txt | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --
empty synchronously, any
other value will tell kernel to do force empty in css offline worker.
Cc: Michal Hocko
Cc: Johannes Weiner
Signed-off-by: Yang Shi
---
Documentation/cgroup-v1/memory.txt | 8 ++--
include/linux/memcontrol.h | 2 ++
mm/memcontrol.c
On 1/2/19 1:45 PM, Shakeel Butt wrote:
On Wed, Jan 2, 2019 at 12:06 PM Yang Shi wrote:
The typical usecase of force empty is to try to reclaim as much as
possible memory before offlining a memcg. Since there should be no
attached tasks to offlining memcg, the tasks anonymous pages would
On 1/2/19 3:00 PM, Daniel Jordan wrote:
On Sun, Dec 30, 2018 at 12:49:34PM +0800, Yang Shi wrote:
The test on my virtual machine with congested HDD shows long tail
latency is reduced significantly.
Without the patch
page_fault1_thr-1490 [023] 129.311706: funcgraph_entry
On 1/2/19 11:41 PM, Huang, Ying wrote:
Yang Shi writes:
swap_vma_readahead()'s comment is missed, just add it.
Cc: Huang Ying
Cc: Tim Chen
Cc: Minchan Kim
Signed-off-by: Yang Shi
---
mm/swap_state.c | 17 +
1 file changed, 17 insertions(+)
diff --git
On 1/3/19 2:12 AM, Michal Hocko wrote:
On Thu 03-01-19 04:05:30, Yang Shi wrote:
Currently, force empty reclaims memory synchronously when writing to
memory.force_empty. It may take some time to return and the afterwards
operations are blocked by it. Although it can be interrupted by
On 1/3/19 9:03 AM, Shakeel Butt wrote:
On Thu, Jan 3, 2019 at 8:57 AM Yang Shi wrote:
On 1/2/19 1:45 PM, Shakeel Butt wrote:
On Wed, Jan 2, 2019 at 12:06 PM Yang Shi wrote:
The typical usecase of force empty is to try to reclaim as much as
possible memory before offlining a memcg
On 1/3/19 10:13 AM, Michal Hocko wrote:
On Thu 03-01-19 09:33:14, Yang Shi wrote:
On 1/3/19 2:12 AM, Michal Hocko wrote:
On Thu 03-01-19 04:05:30, Yang Shi wrote:
Currently, force empty reclaims memory synchronously when writing to
memory.force_empty. It may take some time to return and
On 1/3/19 10:53 AM, Michal Hocko wrote:
On Thu 03-01-19 10:40:54, Yang Shi wrote:
On 1/3/19 10:13 AM, Michal Hocko wrote:
On Thu 03-01-19 09:33:14, Yang Shi wrote:
On 1/3/19 2:12 AM, Michal Hocko wrote:
On Thu 03-01-19 04:05:30, Yang Shi wrote:
Currently, force empty reclaims memory
swap_vma_readahead()'s comment is missed, just add it.
Cc: Huang Ying
Cc: Tim Chen
Cc: Minchan Kim
Signed-off-by: Yang Shi
---
v5: Fixed the comments per Ying Huang
mm/swap_state.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/mm/swap_state.c
try:3.600us |
do_swap_page();
runtest.py-1417 [020] 301.935878: funcgraph_entry:7.202us |
do_swap_page();
Acked-by: Tim Chen
Cc: Huang Ying
Cc: Minchan Kim
Cc: Daniel Jordan
Signed-off-by: Yang Shi
---
v5: Elaborate more about the test case per Daniel
v4: Added obser
On 1/3/19 11:23 AM, Michal Hocko wrote:
On Thu 03-01-19 11:10:00, Yang Shi wrote:
On 1/3/19 10:53 AM, Michal Hocko wrote:
On Thu 03-01-19 10:40:54, Yang Shi wrote:
On 1/3/19 10:13 AM, Michal Hocko wrote:
[...]
Is there any reason for your scripts to be strictly sequential here? In
other
On 1/3/19 12:01 PM, Michal Hocko wrote:
On Thu 03-01-19 11:49:32, Yang Shi wrote:
On 1/3/19 11:23 AM, Michal Hocko wrote:
On Thu 03-01-19 11:10:00, Yang Shi wrote:
On 1/3/19 10:53 AM, Michal Hocko wrote:
On Thu 03-01-19 10:40:54, Yang Shi wrote:
On 1/3/19 10:13 AM, Michal Hocko wrote
On 1/4/19 12:55 AM, Michal Hocko wrote:
On Thu 03-01-19 20:15:30, Yang Shi wrote:
On 1/3/19 12:01 PM, Michal Hocko wrote:
On Thu 03-01-19 11:49:32, Yang Shi wrote:
On 1/3/19 11:23 AM, Michal Hocko wrote:
On Thu 03-01-19 11:10:00, Yang Shi wrote:
On 1/3/19 10:53 AM, Michal Hocko wrote
On Wed, Dec 26, 2018 at 9:13 PM Dan Williams wrote:
>
> On Wed, Dec 26, 2018 at 8:11 PM Fengguang Wu wrote:
> >
> > On Wed, Dec 26, 2018 at 07:41:41PM -0800, Matthew Wilcox wrote:
> > >On Wed, Dec 26, 2018 at 09:14:47PM +0800, Fengguang Wu wrote:
> > >> From: Fan Du
> > >>
> > >> This is a hack
On Fri, Dec 28, 2018 at 5:31 AM Fengguang Wu wrote:
>
> >> > I haven't looked at the implementation yet but if you are proposing a
> >> > special cased zone lists then this is something CDM (Coherent Device
> >> > Memory) was trying to do two years ago and there was quite some
> >> > skepticism in
On 12/28/18 4:42 PM, Andrew Morton wrote:
On Sat, 22 Dec 2018 05:40:19 +0800 Yang Shi wrote:
Swap readahead would read in a few pages regardless if the underlying
device is busy or not. It may incur long waiting time if the device is
congested, and it may also exacerbate the congestion
swap_vma_readahead()'s comment is missed, just add it.
Cc: Huang Ying
Cc: Tim Chen
Cc: Minchan Kim
Signed-off-by: Yang Shi
---
mm/swap_state.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/mm/swap_state.c b/mm/swap_state.c
index 78d500e..dd8f698 100644
---
5us |
do_swap_page();
runtest.py-1417 [020] 301.935871: funcgraph_entry:3.600us |
do_swap_page();
runtest.py-1417 [020] 301.935878: funcgraph_entry:7.202us |
do_swap_page();
Acked-by: Tim Chen
Cc: Huang Ying
Cc: Minchan Kim
Signed-off-by: Yang Shi
---
age in direct reclaim if the reclaim priority is low, but
still try to reclaim KSM page with high priority.
Signed-off-by: Yang Shi
---
mm/vmscan.c | 23 +--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 62ac0c48..e821ad3 10
.
Introduce async mode to get_ksm_page() to not block on page lock, like
what try_to_merge_one_page() does.
Return -EBUSY if trylock fails, since NULL means not find suitable KSM
page, which is a valid case.
Signed-off-by: Yang Shi
---
mm/ksm.c | 29 +
1 file changed
: Andrew Morton
Signed-off-by: Yang Shi
---
Andrew, this should be able to be folded into the original patch.
mm/mmap.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index 68dc4fb..c78f7e9 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -242,17 +242,18
: Andrew Morton
Signed-off-by: Yang Shi
---
Andrew, this should be able to be folded into the original patch.
mm/mremap.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/mm/mremap.c b/mm/mremap.c
index 3524d16..f9d5d1f 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
re
context switches:
34925294 ± 18%+270.3% 1.293e+08 ± 4%
will-it-scale.time.voluntary_context_switches
Yang Shi, would you mind taking a look at what's going on?
No problem.
Actually, the commit is mainly for optimizing the long stall time caused
by holding mmap_sem by write wh
On 11/5/18 10:35 AM, Linus Torvalds wrote:
On Mon, Nov 5, 2018 at 10:28 AM Yang Shi wrote:
Actually, the commit is mainly for optimizing the long stall time caused
by holding mmap_sem by write when unmapping or shrinking large mapping.
It downgrades write mmap_sem to read when zapping pages
On 9/15/18 2:21 AM, Matthew Wilcox wrote:
On Sat, Sep 15, 2018 at 04:34:57AM +0800, Yang Shi wrote:
Suggested-by: Michal Hocko
Suggested-by: Kirill A. Shutemov
Suggested-by: Matthew Wilcox
Reviewed-by: Matthew Wilcox
Looks good! Thanks for sticking with this patch series.
Thanks for
On 9/15/18 3:10 AM, Matthew Wilcox wrote:
On Sat, Sep 15, 2018 at 04:34:56AM +0800, Yang Shi wrote:
Regression and performance data:
Did the below regression test with setting thresh to 4K manually in the code:
* Full LTP
* Trinity (munmap/all vm syscalls)
* Stress-ng: mmap/mmapfork
files support PMD-mapped THP,
but both don't have to do writeback. And it seems DAX doesn't have
writeback either, which uses __set_page_dirty_no_writeback() for
set_page_dirty. So this code should never be called IIUC.
But anyway your fix looks correct to me. Reviewed-by: Yang Shi
. It seems confusing. And the following patch
will remove using nid directly in do_shrink_slab(), this patch also helps
cleanup
the code.
Acked-by: Vlastimil Babka
Acked-by: Kirill Tkhai
Reviewed-by: Shakeel Butt
Acked-by: Roman Gushchin
Signed-off-by: Yang Shi
---
mm/vmscan.c | 2 +-
1
We have been running the patched kernel on some hosts of our fleet (test and
production) for
months, it works very well. The monitor data shows the working set is sustained
as expected.
Yang Shi (13):
mm: vmscan: use nid from shrink_control for tracepoint
mm: vmscan: consolidate shrin
: Roman Gushchin
Acked-by: Vlastimil Babka
Signed-off-by: Yang Shi
---
mm/vmscan.c | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 543af6ec1e02..2e753c2516fa 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -185,8 +185,12
Using kvfree_rcu() to free the old shrinker_maps instead of call_rcu().
We don't have to define a dedicated callback for call_rcu() anymore.
Signed-off-by: Yang Shi
---
mm/vmscan.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
larity.
And a test with heavy paging workload didn't show write lock makes things worse.
Acked-by: Vlastimil Babka
Acked-by: Kirill Tkhai
Acked-by: Roman Gushchin
Signed-off-by: Yang Shi
---
mm/vmscan.c | 18 --
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/
can.c for tighter integration with shrinker
code,
and remove the "memcg_" prefix. There is no functional change.
Acked-by: Vlastimil Babka
Acked-by: Kirill Tkhai
Acked-by: Roman Gushchin
Reviewed-by: Shakeel Butt
Signed-off-by: Yang Shi
---
include/linux/memcontrol.h | 11 ++--
m
ct the dereference into a helper to make the code more readable. No
functional change.
Acked-by: Roman Gushchin
Acked-by: Kirill Tkhai
Acked-by: Vlastimil Babka
Signed-off-by: Yang Shi
---
mm/vmscan.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/mm/vmscan.
he "memcg_" prefix.
Acked-by: Vlastimil Babka
Acked-by: Kirill Tkhai
Acked-by: Roman Gushchin
Signed-off-by: Yang Shi
---
include/linux/memcontrol.h | 8 +++---
mm/memcontrol.c| 6 ++--
mm/vmscan.c| 58 +++---
3 files changed,
This would prevent the shrinkers
from unregistering correctly.
Remove SHRINKER_REGISTERING since we could check if shrinker is registered
successfully by the new flag.
Acked-by: Kirill Tkhai
Acked-by: Vlastimil Babka
Signed-off-by: Yang Shi
---
include/linux/shrinker.h | 7 ---
ed all
the time.
Signed-off-by: Yang Shi
---
include/linux/memcontrol.h | 7 +++--
mm/vmscan.c| 60 ++
2 files changed, 46 insertions(+), 21 deletions(-)
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 4c9253896e25..c
Use per memcg's nr_deferred for memcg aware shrinkers. The shrinker's
nr_deferred
will be used in the following cases:
1. Non memcg aware shrinkers
2. !CONFIG_MEMCG
3. memcg is disabled by boot parameter
Signed-off-by: Yang Shi
---
mm/vms
rinker's SHRINKER_MEMCG_AWARE flag would be
cleared.
This makes the implementation of this patch simpler.
Acked-by: Vlastimil Babka
Reviewed-by: Kirill Tkhai
Acked-by: Roman Gushchin
Signed-off-by: Yang Shi
---
mm/vmscan.c | 31 ---
1 file changed, 16 insertions(+), 15 delet
Now shrinker's nr_deferred is per memcg for memcg aware shrinkers, add to
parent's
corresponding nr_deferred when memcg offline.
Acked-by: Vlastimil Babka
Acked-by: Kirill Tkhai
Acked-by: Roman Gushchin
Signed-off-by: Yang Shi
---
include/linux/memcontrol.h | 1 +
mm/me
x27;s patch:
https://lore.kernel.org/linux-xfs/20191031234618.15403-13-da...@fromorbit.com/
Tested with kernel build and vfs metadata heavy workload in our production
environment, no regression is spotted so far.
Signed-off-by: Yang Shi
---
mm/vmscan.c
On Wed, Apr 7, 2021 at 1:32 AM Mel Gorman wrote:
>
> On Tue, Apr 06, 2021 at 09:42:07AM -0700, Yang Shi wrote:
> > On Tue, Apr 6, 2021 at 5:03 AM Gerald Schaefer
> > wrote:
> > >
> > > On Thu, 1 Apr 2021 13:10:49 -0700
> > > Yang Shi wrote:
>
On Tue, Apr 6, 2021 at 8:06 PM wrote:
>
> From: Yanfei Xu
>
> We could use macro to deal with the addresses which need to be aligned
> to improve readability of codes.
Reviewed-by: Yang Shi
>
> Signed-off-by: Yanfei Xu
> ---
> mm/khugepaged.c | 27 ++
On Tue, Apr 6, 2021 at 8:06 PM wrote:
>
> From: Yanfei Xu
>
> We could check MMF_DISABLE_THP ahead of iterating over all of vma.
> Otherwise if some mm_struct contain a large number of vma, there will
> be amounts meaningless cpu cycles cost.
Reviewed-by: Yang Shi
>
>
On Thu, Apr 8, 2021 at 3:14 AM Oscar Salvador wrote:
>
> On Thu, Apr 01, 2021 at 11:32:23AM -0700, Dave Hansen wrote:
> >
> > From: Yang Shi
> >
> > The migrate_pages() returns the number of pages that were not migrated,
> > or an error code. When returni
On Thu, Apr 8, 2021 at 10:19 AM Shakeel Butt wrote:
>
> Hi Tim,
>
> On Mon, Apr 5, 2021 at 11:08 AM Tim Chen wrote:
> >
> > Traditionally, all memory is DRAM. Some DRAM might be closer/faster than
> > others NUMA wise, but a byte of media has about the same cost whether it
> > is close or far.
On Thu, Apr 8, 2021 at 11:17 AM Oscar Salvador wrote:
>
> On Thu, Apr 08, 2021 at 10:26:54AM -0700, Yang Shi wrote:
>
> > Thanks, Oscar. Yes, kind of. But we have to remember to initialize
> > "nr_succedded" pointer properly for every migrate_pages() callsite,
&g
On Thu, Apr 8, 2021 at 1:29 PM Shakeel Butt wrote:
>
> On Thu, Apr 8, 2021 at 11:01 AM Yang Shi wrote:
> >
> > On Thu, Apr 8, 2021 at 10:19 AM Shakeel Butt wrote:
> > >
> > > Hi Tim,
> > >
> > > On Mon, Apr 5, 2021 at 11:08 AM Tim Chen
>
On 2/26/18 5:47 PM, David Rientjes wrote:
On Mon, 26 Feb 2018, Yang Shi wrote:
Rather than killable, we have patches that introduce down_read_unfair()
variants for the files you've modified (cmdline and environ) as well as
others (maps, numa_maps, smaps).
You mean you have
this interface after a couple
of releases.
CC: Andrey Vagin
CC: Andrew Morton
CC: Pavel Emelyanov
CC: Michael Kerrisk
CC: Yang Shi
CC: Michal Hocko
Signed-off-by: Cyrill Gorcunov
---
Or we can simply drop it off because PR_SET_MM_MAP covers all needs,
and I would rather prefer to do that
On 4/3/18 10:35 PM, Michal Hocko wrote:
On Tue 03-04-18 16:15:20, Yang Shi wrote:
On 4/3/18 3:37 PM, Cyrill Gorcunov wrote:
An ability to manipulate mm_struct fields was introduced in
sake of CRIU in first place. Later we provide more suitable
and safe operation PR_SET_MM_MAP where all
orton
CC: Pavel Emelyanov
CC: Michael Kerrisk
CC: Yang Shi
CC: Michal Hocko
Signed-off-by: Cyrill Gorcunov
---
kernel/sys.c | 146
---
1 file changed, 2 insertions(+), 144 deletions(-)
Index: linux-ml.git/kernel/
ssage
- Drop redundant args check
CC: Andrey Vagin
CC: Andrew Morton
CC: Pavel Emelyanov
CC: Michael Kerrisk
CC: Yang Shi
CC: Michal Hocko
Signed-off-by: Cyrill Gorcunov
Acked-by: Yang Shi
---
kernel/sys.c | 151
---
1 file chang
On 3/27/18 2:29 AM, Michal Hocko wrote:
On Tue 27-03-18 02:20:39, Yang Shi wrote:
[...]
The patch looks reasonable to me. Maybe it would be better to be more
explicit about the purpose of the patch. As others noticed, this alone
wouldn't solve the mmap_sem contention issues. I _think_ th
201 - 300 of 1402 matches
Mail list logo