fy the mapcount that overlays page_type.
>
> Let's use READ_ONCE to avoid laod tearing (shouldn't make a difference)
> and to make KCSAN happy.
>
> Note: nothing should really be broken besides wrong KCSAN complaints.
>
> Reported-by: kernel test robot
> Closes: https://lore.kernel.org/oe-lkp/202405281431.c46a3be9-...@intel.com
> Signed-off-by: David Hildenbrand
LGTM. Thanks for fixing.
Reviewed-by: Miaohe Lin
Thanks.
.
have enough checking when we really
operate the PTE entries later. So checking for non_swap_entry() is not
really needed here and should be removed to avoid confusion.
Signed-off-by: Miaohe Lin
---
mm/swap_state.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/mm/swap_state.c b
x27;s used together with RCU solution.
Signed-off-by: Miaohe Lin
---
include/linux/swap.h | 5 +--
mm/swapfile.c| 79 +++-
2 files changed, 52 insertions(+), 32 deletions(-)
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 1447270
backing device is congested or
not")
Signed-off-by: Miaohe Lin
---
mm/shmem.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/mm/shmem.c b/mm/shmem.c
index 26c76b13ad23..936ba5595297 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1492,15 +1492,21 @@ static void shmem_pseudo_vma
s Zhou and Tim Chen.
Miaohe Lin (4):
mm/swapfile: use percpu_ref to serialize against concurrent swapoff
swap: fix do_swap_page() race with swapoff
mm/swap: remove confusing checking for non_swap_entry() in
swap_ra_info()
mm/shmem: fix shmem_swapin() race with swapoff
include/linux/
Fixes: 0bcac06f27d7 ("mm,swap: skip swapcache for swapin of synchronous device")
Reported-by: kernel test robot (auto build test ERROR)
Signed-off-by: Miaohe Lin
---
include/linux/swap.h | 9 +
mm/memory.c | 9 +
2 files changed, 18 insertions(+)
diff --git a/incl
It appears that destroy_memory_type() isn't a very good name because
we usually will not free the memory_type here. So rename it to a more
appropriate name i.e. put_memory_type().
Suggested-by: Huang, Ying
Signed-off-by: Miaohe Lin
---
drivers/dax/kmem.c | 4 ++--
include/
On 2023/7/6 19:58, Xiao Yang wrote:
> On 2023/7/6 14:39, Miaohe Lin wrote:
>> It appears that destroy_memory_type() isn't a very good name because
>> we usually will not free the memory_type here. So rename it to a more
>> appropriate name i.e. put_memory_type().
>&
On 2021/4/8 5:23, Mike Kravetz wrote:
> On 4/6/21 8:09 PM, Miaohe Lin wrote:
>> On 2021/4/7 10:37, Mike Kravetz wrote:
>>> On 4/6/21 7:05 PM, Miaohe Lin wrote:
>>>> Hi:
>>>> On 2021/4/7 8:53, Mike Kravetz wrote:
>>>>> On 4/2/21 2:32 AM,
On 2021/4/8 4:53, Mike Kravetz wrote:
> On 4/7/21 12:24 AM, Miaohe Lin wrote:
>> Hi:
>> On 2021/4/7 10:49, Mike Kravetz wrote:
>>> On 4/2/21 2:32 AM, Miaohe Lin wrote:
>>>> The resv_map could be NULL since this routine can be called in the evict
>>>
On 2021/4/8 11:24, Miaohe Lin wrote:
> On 2021/4/8 4:53, Mike Kravetz wrote:
>> On 4/7/21 12:24 AM, Miaohe Lin wrote:
>>> Hi:
>>> On 2021/4/7 10:49, Mike Kravetz wrote:
>>>> On 4/2/21 2:32 AM, Miaohe Lin wrote:
>>>>> The resv_map could
the respective changelogs.
Thanks!
Miaohe Lin (5):
mm/swapfile: add percpu_ref support for swap
swap: fix do_swap_page() race with swapoff
mm/swap_state: fix get_shadow_from_swap_cache() race with swapoff
mm/swap_state: fix potential faulted in race in swap_ra_info()
mm/swap_state: fix
We will use percpu-refcount to serialize against concurrent swapoff. This
patch adds the percpu_ref support for later fixup.
Signed-off-by: Miaohe Lin
---
include/linux/swap.h | 2 ++
mm/swapfile.c| 25 ++---
2 files changed, 24 insertions(+), 3 deletions(-)
diff
swap_cluster_readahead() could race with swapoff and might dereference
si->swap_file after it's released by swapoff. Close this race window by
using get/put_swap_device() pair.
Signed-off-by: Miaohe Lin
---
mm/swap_state.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(
s race window(as suggested by Huang, Ying).
Fixes: 235b62176712 ("mm/swap: add cluster lock")
Signed-off-by: Miaohe Lin
---
include/linux/swap.h | 2 +-
mm/memory.c | 10 ++
mm/swapfile.c| 28 +++-
3 files changed, 22 insertions(+), 18 de
based swap readahead")
Signed-off-by: Miaohe Lin
---
mm/swap_state.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/mm/swap_state.c b/mm/swap_state.c
index 709c260d644a..3bf0d0c297bc 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -724,10 +724,10
The function get_shadow_from_swap_cache() can race with swapoff, though
it's only called by do_swap_page() now.
Fixes: aae466b0052e ("mm/swap: implement workingset detection for anonymous
LRU")
Signed-off-by: Miaohe Lin
---
mm/swap_state.c | 9 ++---
1 file changed, 6 i
On 2021/4/9 6:40, Mike Kravetz wrote:
> On 4/7/21 7:44 PM, Miaohe Lin wrote:
>> On 2021/4/8 5:23, Mike Kravetz wrote:
>>> On 4/6/21 8:09 PM, Miaohe Lin wrote:
>>>> On 2021/4/7 10:37, Mike Kravetz wrote:
>>>>> On 4/6/21 7:05 PM, Miaohe Lin wrote:
>
On 2021/4/9 6:53, Mike Kravetz wrote:
> On 4/7/21 8:26 PM, Miaohe Lin wrote:
>> On 2021/4/8 11:24, Miaohe Lin wrote:
>>> On 2021/4/8 4:53, Mike Kravetz wrote:
>>>> On 4/7/21 12:24 AM, Miaohe Lin wrote:
>>>>> Hi:
>>>>> On 2021/4/7 10:
On 2021/4/9 7:25, Mike Kravetz wrote:
> On 4/2/21 2:32 AM, Miaohe Lin wrote:
>> A rare out of memory error would prevent removal of the reserve map region
>> for a page. hugetlb_fix_reserve_counts() handles this rare case to avoid
>> dangling with incorrect
On 2021/4/9 12:37, Mike Kravetz wrote:
> On 4/8/21 8:01 PM, Miaohe Lin wrote:
>> On 2021/4/9 6:53, Mike Kravetz wrote:
>>>
>>> Yes, add a comment to hugetlb_unreserve_pages saying that !resv_map
>>> implies freed == 0.
>>>
>>
>> Sound
On 2021/4/9 13:04, Andrew Morton wrote:
> On Fri, 9 Apr 2021 11:17:49 +0800 Miaohe Lin wrote:
>
>> On 2021/4/9 7:25, Mike Kravetz wrote:
>>> On 4/2/21 2:32 AM, Miaohe Lin wrote:
>>>> A rare out of memory error would prevent removal of the r
On 2021/4/8 22:55, riteshh wrote:
> On 21/04/08 09:08AM, Miaohe Lin wrote:
>> Hi all,
>> When I was investigating the swap code, I found some possible race
>> windows. This series aims to fix all these races. But using current
>> get/put_swap_device() to guard aga
On 2021/4/9 5:34, Tim Chen wrote:
>
>
> On 4/8/21 6:08 AM, Miaohe Lin wrote:
>> When I was investigating the swap code, I found the below possible race
>> window:
>>
>> CPU 1CPU 2
>> -
On 2021/4/9 16:50, Huang, Ying wrote:
> Miaohe Lin writes:
>
>> While we released the pte lock, somebody else might faulted in this pte.
>> So we should check whether it's swap pte first to guard against such race
>> or swp_type would be unexpected. And we ca
Hi:
On 2021/2/10 2:56, Mike Kravetz wrote:
> On 2/8/21 7:27 PM, Miaohe Lin wrote:
>> On 2021/2/9 3:52, Mike Kravetz wrote:
>>> On 1/23/21 1:31 AM, Miaohe Lin wrote:
>>>> The current implementation of hugetlb_cgroup for shared mappings could have
>>>> diff
We could use pages_per_huge_page to get the number of pages per hugepage,
use get_hstate_idx to calculate hstate index, and use hstate_is_gigantic
to check if a hstate is gigantic to make code more succinct.
Signed-off-by: Miaohe Lin
---
fs/hugetlbfs/inode.c | 2 +-
mm/hugetlb.c | 6
We should not transfer the per-node surplus state when we do not cross the
node in order to save some cpu cycles
Signed-off-by: Miaohe Lin
---
mm/hugetlb.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index da347047ea10..4f2c92ddbca4 100644
--- a/mm
There is no need to use a new local variable ret2 to get the return value
of handle_userfault(). Use ret directly to make code more succinct.
Signed-off-by: Miaohe Lin
---
mm/huge_memory.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/mm/huge_memory.c b/mm
If there is no reservation corresponding to a vma, map_chg is always != 0,
i.e. we can not meet the condition where a vma does not have reservation
while map_chg = 0.
Signed-off-by: Miaohe Lin
---
mm/hugetlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/hugetlb.c b/mm
On 2021/2/10 16:35, David Hildenbrand wrote:
> On 10.02.21 07:53, Miaohe Lin wrote:
>> We could use pages_per_huge_page to get the number of pages per hugepage,
>> use get_hstate_idx to calculate hstate index, and use hstate_is_gigantic
>> to check if a hstate is gigan
for each file_region and
release the reference held by caller when they are done.
Fixes: 075a61d07a8e ("hugetlb_cgroup: add accounting for shared mappings")
Signed-off-by: Shijie Luo
Signed-off-by: Miaohe Lin
Cc: sta...@kernel.org
---
The Spring Festival is coming. It's the ye
Hi:
On 2021/2/13 9:15, Mike Kravetz wrote:
> On 2/9/21 11:54 PM, Miaohe Lin wrote:
>> If there is no reservation corresponding to a vma, map_chg is always != 0,
>> i.e. we can not meet the condition where a vma does not have reservation
>> while map_chg = 0.
>
> T
ication of an error without panicing the kernel.
> This will help identifying drivers that need to clear VM_PFNMAP before
> using dmabuf system heap which is moving to use vm_insert_page.
>
> Suggested-by: Christoph Hellwig
> Signed-off-by: Suren Baghdasaryan
Looks reasonabl
On 2021/2/3 15:33, Johannes Berg wrote:
> On Wed, 2021-02-03 at 15:00 +0800, samirweng1979 wrote:
>> From: wengjianfeng
>>
>> change 'iff' to 'if'.
>>
>> Signed-off-by: wengjianfeng
>> ---
>> net/wireless/chan.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/wire
conditions.
Suggested-by: Andrew Morton
Signed-off-by: Miaohe Lin
---
mm/pgtable-generic.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c
index fa1375f3e3b2..c2210e1cdb51 100644
--- a/mm/pgtable-generic.c
+++ b/mm/pgtable-generic.c
The return value of set_huge_zero_page() is always ignored. So we should
drop such return value.
Signed-off-by: Miaohe Lin
---
mm/huge_memory.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 987cf5e4cf90..360b689bd66a 100644
It's recommended to use helper macro page_private() to access the private
field of page. Use such helper to eliminate direct access.
Signed-off-by: Miaohe Lin
---
mm/zsmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index cf0ed0e
Since commit 746b18d421da ("mm: use refcounts for page_lock_anon_vma()"),
page_lock_anon_vma() is renamed to page_get_anon_vma() and converted to
return a refcount increased anon_vma. But it forgot to change the relevant
comment.
Signed-off-by: Miaohe Lin
---
mm/rmap.c | 4 ++--
1 fi
The helper range_in_vma() is introduced via commit 017b1660df89 ("mm:
migration: fix migration of huge PMD shared pages"). But we forgot to
use it in queue_pages_test_walk().
Signed-off-by: Miaohe Lin
---
mm/mempolicy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
move page_not_mapped() above try_to_unmap() to avoid identifier undeclared
compilation error.
Signed-off-by: Miaohe Lin
---
mm/rmap.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/mm/rmap.c b/mm/rmap.c
index c3f6e060d73f..b49e85605f8f 100644
--- a/mm/rmap.c
+++
Hugepage size in unit of GB is supported. We could show pagesize in unit of
GB to make it more friendly to read. Also rework the calculation code of
page size unit to make it more readable.
Signed-off-by: Miaohe Lin
---
fs/hugetlbfs/inode.c | 12
1 file changed, 8 insertions(+), 4
Fix typos reserv to reserve, minimim to minimum. No functional change
intended.
Signed-off-by: Miaohe Lin
---
fs/hugetlbfs/inode.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 40a9795f250a..db6504b5e89f 100644
Hi:
On 2021/1/31 6:07, David Rientjes wrote:
> On Sat, 30 Jan 2021, Miaohe Lin wrote:
>
>> Hugepage size in unit of GB is supported. We could show pagesize in unit of
>> GB to make it more friendly to read. Also rework the calculation code of
>> page size unit
Rework calculation code of the Hugepage size to make it more readable and
straightforward.
Signed-off-by: Miaohe Lin
---
fs/hugetlbfs/inode.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 3a08fbae3b53..1be18de4b537
The helper range_in_vma() is introduced via commit 017b1660df89 ("mm:
migration: fix migration of huge PMD shared pages"). But we forgot to
use it in __split_huge_pud_locked() and __split_huge_pmd_locked().
Signed-off-by: Miaohe Lin
---
mm/huge_memory.c | 6 ++
1 file changed, 2
Hi:
On 2021/2/1 18:56, David Hildenbrand wrote:
> On 01.02.21 09:23, Miaohe Lin wrote:
>> Rework calculation code of the Hugepage size to make it more readable and
>> straightforward.
>>
>> Signed-off-by: Miaohe Lin
>> ---
>> fs/hugetlbfs/inode.c | 9
The condition (A && !C && !D) || !A is equivalent to !A || (A && !C && !D)
and can be further simplified to !A || (!C && !D).
Signed-off-by: Miaohe Lin
---
mm/pgtable-generic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/
Hi:
On 2021/2/2 5:31, David Rientjes wrote:
> On Mon, 1 Feb 2021, Miaohe Lin wrote:
>
>>>> Hugepage size in unit of GB is supported. We could show pagesize in unit of
>>>> GB to make it more friendly to read. Also rework the calculation code of
>>>&g
On 2021/2/2 5:27, David Rientjes wrote:
> On Mon, 1 Feb 2021, Miaohe Lin wrote:
>
>> The helper range_in_vma() is introduced via commit 017b1660df89 ("mm:
>> migration: fix migration of huge PMD shared pages"). But we forgot to
>> use it in __split_huge_pud_lo
rn
Looks good to me. Thanks.
Reviewed-by: Miaohe Lin
> ---
> mm/swap_state.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/swap_state.c b/mm/swap_state.c
> index d0d417efeecc..3cdee7b11da9 100644
> --- a/mm/swap_state.c
> +++ b/mm/swap_stat
Hi:
On 2021/2/2 7:33, Andrew Morton wrote:
> On Mon, 1 Feb 2021 06:43:19 -0500 Miaohe Lin wrote:
>
>> The condition (A && !C && !D) || !A is equivalent to !A || (A && !C && !D)
>> and can be further simplified to !A || (!C && !D).
>
> For example, on a systems using zram as swap, we are more likely to
> see any page allocation errors preceding the swap write errors if the
> alerts are ratelimited.
>
> Signed-off-by: Georgi Djakov
Make sense for me. Thanks.
Reviewed-by: Miaohe Lin
> ---
> mm/page_io.c
On 2021/2/2 16:34, Zhiyuan Dai wrote:
> Signed-off-by: Zhiyuan Dai
No patch description ?
> ---
> mm/hugetlb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 18f6ee3..35db386 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -39
viewed-by: Miaohe Lin
> Signed-off-by: Peter Xu
> ---
> mm/hugetlb.c | 51 +++
> 1 file changed, 27 insertions(+), 24 deletions(-)
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 18f6ee317900..d2859c2aecc9 100644
&
since the old code should still run
> okay iiuc), but we'd better still touch it up to make it logically sane.
>
I think the difference is when we handle the rg->from == t case. Previous one
is in the loop, now below the
loop. But the result should be same.
Thanks.
Reviewed-by: Miao
er.
>
> Signed-off-by: Muchun Song
I like it. Thanks.
Reviewed-by: Miaohe Lin
> ---
> include/linux/hugetlb.h | 3 ++-
> mm/hugetlb_vmemmap.c| 13 +
> 2 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/hugetlb.h b/include/linu
There will be no vma satisfies addr < vm_end when find_vma() returns NULL.
Thus it's meaningless to traverse the vma list below because we can't find
any vma to count mlocked pages. Stop counting mlocked pages in this case to
save some vma list traversal cycles.
Signed-off-by: Miaohe
Shared mappings are allowed to be created without reservations since
commit c37f9fb11c97 ("hugetlb: allow huge page mappings to be created
without reservations"). Remove this obsolete comment which may cause
confusing.
Signed-off-by: Miaohe Lin
---
mm/hugetlb.c | 1 -
1 file changed,
We could use helper function range_in_vma() to check whether the vma is in
the desired range to simplify the code.
Signed-off-by: Miaohe Lin
---
mm/hugetlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index cf82629319ed..442705be052a 100644
-off-by: Muchun Song
> Reviewed-by: Oscar Salvador
> Acked-by: Mike Kravetz
LGTM. Thanks.
Reviewed-by: Miaohe Lin
> ---
> arch/x86/mm/init_64.c | 2 +-
> fs/Kconfig| 6 ++
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/mm/in
ch_entry().
>
> There is only one caller of the uncharge_list(). So just fold it into
> mem_cgroup_uncharge_list() and remove it.
>
> Signed-off-by: Muchun Song
LGTM. Thanks.
Reviewed-by: Miaohe Lin
> ---
> v2:
> - Fold uncharge_list()
Hi:
On 2021/2/5 5:32, Mike Kravetz wrote:
> On 2/4/21 3:15 AM, Miaohe Lin wrote:
>> Shared mappings are allowed to be created without reservations since
>> commit c37f9fb11c97 ("hugetlb: allow huge page mappings to be created
>> without reservations"). Remove this o
Hi:
On 2021/2/4 20:38, Matthew Wilcox wrote:
> On Wed, Feb 03, 2021 at 04:32:15AM -0500, Miaohe Lin wrote:
>> * Since there is no serialization what so ever against page_remove_rmap()
>> - * the best this function can do is return a locked anon_vma that might
>> - * have
Hi:
On 2021/2/4 20:36, Matthew Wilcox wrote:
> On Wed, Feb 03, 2021 at 03:41:37AM -0500, Miaohe Lin wrote:
>> The developer will have trouble figuring out why the BUG actually triggered
>> when there is a complex expression in the VM_BUG_ON. Because we can only
>> identify th
nabled. Because vmemmap_remap_free() depends on vmemmap
> being base page mapped.
>
> Signed-off-by: Muchun Song
> Reviewed-by: Oscar Salvador
> Reviewed-by: Barry Song
Looks good to me. Thanks.
Reviewed-by: Miaohe Lin
> ---
> Documentation/admin-guide/kernel-parameters.txt | 14 +
getlbpage.rst for more details.
> + */
> + if (likely(vmemmap_pages > RESERVE_VMEMMAP_NR))
> + h->nr_free_vmemmap_pages = vmemmap_pages - RESERVE_VMEMMAP_NR;
Not a problem. Should we set h->nr_free_vmemmap_pages to 0 in 'else' case
explicit
GE_FREE_VMEMMAP,
> so add a BUILD_BUG_ON to catch invalid usage of the tail struct page.
>
> Signed-off-by: Muchun Song
> Reviewed-by: Oscar Salvador
Thanks.
Reviewed-by: Miaohe Lin
> ---
> include/linux/hugetlb.h| 20 ++--
> include/linux
o_page_range() which applies a function to a
pte range")
Signed-off-by: Miaohe Lin
---
mm/memory.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/memory.c b/mm/memory.c
index 9d68a2340589..b2d6a0a6088b 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2394,
Hi:
On 2021/2/5 16:22, Oscar Salvador wrote:
> On Fri, Feb 05, 2021 at 03:29:43PM +0800, Miaohe Lin wrote:
>>> + if (likely(vmemmap_pages > RESERVE_VMEMMAP_NR))
>>> + h->nr_free_vmemmap_pages = vmemmap_pages - RESERVE_VMEMMAP_NR;
>>
We could use helper function pages_per_huge_page() to get the number of
pages in a hstate to simplify the code slightly.
Signed-off-by: Miaohe Lin
---
mm/hugetlb_cgroup.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c
index
commit d8ed45c5dcd4 ("mmap locking API: use coccinelle to convert mmap_sem
rwsem call sites") has convertd down_read_trylock() to mmap_read_trylock().
But it forgot to update the relevant comment.
Signed-off-by: Miaohe Lin
---
arch/arm64/mm/fault.c | 2 +-
1 file changed, 1 inser
On 2021/2/5 16:56, Oscar Salvador wrote:
> On Fri, Feb 05, 2021 at 04:39:26PM +0800, Miaohe Lin wrote:
>> Hi:
>> On 2021/2/5 16:22, Oscar Salvador wrote:
>>> On Fri, Feb 05, 2021 at 03:29:43PM +0800, Miaohe Lin wrote:
>>>>> + if (likely(vmemmap_pages &
We can use helper huge_page_size() to get the size of the pages allocated
when backing a VMA directly to make the code more simplified.
Signed-off-by: Miaohe Lin
---
mm/hugetlb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index
: David Rientjes
> Acked-by: Christoph Lameter
> Signed-off-by: Yafang Shao
LGTM. Thanks.
Reviewed-by: Miaohe Lin
> ---
> mm/slub.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/mm/slub.c b/mm/slub.c
> index 34dcc09e2ec9..87ff086e68a
-0c36-ebdd-2bc684c5a...@redhat.com/#t
>
> Suggested-by: Vlastimil Babka
> Cc: David Hildenbrand
> Signed-off-by: Yafang Shao
Looks good,thanks.
Reviewed-by: Miaohe Lin
> ---
> mm/slub.c | 10 +-
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff -
Hi:
On 2021/2/9 8:45, Mike Kravetz wrote:
> On 2/8/21 12:24 AM, Miaohe Lin wrote:
>> We can use helper huge_page_size() to get the hugepage size directly to
>> simplify the code slightly.
>>
>> Signed-off-by: Miaohe Lin
>> ---
>> mm/hugetlb.c | 14 ++--
On 2021/2/9 9:36, Mike Kravetz wrote:
> On 2/8/21 5:24 PM, Miaohe Lin wrote:
>> Hi:
>> On 2021/2/9 8:45, Mike Kravetz wrote:
>>> On 2/8/21 12:24 AM, Miaohe Lin wrote:
>>>> We can use helper huge_page_size() to get the hugepage size directly to
>>>>
Hi:
On 2021/2/9 9:26, Mike Kravetz wrote:
> On 2/8/21 12:37 AM, Miaohe Lin wrote:
>> PageHead(page) is implicitly checked in set_page_huge_active() via the
>> PageHeadHuge(page) check. So remove this explicit one.
>
> I do not disagree with the code change. However, this co
We can use helper huge_page_size() to get the hugepage size directly to
simplify the code slightly.
Reviewed-by: Mike Kravetz
Signed-off-by: Miaohe Lin
---
v1 -> v2
change huge_page_size(h) >> 10 to huge_page_size(h) / SZ_1K
collect Reviewed-by tag
---
mm/huget
On 2021/2/9 3:52, Mike Kravetz wrote:
> On 1/23/21 1:31 AM, Miaohe Lin wrote:
>> The current implementation of hugetlb_cgroup for shared mappings could have
>> different behavior. Consider the following two scenarios:
>>
>> 1.Assume initial css reference count of hugetlb
Hi:
On 2021/2/9 11:39, Mike Kravetz wrote:
> On 2/8/21 6:10 PM, Miaohe Lin wrote:
>> Hi:
>> On 2021/2/9 9:26, Mike Kravetz wrote:
>>> On 2/8/21 12:37 AM, Miaohe Lin wrote:
>>>> PageHead(page) is implicitly checked in set_page_huge_active() via the
>>&
All callers know they are operating on a hugetlb head page. So this
VM_BUG_ON_PAGE can not catch anything useful.
Signed-off-by: Miaohe Lin
---
mm/hugetlb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 06719fdf9fd6..cfa06fd1b8d7 100644
--- a/mm/hugetlb.c
Convert the uses of fallthrough comments to fallthrough macro. Please see
commit 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough' pseudo
keyword for switch/case use") for detail.
Signed-off-by: Hongxiang Lou
Signed-off-by: Miaohe Lin
---
fs/nfsd/nfs4callback.c | 2 +-
Convert the uses of fallthrough comments to fallthrough macro. Please see
commit 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough' pseudo
keyword for switch/case use") for detail.
Signed-off-by: Hongxiang Lou
Signed-off-by: Miaohe Lin
---
fs/xfs/libxfs/xfs_ag_resv
Convert the uses of fallthrough comments to fallthrough macro. Please see
commit 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough' pseudo
keyword for switch/case use") for detail.
Signed-off-by: Hongxiang Lou
Signed-off-by: Miaohe Lin
---
fs/nfs/blocklayout/bloc
skb_mpls_push() and skb_mpls_pop() expect skb->data at mac header. Check
this assumption or we would get wrong mac_header and network_header.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 8
1 file changed, 8 insertions(+)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
in
t;)
Signed-off-by: Miaohe Lin
---
net/core/sock.c | 25 +++--
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index 49cd5ffe673e..c9083ad44ea1 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3406,6 +3406,16 @@ s
The skb_shared_info part of the data is assigned in the following loop. It
is meaningless to do a memcpy here.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 7e2e502ef519..5b983c9472f5 100644
We can possibly avoid strcmp warncomm with current->comm by check warned
first.
Signed-off-by: Miaohe Lin
---
net/core/sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index e4f40b175acb..51e13bc42791 100644
--- a/net/core/sock.c
++
The npages test against MAX_SKB_FRAGS can be relaxed if we succeed to
allocate high order pages as the note in comment said.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Miaohe Lin
---
net/tipc/bearer.c | 2 +-
net/tipc/link.c | 2 +-
net/tipc/socket.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 808b147df7d5
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Miaohe Lin
---
net/ceph/ceph_hash.c| 20 ++--
net/ceph/crush/mapper.c | 2 +-
net/ceph/messenger.c| 4 ++--
net/ceph/mon_client.c | 2 +-
net/ceph/osd_client.c | 4 ++--
5 files changed
We've been warning about SO_BSDCOMPAT usage for many years. We may remove
this code completely now.
Suggested-by: David S. Miller
Signed-off-by: Miaohe Lin
---
net/core/sock.c | 14 --
1 file changed, 14 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
Signed-off-by: Miaohe Lin
---
mm/migrate.c | 71 +++-
1 file changed, 43 insertions(+), 28 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 34a842a8eb6a..9026876a27dc 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1869,33 +1869,27 @@ static
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Hongxiang Lou
Signed-off-by: Miaohe Lin
---
fs/ceph/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index d51c3f2fdca0..30cd00265181 100644
--- a/fs/ceph
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Hongxiang Lou
Signed-off-by: Miaohe Lin
---
block/badblocks.c | 2 +-
block/bfq-iosched.c | 4 ++--
block/blk-wbt.c | 2 +-
block/ioprio.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Hongxiang Lou
Signed-off-by: Miaohe Lin
---
drivers/block/rbd.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index d9c0e7d154f9..011539039693
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Hongxiang Lou
Signed-off-by: Miaohe Lin
---
fs/nfsd/nfs4callback.c | 2 +-
fs/nfsd/nfs4proc.c | 2 +-
fs/nfsd/nfs4state.c| 2 +-
fs/nfsd/nfsfh.c| 2 +-
fs/nfsd/vfs.c | 4 ++--
5 files changed
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Hongxiang Lou
Signed-off-by: Miaohe Lin
---
fs/adfs/dir_f.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/adfs/dir_f.c b/fs/adfs/dir_f.c
index 30d526fecc3f..b9e271595d32 100644
1 - 100 of 434 matches
Mail list logo