On Wed, Jan 10, 2018 at 03:06:47PM -0500, Dan Streetman wrote:
> On Tue, Jan 9, 2018 at 5:47 PM, Yu Zhao wrote:
> > On Tue, Jan 09, 2018 at 01:25:18PM -0500, Dan Streetman wrote:
> >> On Mon, Jan 8, 2018 at 5:51 PM, Yu Zhao wrote:
> >> > We waste sizeof(swp_entry_
We waste sizeof(swp_entry_t) for zswap header when using zsmalloc
as zpool driver because zsmalloc doesn't support eviction.
Add zpool_evictable() to detect if zpool is potentially evictable,
and use it in zswap to avoid waste memory for zswap header.
Signed-off-by: Yu Zhao
---
include/
We waste sizeof(swp_entry_t) for zswap header when using zsmalloc
as zpool driver because zsmalloc doesn't support eviction.
Add zpool_evictable() to detect if zpool is potentially evictable,
and use it in zswap to avoid waste memory for zswap header.
Signed-off-by: Yu Zhao
---
include/
On Wed, Jan 10, 2018 at 02:47:41PM -0800, Yu Zhao wrote:
> We waste sizeof(swp_entry_t) for zswap header when using zsmalloc
> as zpool driver because zsmalloc doesn't support eviction.
>
> Add zpool_evictable() to detect if zpool is potentially evictable,
> and use it in
mem_cgroup_resize_limit() and mem_cgroup_resize_memsw_limit() have
identical logics. Refactor code so we don't need to keep two pieces
of code that does same thing.
Signed-off-by: Yu Zhao
Acked-by: Vladimir Davydov
Acked-by: Michal Hocko
---
mm/memcontrol.c
We waste sizeof(swp_entry_t) for zswap header when using zsmalloc
as zpool driver because zsmalloc doesn't support eviction.
Add zpool_shrinkable() to detect if zpool is shrinkable, and use
it in zswap to avoid waste memory for zswap header.
Signed-off-by: Yu Zhao
---
include/linux/zp
renced()
Fix the problem by delaying set_pte_at() until page is ready.
Signed-off-by: Yu Zhao
---
mm/memory.c | 2 +-
mm/swapfile.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/memory.c b/mm/memory.c
index ca5674cbaff2..b8be1a4adf93 100644
--- a/mm/memory.c
+++
On Tue, Jan 09, 2018 at 09:46:22AM +0100, Michal Hocko wrote:
> On Mon 08-01-18 14:56:32, Yu Zhao wrote:
> > We don't want to expose page before it's properly setup. During
> > page setup, we may call page_add_new_anon_rmap() which uses non-
> > atomic bit op. If p
On Tue, Jan 09, 2018 at 01:48:17PM +0900, Sergey Senozhatsky wrote:
> On (01/08/18 14:51), Yu Zhao wrote:
> [..]
> > int zpool_shrink(struct zpool *zpool, unsigned int pages,
> > unsigned int *reclaimed)
> > {
> > - return zpool->driver->
On Tue, Jan 09, 2018 at 01:25:18PM -0500, Dan Streetman wrote:
> On Mon, Jan 8, 2018 at 5:51 PM, Yu Zhao wrote:
> > We waste sizeof(swp_entry_t) for zswap header when using zsmalloc
> > as zpool driver because zsmalloc doesn't support eviction.
> >
> > Add zpool_sh
On Thu, Sep 27, 2018 at 01:48:58AM +0200, Ulf Hansson wrote:
> On 23 September 2018 at 22:39, Yu Zhao wrote:
> > This device reports SDHCI_CLOCK_INT_STABLE even though it's not
> > ready to take SDHCI_CLOCK_CARD_EN. The symptom is that reading
> > SDHCI_CLOCK_CONTRO
0xdc/0x470
reg_process_hint+0x31e/0x8aa [cfg80211]
reg_todo+0x204/0x5b9 [cfg80211]
process_one_work+0x55f/0x8d0
worker_thread+0x5dd/0x841
kthread+0x270/0x285
ret_from_fork+0x22/0x40
Signed-off-by: Yu Zhao
---
net/wireless/reg.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ne
On Mon, Nov 19, 2018 at 02:11:27PM -0800, Hugh Dickins wrote:
> On Sun, 18 Nov 2018, Yu Zhao wrote:
>
> > We used to have a single swap address space with swp_entry_t.val
> > as its radix tree index. This is not the case anymore. Now Each
> > swp_type() has its own addr
We changed key of swap cache tree from swp_entry_t.val to
swp_offset. Need to do so in shmem_replace_page() as well.
Fixes: f6ab1f7f6b2d ("mm, swap: use offset of swap entry as key of swap cache")
Cc: sta...@vger.kernel.org # v4.9+
Signed-off-by: Yu Zhao
---
mm/shmem.c | 6
Pagetable page doesn't touch page->mapping or have any used field
that overlaps with it. No need to clear mapping in dtor. In fact,
doing so might mask problems that otherwise would be detected by
bad_page().
Signed-off-by: Yu Zhao
---
include/linux/mm.h | 11 ++-
1 file ch
We used to have a single swap address space with swp_entry_t.val
as its radix tree index. This is not the case anymore. Now Each
swp_type() has its own address space and should use swp_offset()
as radix tree index.
Signed-off-by: Yu Zhao
---
mm/shmem.c | 11 +++
1 file changed, 7
We used to have a single swap address space with swp_entry_t.val
as its radix tree index. This is not the case anymore. Now Each
swp_type() has its own address space and should use swp_offset()
as radix tree index.
Signed-off-by: Yu Zhao
---
mm/shmem.c | 11 +++
1 file changed, 7
7;s most likely different from CPU physical address when AMD
IOMMU is not in passthrough mode.
Signed-off-by: Yu Zhao
---
sound/soc/amd/acp-pcm-dma.c | 15 +--
sound/soc/amd/acp.h | 2 +-
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/sound/soc/amd/acp-pcm-dma.c b/so
les null struct device or uses
the default dma_ops if struct device doesn't have it set.
Signed-off-by: Yu Zhao
---
sound/soc/amd/acp-pcm-dma.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
index fd3db4
This option does not override iommu=pt
Fixes: aafd8ba0ca74 ("iommu/amd: Implement add_device and remove_device")
Signed-off-by: Yu Zhao
---
drivers/iommu/amd_iommu.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/io
e job will eventually times out.
Reverse the order of calling page_flip and setting pflip_status to
fix the race.
Signed-off-by: Yu Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display
path because individual
driver might have different requirement.
Signed-off-by: Yu Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index
memory will cause memory corruption.
Signed-off-by: Yu Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index e309d26170db..755daa332f8a
On Fri, Dec 21, 2018 at 10:07:26AM +0100, Michel Dänzer wrote:
> On 2018-12-21 4:10 a.m., Yu Zhao wrote:
> > Userspace may request pitch alignment that is not supported by GPU.
> > Some requests 32, but GPU ignores it and uses default 64 when cpp is
> > 4. If GEM object is a
memory will cause memory corruption.
Signed-off-by: Yu Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index 686a26de50f9..883a4df2386d
path because individual
driver might have different requirement.
Signed-off-by: Yu Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index
memory will cause memory corruption.
Cc: sta...@vger.kernel.org # v4.2+
Signed-off-by: Yu Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
path because individual
driver might have different requirement.
Cc: sta...@vger.kernel.org # v4.2+
Signed-off-by: Yu Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
b/drivers/gpu/drm/amd
On Fri, Dec 21, 2018 at 10:07:26AM +0100, Michel Dänzer wrote:
> On 2018-12-21 4:10 a.m., Yu Zhao wrote:
> > Userspace may request pitch alignment that is not supported by GPU.
> > Some requests 32, but GPU ignores it and uses default 64 when cpp is
> > 4. If GEM object is a
path because individual
driver might have different requirement.
Cc: sta...@vger.kernel.org # v4.2+
Signed-off-by: Yu Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
b/drivers/gpu/drm/amd
memory will cause memory corruption.
Cc: sta...@vger.kernel.org # v4.2+
Signed-off-by: Yu Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
On Thu, Jan 03, 2019 at 05:33:19PM +0100, Michel Dänzer wrote:
> On 2018-12-30 2:00 a.m., Yu Zhao wrote:
> > Userspace may request pitch alignment that is not supported by GPU.
> > Some requests 32, but GPU ignores it and uses default 64 when cpp is
> > 4. If GEM object is a
because individual
driver might have different requirement.
Cc: sta...@vger.kernel.org # v4.2+
Signed-off-by: Yu Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
b/drivers/gpu/drm/amd/amdgpu
Userspace may request pitch alignment that is not supported by GPU.
Some requests 32, but GPU ignores it and uses default 64 when cpp is
4. If GEM object is allocated based on the smaller alignment, GPU
DMA will go out of bound.
Cc: sta...@vger.kernel.org # v4.2+
Signed-off-by: Yu Zhao
because individual
driver might have different requirement.
Cc: sta...@vger.kernel.org # v4.2+
Signed-off-by: Yu Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
b/drivers/gpu/drm/amd/amdgpu
Userspace may request pitch alignment that is not supported by GPU.
Some requests 32, but GPU ignores it and uses default 64 when cpp is
4. If GEM object is allocated based on the smaller alignment, GPU
DMA will go out of bound.
Cc: sta...@vger.kernel.org # v4.2+
Signed-off-by: Yu Zhao
ct such mismatch and hopefully prevent
it from happening again.
Signed-off-by: Yu Zhao
---
include/linux/vmstat.h | 4
mm/vmstat.c| 18 --
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index f25cef
On Mon, Oct 15, 2018 at 08:41:52PM +0200, Jann Horn wrote:
> On Mon, Oct 15, 2018 at 8:38 PM Yu Zhao wrote:
> > There were mismatches between number of vmstat keys and number of
> > vmstat values. They were fixed recently by:
> > commit 58bc4c34d249 ("mm/vmstat.c
gt; When mkold == true, only age the pages that need aging according to the
> passed-in bitmap.
>
> Suggested-by: Yu Zhao
Thanks but I did not suggest this.
What I have in v2 is RCU based. I hope Oliver or someone else can help
make that work. Otherwise we can just drop this for now and r
On Fri, Apr 19, 2024 at 3:48 PM James Houghton wrote:
>
> On Fri, Apr 19, 2024 at 2:07 PM David Matlack wrote:
> >
> > On 2024-04-19 01:47 PM, James Houghton wrote:
> > > On Thu, Apr 11, 2024 at 10:28 AM David Matlack
> > > wrote:
> > > > On 2024-04-11 10:08 AM, David Matlack wrote:
> > > > boo
On Sun, Oct 1, 2023 at 5:41 PM Jaewon Kim wrote:
>
> Hello Yu Zhao
>
> Could you give me your comment? I am waiting for your opinion on the
> reuse method. I'm planning to resend it as a complete patch with it.
> Thank you.
Acked-by: Yu Zhao
On Wed, Oct 18, 2023 at 2:22 AM Huan Yang wrote:
>
> For multi-gen lru reclaim in evict_folios, like shrink_inactive_list,
> gather folios which isolate to reclaim, and invoke shirnk_folio_list.
>
> But, when complete shrink, it not gather shrink reclaim stat into sc,
> we can't get info like nr_d
On Wed, Oct 18, 2023 at 2:22 AM Huan Yang wrote:
>
> This patch add two reclaim stat:
> nr_promote: nr_pages shrink before promote by folio_update_gen.
> nr_demote: nr_pages NUMA demotion passed.
The above isn't specific to MLGRU, so they should be in a separate patchset.
> And then, use correct
On Wed, Oct 18, 2023 at 8:17 PM Huan Yang wrote:
>
> Hi Yu Zhao,
>
> Thanks for your reply.
>
> 在 2023/10/19 0:21, Yu Zhao 写道:
> > On Wed, Oct 18, 2023 at 2:22 AM Huan Yang wrote:
> >> For multi-gen lru reclaim in evict_folios, like shrink_inactive_list,
&g
On Tue, Dec 19, 2023 at 6:22 PM Bixuan Cui wrote:
>
> From: cuibixuan
>
> Add a new event to calculate the shrink_inactive_list()/shrink_active_list()
> execution time.
>
> Example of output:
> kswapd0-103 [007] . 1098.353020:
> mm_vmscan_lru_shrink_active_start: nid=0
>
e9f05dc66f9 ("libnvdimm/pfn_dev: increase MAX_STRUCT_PAGE_SIZE")
> Cc:
> Cc: Alexander Potapenko
> Cc: Marco Elver
> Reported-by: Jeff Moyer
Thanks -- that BUILD_BUG_ON() has been a nuisance for some of my debug configs.
Acked-by: Yu Zhao
On Mon, Sep 25, 2023 at 10:20 PM Jaewon Kim wrote:
>
> As the legacy lru provides, the lru_gen needs some trace events for
> debugging.
>
> This commit introduces 2 trace events.
> trace_mm_vmscan_lru_gen_scan
> trace_mm_vmscan_lru_gen_evict
>
> Each event is similar to the following legacy ev
On Tue, Feb 23, 2021 at 02:50:11PM -0800, Andrew Morton wrote:
> On Tue, 26 Jan 2021 15:14:38 -0700 Yu Zhao wrote:
>
> > On Tue, Jan 26, 2021 at 10:01:11PM +, Matthew Wilcox wrote:
> > > On Fri, Jan 22, 2021 at 03:05:53PM -0700, Yu Zhao wrote:
> > > > +++ b/m
On Wed, Feb 24, 2021 at 04:06:45PM +0800, Alex Shi wrote:
>
>
> 在 2021/2/24 下午1:29, Yu Zhao 写道:
> > On Tue, Feb 23, 2021 at 02:50:11PM -0800, Andrew Morton wrote:
> >> On Tue, 26 Jan 2021 15:14:38 -0700 Yu Zhao wrote:
> >>
> >>> On Tue, Jan 26, 2
scripts/bloat-o-meter results before and after the entire series:
Glang: add/remove: 0/1 grow/shrink: 7/10 up/down: 191/-1189 (-998)
GCC: add/remove: 0/1 grow/shrink: 9/9 up/down: 1010/-783 (227)
Signed-off-by: Yu Zhao
---
include/linux/mm_inline.h | 21 +++--
1 file changed, 7 in
On Wed, Feb 24, 2021 at 05:15:58AM -0800, Andrew Morton wrote:
> On Wed, 24 Feb 2021 01:48:07 -0700 Yu Zhao wrote:
>
> > Currently page_lru() uses Page{Active,Unevictable} to determine which
> > lru list a page belongs to. Page{Active,Unevictable} contain
> > compo
On Wed, Feb 24, 2021 at 09:56:39PM +, Matthew Wilcox wrote:
> On Wed, Feb 24, 2021 at 05:15:58AM -0800, Andrew Morton wrote:
> > Here's what the preprocessor produces for an allmodconfig version of
> > PageActive():
> >
> > static inline __attribute__((__gnu_inline__)) __attribute__((__unused_
On Wed, Feb 24, 2021 at 10:48:46PM +, Matthew Wilcox wrote:
> On Wed, Feb 24, 2021 at 03:34:16PM -0700, Yu Zhao wrote:
> > > If only somebody were working on a patch series to get rid of
> > > all those calls to compound_head()! Some reviews on
> > > ht
On Thu, Feb 25, 2021 at 03:55:53AM +, Matthew Wilcox wrote:
> On Wed, Feb 24, 2021 at 04:50:39PM -0700, Yu Zhao wrote:
> > On Wed, Feb 24, 2021 at 10:48:46PM +, Matthew Wilcox wrote:
> > > On Wed, Feb 24, 2021 at 03:34:16PM -0700, Yu Zhao wrote:
> > > > > I
On Tue, Feb 09, 2021 at 01:32:58PM -0800, Jesse Barnes wrote:
> > ==
> > Augmented Page Reclaim
> > ==
> > We would like to share a work with you and see if there is enough
> > interest to warrant a run for the mainline. This work is a part of
> > result from
On Tue, Feb 02, 2021 at 01:57:15AM -0700, Yu Zhao wrote:
>
> > Versatility
> > ===
> > Userspace can trigger aging and eviction independently via the
> > ``debugfs`` interface [note]_ for working set estimation, proactive
>
> 1. `Long-term SLOs for re
==
Augmented Page Reclaim
==
We would like to share a work with you and see if there is enough
interest to warrant a run for the mainline. This work is a part of
result from a decade of research and experimentation in memory
overcommit at Google: an augmented
evidence such "correction" is beneficial.
bloat-o-meter result:
add/remove: 0/0 grow/shrink: 4/62 up/down: 309/-2851 (-2542)
Signed-off-by: Yu Zhao
---
include/linux/page-flags.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/page-flags.h b/includ
-hanging fruit, this v2
removes compound_head() completely from Page{Active,Unevictable}.
bloat-o-meter result before and after the series:
add/remove: 0/0 grow/shrink: 6/92 up/down: 697/-7656 (-6959)
Yu Zhao (3):
mm: bypass compound_head() for PF_NO_TAIL when enforce=1
mm: use PF_NO_TA
helpful --
even if a piece of buggy code has gotten away with
compound_page(tail)->flags, it will run into trouble with lru list
addition and deletion because they use tail->lru rather than
compound_page(tail)->lru.
bloat-o-meter result:
add/remove: 0/0 grow/shrink: 0/11 up/down
All places but one test, set or clear PG_active and PG_unevictable on
small or head pages. Use compound_head() explicitly for that singleton
so the rest can rid of redundant compound_head().
bloat-o-meter result:
add/remove: 0/0 grow/shrink: 3/38 up/down: 388/-4270 (-3882)
Signed-off-by: Yu
On Fri, Feb 26, 2021 at 11:52:03AM +0100, Vlastimil Babka wrote:
> On 2/26/21 10:17 AM, Yu Zhao wrote:
> > Patch series "mm: lru related cleanups" starting at commit 42895ea73bcd
> > ("mm/vmscan.c: use add_page_to_lru_list()") bloated vmlinux by 1777
> &
On Fri, Feb 26, 2021 at 12:13:14PM +, Matthew Wilcox wrote:
> On Fri, Feb 26, 2021 at 02:17:18AM -0700, Yu Zhao wrote:
> > All places but one test, set or clear PG_active and PG_unevictable on
> > small or head pages. Use compound_head() explicitly for that singleton
> > s
On Fri, Feb 26, 2021 at 02:17:17AM -0700, Yu Zhao wrote:
> Trying to set or clear PG_lru on tail pages has been considered buggy.
> Enforce this rule by changing the policy for PG_lru from PF_HEAD to
> PF_NO_TAIL. This means setting or clearing PG_lru on tail pages won't
>
lru_cache_add_active_or_unevictable() already adds new ksm pages to
active lru. Calling activate_page() isn't really necessary in this
case.
Signed-off-by: Yu Zhao
---
mm/swapfile.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/mm/swapfile.c b/mm/swapf
ive(), but it's irrelevant
to LRU pages.
Signed-off-by: Yu Zhao
---
mm/memremap.c | 2 --
mm/swap.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/mm/memremap.c b/mm/memremap.c
index 03e38b7a38f1..3a06eb91cb59 100644
--- a/mm/memremap.c
+++ b/mm/memremap.c
@@ -
clearing to
PAGE_FLAGS_CHECK_AT_PREP is more appropriate.
Signed-off-by: Yu Zhao
---
include/linux/page-flags.h | 2 +-
mm/filemap.c | 2 ++
mm/memremap.c | 2 --
mm/swap.c | 3 ---
4 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/include
On Wed, Aug 19, 2020 at 04:06:32PM -0700, Yang Shi wrote:
> On Tue, Aug 18, 2020 at 11:47 AM Yu Zhao wrote:
> >
> > Presumably __ClearPageWaiters() was added to follow the previously
> > removed __ClearPageActive() pattern.
> >
> > Only flags that are in PAG
On Thu, Aug 20, 2020 at 08:18:27AM +0200, Michal Hocko wrote:
> On Tue 18-08-20 12:47:04, Yu Zhao wrote:
> > Presumably __ClearPageWaiters() was added to follow the previously
> > removed __ClearPageActive() pattern.
>
> I do not think so. Please have a look at 6
mmit, we called lru_cache_add_active_or_unevictable() to
add new ksm pages to active lruvec. Therefore, activate_page() wasn't
necessary for them in the first place.
Signed-off-by: Yu Zhao
---
include/linux/swap.h | 1 -
mm/swap.c| 4 ++--
mm/swapfile.c| 5 -
3 files c
ive(), but it's irrelevant
to LRU pages.
Signed-off-by: Yu Zhao
---
mm/memremap.c | 2 --
mm/swap.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/mm/memremap.c b/mm/memremap.c
index 03e38b7a38f1..3a06eb91cb59 100644
--- a/mm/memremap.c
+++ b/mm/memremap.c
@@ -451,8 +451,6 @@ void free
clearing to
PAGE_FLAGS_CHECK_AT_PREP is more appropriate.
Signed-off-by: Yu Zhao
---
include/linux/page-flags.h | 2 +-
mm/filemap.c | 2 ++
mm/memremap.c | 2 --
mm/swap.c | 3 ---
4 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/include
gt; + WARN_ON(!(start | (end + 1))); /* Use _fullmm() instead */
> + __tlb_gather_mmu(tlb, mm, start, end);
> +}
> +
> +void tlb_gather_mmu_fullmm(struct mmu_gather *tlb, struct mm_struct *mm)
> +{
> + __tlb_gather_mmu(tlb, mm, 0, -1);
> +}
> +
IMO, there is no point adding the wrappers given you will remove
the WARN_ON in the next patch.
But if you prefer, they should be at least moved to the header for
inlining.
Consider this whole series
Reviewed-by: Yu Zhao
On Mon, Dec 21, 2020 at 10:31:57AM -0800, Nadav Amit wrote:
> > On Dec 21, 2020, at 9:27 AM, Peter Xu wrote:
> >
> > Hi, Nadav,
> >
> > On Sun, Dec 20, 2020 at 12:06:38AM -0800, Nadav Amit wrote:
> >
> > [...]
> >
> >> So to correct myself, I think that what I really encountered was actually
>
On Mon, Dec 21, 2020 at 11:55:02AM -0800, Linus Torvalds wrote:
> On Mon, Dec 21, 2020 at 11:16 AM Yu Zhao wrote:
> >
> > Nadav Amit found memory corruptions when running userfaultfd test above.
> > It seems to me the problem is related to commit 09854ba94c6a ("mm:
>
your patch (you might want to update the commit message).
Reviewed-by: Yu Zhao
While we are all here, there is also clear_soft_dirty() that could
use a similar fix...
On Mon, Dec 21, 2020 at 05:30:41PM -0500, Peter Xu wrote:
> On Mon, Dec 21, 2020 at 01:49:55PM -0800, Nadav Amit wrote:
> > BTW: In general, I think that you are right, and that changing of PTEs
> > should not require taking mmap_lock for write. However, I am not sure
> > cow_user_page() is not the
On Mon, Dec 21, 2020 at 03:33:30PM -0800, Linus Torvalds wrote:
> On Mon, Dec 21, 2020 at 3:12 PM Yu Zhao wrote:
> >
> > I can't say I disagree with you but the man has made the call and I
> > think we should just move on.
>
> "The man" can always be
On Mon, Dec 21, 2020 at 04:11:01PM -0800, Linus Torvalds wrote:
> On Mon, Dec 21, 2020 at 4:00 PM Yu Zhao wrote:
> >
> > My first instinct is to be conservative and revert 09854ba94c6a ("mm:
> > do_wp_page() simplification") so people are less likely to c
On Tue, Dec 22, 2020 at 04:40:32AM -0800, Nadav Amit wrote:
> > On Dec 21, 2020, at 1:24 PM, Yu Zhao wrote:
> >
> > On Mon, Dec 21, 2020 at 12:26:22PM -0800, Linus Torvalds wrote:
> >> On Mon, Dec 21, 2020 at 12:23 PM Nadav Amit wrote:
> >>> Using mmap_wr
On Tue, Dec 22, 2020 at 02:31:52PM -0500, Andrea Arcangeli wrote:
> On Mon, Dec 21, 2020 at 07:19:35PM -0800, Andy Lutomirski wrote:
> > instance of this (with mmap_sem held for write) in x86:
> > mark_screen_rdonly(). Dare I ask how broken this is? We could likely
>
> That one is buggy despite
On Tue, Dec 22, 2020 at 05:02:37PM -0500, Andrea Arcangeli wrote:
> On Tue, Dec 22, 2020 at 02:14:41PM -0700, Yu Zhao wrote:
> > This works but I don't prefer this option because 1) this is new
> > way of making pte_wrprotect safe and 2) it's specific to ufd an
On Tue, Dec 22, 2020 at 04:01:45PM -0800, Linus Torvalds wrote:
> On Tue, Dec 22, 2020 at 3:50 PM Linus Torvalds
> wrote:
> >
> > See zap_pte_range() for an example of doing it right, even in the
> > presence of complexities (ie that has an example of both flushing the
> > TLB, and doing the actua
On Tue, Dec 22, 2020 at 09:56:11PM -0500, Andrea Arcangeli wrote:
> On Tue, Dec 22, 2020 at 04:39:46PM -0700, Yu Zhao wrote:
> > We are talking about non-COW anon pages here -- they can't be mapped
> > more than once. So why not just identify them by checking
> > p
On Wed, Dec 23, 2020 at 01:44:42AM -0800, Linus Torvalds wrote:
> On Tue, Dec 22, 2020 at 4:01 PM Linus Torvalds
> wrote:
> >
> > The more I look at the mprotect code, the less I like it. We seem to
> > be much better about the TLB flushes in other places (looking at
> > mremap, for example). The
These functions will call page_lru() in the following patches. Move
them below page_lru() to avoid the forward declaration.
Signed-off-by: Yu Zhao
---
include/linux/mm_inline.h | 42 +++
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/include
The parameter is redundant in the sense that it can be extracted
from the "struct page" parameter by page_lru() correctly.
Signed-off-by: Yu Zhao
---
include/trace/events/pagemap.h | 11 ---
mm/swap.c | 5 +
2 files changed, 5 insertions(+), 11
et or cleared before calling
these two functions. And they are indeed.
Signed-off-by: Yu Zhao
---
include/linux/mm_inline.h | 8 ++--
mm/swap.c | 15 +++
mm/vmscan.c | 6 ++
3 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/include
xes them.
This patch may have left page_off_lru() seemingly odd, and we'll take
care of it in the next patch.
Signed-off-by: Yu Zhao
---
include/linux/mm_inline.h | 5 +++--
mm/compaction.c | 2 +-
mm/mlock.c| 3 +--
mm/swap.c | 26 ++
Move scattered VM_BUG_ONs to two essential places that cover all
lru list additions and deletions.
Signed-off-by: Yu Zhao
---
include/linux/mm_inline.h | 4
mm/swap.c | 2 --
mm/vmscan.c | 1 -
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a
int -> long)
Note that __mod_node_page_state() for the smp case and
__mod_zone_page_state() already use long. So this change also fixes
the inconsistency.
Signed-off-by: Yu Zhao
---
include/linux/memcontrol.h | 10 +-
include/linux/mm_inline.h | 2 +-
include/linux/vmstat.h | 6
All other references to the function were removed after
commit b910718a948a ("mm: vmscan: detect file thrashing at the reclaim root")
Signed-off-by: Yu Zhao
---
include/linux/mmzone.h | 2 --
mm/vmscan.c| 3 ++-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git
We've removed all other references to this function.
Signed-off-by: Yu Zhao
---
include/linux/mm_inline.h | 27 ++-
1 file changed, 6 insertions(+), 21 deletions(-)
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index 6d907a4dd6ad..7183c7a
There is add_page_to_lru_list(), and move_pages_to_lru() should reuse
it, not duplicate it.
Signed-off-by: Yu Zhao
---
mm/vmscan.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 469016222cdb..a174594e40f8 100644
--- a/mm/vmscan.c
+++ b
All other references to the function were removed after
commit a892cb6b977f ("mm/vmscan.c: use update_lru_size() in update_lru_sizes()")
Signed-off-by: Yu Zhao
---
include/linux/mm_inline.h | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/include/linux/mm_
change that
is meant to help debug.
Signed-off-by: Yu Zhao
---
include/linux/mm_inline.h | 28 ++--
mm/swap.c | 6 ++
mm/vmscan.c | 3 +--
3 files changed, 13 insertions(+), 24 deletions(-)
diff --git a/include/linux/mm_inline.h b
;t strictly a
clean-up patch, but it seems still relevant to include it here.
Yu Zhao (11):
mm: use add_page_to_lru_list()
mm: shuffle lru list addition and deletion functions
mm: don't pass "enum lru_list" to lru list addition functions
mm: don't pass "enum lru_
On Tue, Jan 12, 2021 at 11:15:43AM -0800, Nadav Amit wrote:
> > On Jan 12, 2021, at 11:02 AM, Laurent Dufour
> > wrote:
> >
> > Le 12/01/2021 à 17:57, Peter Zijlstra a écrit :
> >> On Tue, Jan 12, 2021 at 04:47:17PM +0100, Laurent Dufour wrote:
> >>> Le 12/01/2021 à 12:43, Vinayak Menon a écrit
On Tue, Jan 12, 2021 at 12:38:34PM -0800, Nadav Amit wrote:
> > On Jan 12, 2021, at 11:56 AM, Yu Zhao wrote:
> >
> > On Tue, Jan 12, 2021 at 11:15:43AM -0800, Nadav Amit wrote:
> >>> On Jan 12, 2021, at 11:02 AM, Laurent Dufour
> >>> wrote:
> >&
On Wed, Dec 23, 2020 at 11:24:16AM -0500, Peter Xu wrote:
> On Wed, Dec 23, 2020 at 03:06:30AM -0700, Yu Zhao wrote:
> > On Wed, Dec 23, 2020 at 01:44:42AM -0800, Linus Torvalds wrote:
> > > On Tue, Dec 22, 2020 at 4:01 PM Linus Torvalds
> > > wrote:
> > &
1 - 100 of 337 matches
Mail list logo