From: Huang Ying
It's hard to write a whole transparent huge page (THP) to a file
backed swap device during swapping out and the file backed swap device
isn't very popular. So the huge cluster allocation for the file
backed swap device is disabled.
Signed-off-by: "Huang, Ying
From: Huang Ying
When swapping out THP (Transparent Huge Page), instead of swapping out
the THP as a whole, sometimes we have to fallback to split the THP
into normal pages before swapping, because no free swap clusters are
available, or cgroup limit is exceeded, etc. To count the number of
the
From: Huang Ying
PTE mapped THP (Transparent Huge Page) will be ignored when moving
memory cgroup charge. But for THP which is in the swap cache, the
memory cgroup charge for the swap of a tail-page may be moved in
current implementation. That isn't correct, because the swap charge
for al
Ross Zwisler writes:
> On Thu, May 25, 2017 at 02:46:27PM +0800, Huang, Ying wrote:
>> From: Huang Ying
>>
>> The .rw_page in struct block_device_operations is used by the swap
>> subsystem to read/write the page contents from/into the corresponding
>> swap slo
Ming Lei writes:
> On Thu, May 25, 2017 at 02:46:28PM +0800, Huang, Ying wrote:
>> From: Huang Ying
>>
>> In this patch, BIO_MAX_PAGES is changed from 256 to HPAGE_PMD_NR if
>> CONFIG_THP_SWAP is enabled and HPAGE_PMD_NR > 256. This is to support
>&
From: Huang Ying
After supporting to delay THP (Transparent Huge Page) splitting after
swapped out, it is possible that some page table mappings of the THP
are turned into swap entries. So reuse_swap_page() need to check the
swap count in addition to the map count as before. This patch done
From: Huang Ying
It's hard to write a whole transparent huge page (THP) to a file
backed swap device during swapping out and the file backed swap device
isn't very popular. So the huge cluster allocation for the file
backed swap device is disabled.
Signed-off-by: "Huang, Ying
From: Huang Ying
The .rw_page in struct block_device_operations is used by the swap
subsystem to read/write the page contents from/into the corresponding
swap slot in the swap device. To support the THP (Transparent Huge
Page) swap optimization, the .rw_page is enhanced to support to
read/write
From: Huang Ying
Hi, Andrew, could you help me to check whether the overall design is
reasonable?
Hi, Johannes and Minchan, Thanks a lot for your review to the first
step of the THP swap optimization! Could you help me to review the
second step in this patchset?
Hi, Hugh, Shaohua, Minchan and
From: Huang Ying
In this patch, BIO_MAX_PAGES is changed from 256 to HPAGE_PMD_NR if
CONFIG_THP_SWAP is enabled and HPAGE_PMD_NR > 256. This is to support
THP (Transparent Huge Page) swap optimization. Where the THP will be
write to disk as a whole instead of HPAGE_PMD_NR normal pages to ba
From: Huang Ying
PTE mapped THP (Transparent Huge Page) will be ignored when moving
memory cgroup charge. But for THP which is in the swap cache, the
memory cgroup charge for the swap of a tail-page may be moved in
current implementation. That isn't correct, because the swap charge
for al
From: Huang Ying
When swapping out THP (Transparent Huge Page), instead of swapping out
the THP as a whole, sometimes we have to fallback to split the THP
into normal pages before swapping, because no free swap clusters are
available, or cgroup limit is exceeded, etc. To count the number of
the
From: Huang Ying
This patch makes mem_cgroup_swapout() works for the transparent huge
page (THP). Which will move the memory cgroup charge from memory to
swap for a THP.
This will be used for the THP swap support. Where a THP may be
swapped out as a whole to a set of (HPAGE_PMD_NR) continuous
From: Huang Ying
For a THP (Transparent Huge Page), tail_page->mem_cgroup is NULL. So
to check whether the page is charged already, we need to check the
head page. This is not an issue before because it is impossible for a
THP to be in the swap cache before. But after we add delay
From: Huang Ying
In this patch, splitting transparent huge page (THP) during swapping
out is delayed from after adding the THP into the swap cache to after
swapping out finishes. After the patch, more operations for the
anonymous THP reclaiming, such as writing the THP to the swap device
From: Huang Ying
After adding swapping out support for THP (Transparent Huge Page), it
is possible that a THP in swap cache (partly swapped out) need to be
split. To split such a THP, the swap cluster backing the THP need to
be split too, that is, the CLUSTER_FLAG_HUGE flag need to be cleared
From: Huang Ying
In the patch, the swap writing is enhanced to support to write a
THP (Transparent Huge Page) as a whole. This is a part of the THP
swap optimization and will improve swap write IO performance for the
more large continuous IOs.
Signed-off-by: "Huang, Ying"
Cc: Johan
From: Huang Ying
The normal swap slot reclaiming can be done when the swap count
reaches SWAP_HAS_CACHE. But for the swap slot which is backing a THP,
all swap slots backing one THP must be reclaimed together, because the
swap slot may be used again when the THP is swapped out again later.
So
From: Huang Ying
Previously, swapcache_free_cluster() is used only in the error path of
shrink_page_list() to free the swap cluster just allocated if the
THP (Transparent Huge Page) is failed to be split. In this patch, it
is enhanced to clear the swap cache flag (SWAP_HAS_CACHE) for the swap
From: Huang Ying
To reduce the lock contention of swap_info_struct->lock when freeing
swap entry. The freed swap entries will be collected in a per-CPU
buffer firstly, and be really freed later in batch. During the batch
freeing, if the consecutive swap entries in the per-CPU buffer belongs
From: Huang Ying
This patch is only a code clean up patch without functionality
changes. It moves CONFIG_THP_SWAP checking from inside swap slot
allocation to before we start swapping the THP. This makes the code
path a little easier to be followed and understood.
Signed-off-by: "Huang,
natural.
Acked-by: Johannes Weiner
Signed-off-by: Minchan Kim
Signed-off-by: "Huang, Ying"
---
include/linux/swap.h | 4 ++--
mm/swap_state.c | 23 ++-
mm/vmscan.c | 17 -
3 files changed, 24 insertions(+), 20 deletions(-)
diff --git
size.
[ying.hu...@intel.com: minor cleanup and fix]
Acked-by: Johannes Weiner
Signed-off-by: Minchan Kim
Signed-off-by: "Huang, Ying"
---
include/linux/swap.h | 12 ++--
mm/shmem.c | 2 +-
mm/swap_state.c | 13 +++--
mm/swapfile.c| 16 +
From: Huang Ying
To swap out THP (Transparent Huage Page), before splitting the THP,
the swap cluster will be allocated and the THP will be added into the
swap cache. But it is possible that the THP cannot be split, so that
we must delete the THP from the swap cache and free the swap cluster
From: Huang Ying
In this patch, splitting huge page is delayed from almost the first
step of swapping out to after allocating the swap space for the
THP (Transparent Huge Page) and adding the THP into the swap cache.
This will batch the corresponding operation, thus improve THP swap out
From: Huang Ying
If there is no compound map for a THP (Transparent Huge Page), it is
possible that the map count of some sub-pages of the THP is 0. So it
is better to split the THP before swapping out. In this way, the
sub-pages not mapped will be freed, and we can avoid the unnecessary
swap
From: Huang Ying
This patchset is to optimize the performance of Transparent Huge Page
(THP) swap.
Recently, the performance of the storage devices improved so fast that
we cannot saturate the disk bandwidth with single logical CPU when do
page swap out even on a high-end server machine
e) &&
>> > +split_huge_page_to_list(page, page_list)) {
>> > + delete_from_swap_cache(page);
>> >goto activate_locked;
>> > + }
>>
>> Pulling this out of add_to_swap() is an improvement for sure. Add an
>> XXX: before that "we don't support THP writes" comment for good
>> measure :)
>
> Sure.
>
> It could be a separate patch which makes add_to_swap clean via
> removing page_list argument but I hope Huang take/fold it when he
> resend it because it would be more important with THP swap.
Sure. I will take this patch as one patch of the THP swap series.
Because the first patch of the THP swap series is a little big, I don't
think it is a good idea to fold this patch into it. Could you update
the patch according to Johannes' comments and resend it?
Best Regards,
Huang, Ying
Minchan Kim writes:
> Hi Huang,
>
> On Tue, May 02, 2017 at 01:35:24PM +0800, Huang, Ying wrote:
>> Hi, Minchan,
>>
>> Minchan Kim writes:
>>
>> > On Fri, Apr 28, 2017 at 09:35:37PM +0800, Huang, Ying wrote:
>> >> In fact, during
Hi, Minchan,
Minchan Kim writes:
> On Fri, Apr 28, 2017 at 09:35:37PM +0800, Huang, Ying wrote:
>> In fact, during the test, I found the overhead of sort() is comparable
>> with the performance difference of adding likely()/unlikely() to the
>> "if" in th
te it.
>
> But given it was fingered by a human doing desktopy things that trumps
> artificial benchmark.
>
> Still, I'll try and see if I can fix thing once I find a spare moment.
Do you have any update for this regression?
Don't want to push you, just want to get the latest status.
Best Regards,
Huang, Ying
"Huang, Ying" writes:
> Minchan Kim writes:
>
>> On Fri, Apr 28, 2017 at 04:05:26PM +0800, Huang, Ying wrote:
>>> Minchan Kim writes:
>>>
>>> > On Fri, Apr 28, 2017 at 09:09:53AM +0800, Huang, Ying wrote:
>>> >> Minchan Kim
Minchan Kim writes:
> On Thu, Apr 27, 2017 at 03:12:34PM +0800, Huang, Ying wrote:
>> Minchan Kim writes:
>>
>> > On Tue, Apr 25, 2017 at 08:56:56PM +0800, Huang, Ying wrote:
>> >> From: Huang Ying
>> >>
>> >> In this patch, splitt
Minchan Kim writes:
> On Fri, Apr 28, 2017 at 04:05:26PM +0800, Huang, Ying wrote:
>> Minchan Kim writes:
>>
>> > On Fri, Apr 28, 2017 at 09:09:53AM +0800, Huang, Ying wrote:
>> >> Minchan Kim writes:
>> >>
>> >> > On Wed, Apr 26
Minchan Kim writes:
> On Fri, Apr 28, 2017 at 09:09:53AM +0800, Huang, Ying wrote:
>> Minchan Kim writes:
>>
>> > On Wed, Apr 26, 2017 at 08:42:10PM +0800, Huang, Ying wrote:
>> >> Minchan Kim writes:
>> >>
>> >> > On Fri, Apr 2
Minchan Kim writes:
> On Wed, Apr 26, 2017 at 08:42:10PM +0800, Huang, Ying wrote:
>> Minchan Kim writes:
>>
>> > On Fri, Apr 21, 2017 at 08:29:30PM +0800, Huang, Ying wrote:
>> >> "Huang, Ying" writes:
>> >>
>> >> >
Minchan Kim writes:
> On Tue, Apr 25, 2017 at 08:56:56PM +0800, Huang, Ying wrote:
>> From: Huang Ying
>>
>> In this patch, splitting huge page is delayed from almost the first
>> step of swapping out to after allocating the swap space for the
>> THP (Transpar
Tim Chen writes:
>>
>> From 7bd903c42749c448ef6acbbdee8dcbc1c5b498b9 Mon Sep 17 00:00:00 2001
>> From: Huang Ying
>> Date: Thu, 23 Feb 2017 13:05:20 +0800
>> Subject: [PATCH -v5] mm, swap: Sort swap entries before free
>>
Minchan Kim writes:
> On Fri, Apr 21, 2017 at 08:29:30PM +0800, Huang, Ying wrote:
>> "Huang, Ying" writes:
>>
>> > Minchan Kim writes:
>> >
>> >> On Wed, Apr 19, 2017 at 04:14:43PM +0800, Huang, Ying wrote:
>> >>> Minchan
From: Huang Ying
If there is no compound map for a THP (Transparent Huge Page), it is
possible that the map count of some sub-pages of the THP is 0. So it
is better to split the THP before swapping out. In this way, the
sub-pages not mapped will be freed, and we can avoid the unnecessary
swap
From: Huang Ying
To swap out THP (Transparent Huage Page), before splitting the THP,
the swap cluster will be allocated and the THP will be added into the
swap cache. But it is possible that the THP cannot be split, so that
we must delete the THP from the swap cache and free the swap cluster
From: Huang Ying
In this patch, splitting huge page is delayed from almost the first
step of swapping out to after allocating the swap space for the
THP (Transparent Huge Page) and adding the THP into the swap cache.
This will batch the corresponding operation, thus improve THP swap out
From: Huang Ying
This patchset is to optimize the performance of Transparent Huge Page
(THP) swap.
Recently, the performance of the storage devices improved so fast that
we cannot saturate the disk bandwidth with single logical CPU when do
page swap out even on a high-end server machine
Minchan Kim writes:
> On Fri, Apr 21, 2017 at 08:29:30PM +0800, Huang, Ying wrote:
>> "Huang, Ying" writes:
>>
>> > Minchan Kim writes:
>> >
>> >> On Wed, Apr 19, 2017 at 04:14:43PM +0800, Huang, Ying wrote:
>> >>> Minchan
Tim Chen writes:
> On Fri, 2017-04-21 at 20:29 +0800, Huang, Ying wrote:
>> "Huang, Ying" writes:
>>
>> >
>> > Minchan Kim writes:
>> >
>> > >
>> > > On Wed, Apr 19, 2017 at 04:14:43PM +0800, Huang, Ying wrote:
;swap_map + offset;
>> > + for (i = 0; i < SWAPFILE_CLUSTER; i++) {
>> > + VM_BUG_ON(map[i] != SWAP_HAS_CACHE);
>> > + map[i] = 0;
>> > + }
>> > + unlock_cluster(ci);
>> > + mem_cgroup_uncharge_swap(entry, SWAPFILE_CLUSTER);
>> > + swap_free_cluster(si, idx);
>> > + spin_unlock(&si->lock);
>> > +}
>> > +#endif /* CONFIG_THP_SWAP */
>> > +
>> > static int swp_entry_cmp(const void *ent1, const void *ent2)
>> > {
>> >const swp_entry_t *e1 = ent1, *e2 = ent2;
>>
>>
>> This is a massive patch, I presume you've got recommendations to keep it
>> this way?
>
> It used to be split into patches that introduce API and helpers on one
> hand and patches that use these functions on the other hand. That was
> impossible to review, because you had to jump between emails.
>
> If you have ideas about which parts could be split out and be
> stand-alone changes in their own right, I'd be all for that.
Best Regards,
Huang, Ying
From: Huang Ying
In swapcache_free_entries(), if swap_info_get_cont() return NULL,
something wrong occurs for the swap entry. But we should still
continue to free the following swap entries in the array instead of
skip them to avoid swap space leak. This is just problem in error
path, where
"Huang, Ying" writes:
> Minchan Kim writes:
>
>> On Wed, Apr 19, 2017 at 04:14:43PM +0800, Huang, Ying wrote:
>>> Minchan Kim writes:
>>>
>>> > Hi Huang,
>>> >
>>> > On Fri, Apr 07, 2017 at 02:49:
Balbir Singh writes:
> On Wed, 2017-04-19 at 15:06 +0800, Huang, Ying wrote:
>> From: Huang Ying
>>
>> In this patch, splitting huge page is delayed from almost the first
>> step of swapping out to after allocating the swap space for the
>> THP (Transparent H
Johannes Weiner writes:
> On Thu, Apr 20, 2017 at 08:50:43AM +0800, Huang, Ying wrote:
>> Johannes Weiner writes:
>> > On Wed, Apr 19, 2017 at 03:06:24PM +0800, Huang, Ying wrote:
>> >> With the patchset, the swap out throughput improves 3.6% (from about
>> &
Minchan Kim writes:
> On Wed, Apr 19, 2017 at 04:14:43PM +0800, Huang, Ying wrote:
>> Minchan Kim writes:
>>
>> > Hi Huang,
>> >
>> > On Fri, Apr 07, 2017 at 02:49:01PM +0800, Huang, Ying wrote:
>> >> From: Huang Ying
>> >>
Johannes Weiner writes:
> On Wed, Apr 19, 2017 at 03:06:25PM +0800, Huang, Ying wrote:
>> From: Huang Ying
>>
>> If there is no compound map for a THP (Transparent Huge Page), it is
>> possible that the map count of some sub-pages of the THP is 0. So it
>>
Johannes Weiner writes:
> On Wed, Apr 19, 2017 at 03:06:24PM +0800, Huang, Ying wrote:
>> From: Huang Ying
>>
>> To swap out THP (Transparent Huage Page), before splitting the THP,
>> the swap cluster will be allocated and the THP will be added into the
>> swa
Hi, Johannes,
Johannes Weiner writes:
> On Wed, Apr 19, 2017 at 03:06:23PM +0800, Huang, Ying wrote:
>> @@ -206,17 +212,34 @@ int add_to_swap(struct page *page, struct list_head
>> *list)
>> */
>> err = add_to_swap_cache(page, entry,
>>
Minchan Kim writes:
> Hi Huang,
>
> On Fri, Apr 07, 2017 at 02:49:01PM +0800, Huang, Ying wrote:
>> From: Huang Ying
>>
>> To reduce the lock contention of swap_info_struct->lock when freeing
>> swap entry. The freed swap entries will be collected in a per-
From: Huang Ying
To swap out THP (Transparent Huage Page), before splitting the THP,
the swap cluster will be allocated and the THP will be added into the
swap cache. But it is possible that the THP cannot be split, so that
we must delete the THP from the swap cache and free the swap cluster
From: Huang Ying
If there is no compound map for a THP (Transparent Huge Page), it is
possible that the map count of some sub-pages of the THP is 0. So it
is better to split the THP before swapping out. In this way, the
sub-pages not mapped will be freed, and we can avoid the unnecessary
swap
From: Huang Ying
In this patch, splitting huge page is delayed from almost the first
step of swapping out to after allocating the swap space for the
THP (Transparent Huge Page) and adding the THP into the swap cache.
This will batch the corresponding operation, thus improve THP swap out
From: Huang Ying
This patchset is to optimize the performance of Transparent Huge Page
(THP) swap.
Recently, the performance of the storage devices improved so fast that
we cannot saturate the disk bandwidth with single logical CPU when do
page swap out even on a high-end server machine
Johannes Weiner writes:
> On Sat, Apr 15, 2017 at 09:17:04AM +0800, Huang, Ying wrote:
>> Hi, Johannes,
>>
>> Johannes Weiner writes:
>>
>> > Hi Huang,
>> >
>> > I reviewed this patch based on the feedback I already provided, but
>
.
Is 'XXX' here intended.
> +
> + For selection by architectures with reasonable THP sizes.
> +
> config TRANSPARENT_HUGE_PAGECACHE
> def_bool y
> depends on TRANSPARENT_HUGEPAGE
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index d14dd961f626..4a5c1ca21894 100644
[...]
Best Regards,
Huang, Ying
Andrew Morton writes:
> On Fri, 7 Apr 2017 14:49:01 +0800 "Huang, Ying" wrote:
>
>> To reduce the lock contention of swap_info_struct->lock when freeing
>> swap entry. The freed swap entries will be collected in a per-CPU
>> buffer firstly, and be rea
Andrew Morton writes:
> On Fri, 7 Apr 2017 14:49:01 +0800 "Huang, Ying" wrote:
>
>> To reduce the lock contention of swap_info_struct->lock when freeing
>> swap entry. The freed swap entries will be collected in a per-CPU
>> buffer firstly, and be rea
From: Huang Ying
To reduce the lock contention of swap_info_struct->lock when freeing
swap entry. The freed swap entries will be collected in a per-CPU
buffer firstly, and be really freed later in batch. During the batch
freeing, if the consecutive swap entries in the per-CPU buffer belongs
From: Huang Ying
Now vzalloc() is used in swap code to allocate various data
structures, such as swap cache, swap slots cache, cluster info, etc.
Because the size may be too large on some system, so that normal
kzalloc() may fail. But using kzalloc() has some advantages, for
example, less
Hi, Matthew,
Matthew Wilcox writes:
> On Wed, Apr 05, 2017 at 03:10:58PM +0800, Huang, Ying wrote:
>> In general, kmalloc() will have less memory fragmentation than
>> vmalloc(). From Dave Hansen: For example, we have a two-page data
>> structure. vmalloc() takes two eff
From: Huang Ying
If there is no compound map for a THP (Transparent Huge Page), it is
possible that the map count of some sub-pages of the THP is 0. So it
is better to split the THP before swapping out. In this way, the
sub-pages not mapped will be freed, and we can avoid the unnecessary
swap
From: Huang Ying
In the original THP swapping out implementation, before splitting the
THP (Transparent Huage Page), the swap cluster will be allocated and
the THP will be added into the swap cache. But it is possible that
the THP cannot be split, and we must delete the THP from the swap
cache
From: Huang Ying
In this patch, splitting huge page is delayed from almost the first
step of swapping out to after allocating the swap space for the
THP (Transparent Huge Page) and adding the THP into the swap cache.
This will batch the corresponding operation, thus improve THP swap out
From: Huang Ying
This patchset is to optimize the performance of Transparent Huge Page
(THP) swap.
Hi, Andrew, could you help me to check whether the overall design is
reasonable?
Hi, Hugh, Shaohua, Minchan and Rik, could you help me to review the
swap part of the patchset?
Hi, Andrea could
Rik van Riel writes:
> On Wed, 2017-04-05 at 15:10 +0800, Huang, Ying wrote:
>> To solve the issue, the per-CPU buffer is sorted according to the
>> swap
>> device before freeing the swap entries. Test shows that the time
>> spent by swapcache_free_entries() could
From: Huang Ying
To reduce the lock contention of swap_info_struct->lock when freeing
swap entry. The freed swap entries will be collected in a per-CPU
buffer firstly, and be really freed later in batch. During the batch
freeing, if the consecutive swap entries in the per-CPU buffer belongs
From: Huang Ying
Now vzalloc() is used in swap code to allocate various data
structures, such as swap cache, swap slots cache, cluster info, etc.
Because the size may be too large on some system, so that normal
kzalloc() may fail. But using kzalloc() has some advantages, for
example, less
From: Huang Ying
This is a code cleanup patch, no functionality changes. There are 2
unused function prototype in swap.h, they are removed.
Signed-off-by: "Huang, Ying"
Cc: Tim Chen
---
include/linux/swap.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/linux/swap.h
Michal Hocko writes:
> On Sat 01-04-17 12:47:56, Huang, Ying wrote:
>> Hi, Michal,
>>
>> Michal Hocko writes:
>>
>> > On Fri 24-03-17 06:56:10, Dave Hansen wrote:
>> >> On 03/24/2017 12:33 AM, John Hubbard wrote:
>> >> > There mig
More 2M pages == less fragmentation.
>
> Yes I agree with this. And the patch is no brainer. kvmalloc makes sure
> to not try too hard on the kmalloc side so I really didn't get the
> objection about direct compaction and reclaim which initially started
> this discussion. Besides that the swapon path usually happens early
> during the boot where we should have those larger blocks available.
Could I add your Acked-by for this patch?
Best Regards,
Huang, Ying
Johannes Weiner writes:
> On Thu, Mar 30, 2017 at 12:28:17PM +0800, Huang, Ying wrote:
>> Johannes Weiner writes:
>> > On Tue, Mar 28, 2017 at 01:32:04PM +0800, Huang, Ying wrote:
>> >> @@ -527,6 +527,23 @@ static inline swp_entry_t get_swap_page(void)
>&g
Johannes Weiner writes:
> On Thu, Mar 30, 2017 at 08:45:56AM +0800, Huang, Ying wrote:
>> Johannes Weiner writes:
>>
>> > On Tue, Mar 28, 2017 at 01:32:01PM +0800, Huang, Ying wrote:
>> >> @@ -499,6 +499,19 @@ config FRONTSWAP
>> >>
Johannes Weiner writes:
> On Thu, Mar 30, 2017 at 12:15:13PM +0800, Huang, Ying wrote:
>> Johannes Weiner writes:
>> > On Tue, Mar 28, 2017 at 01:32:09PM +0800, Huang, Ying wrote:
>> >> @@ -198,6 +240,18 @@ int add_to_swap(struct page *page, struct list_head
>&
Johannes Weiner writes:
> On Tue, Mar 28, 2017 at 01:32:04PM +0800, Huang, Ying wrote:
>> @@ -527,6 +527,23 @@ static inline swp_entry_t get_swap_page(void)
>>
>> #endif /* CONFIG_SWAP */
>>
>> +#ifdef CONFIG_THP_SWAP_CLUSTER
>> +static inl
Johannes Weiner writes:
> On Tue, Mar 28, 2017 at 01:32:09PM +0800, Huang, Ying wrote:
>> @@ -183,12 +184,53 @@ void __delete_from_swap_cache(struct page *page)
>> ADD_CACHE_INFO(del_total, nr);
>> }
>>
>> +#ifdef CONFIG_THP_SWAP_CLUSTER
>> +int a
Johannes Weiner writes:
> On Tue, Mar 28, 2017 at 01:32:02PM +0800, Huang, Ying wrote:
>> @@ -5908,16 +5907,19 @@ void mem_cgroup_swapout(struct page *page,
>> swp_entry_t entry)
>> css_put(&memcg->css);
>> }
>>
>> -/*
>>
Johannes Weiner writes:
> On Tue, Mar 28, 2017 at 01:32:01PM +0800, Huang, Ying wrote:
>> @@ -499,6 +499,19 @@ config FRONTSWAP
>>
>>If unsure, say Y to enable frontswap.
>>
>> +config ARCH_USES_THP_SWAP_CLUSTER
>> +bool
>>
Hi, Andrew,
Andrew Morton writes:
> On Tue, 28 Mar 2017 13:32:00 +0800 "Huang, Ying" wrote:
>
>> Hi, Andrew, could you help me to check whether the overall design is
>> reasonable?
>>
>> Hi, Hugh, Shaohua, Minchan and Rik, could you help me to
"Kirill A. Shutemov" writes:
> On Tue, Mar 28, 2017 at 01:32:01PM +0800, Huang, Ying wrote:
>> From: Huang Ying
>>
>> In this patch, the size of the swap cluster is changed to that of the
>> THP (Transparent Huge Page) on x86_64 architecture (512). T
From: Huang Ying
This patch enhanced the split_huge_page_to_list() to work properly for
the THP (Transparent Huge Page) in the swap cache during swapping out.
This is used for delaying splitting the THP during swapping out. Where
for a THP to be swapped out, we will allocate a swap cluster
From: Huang Ying
A variation of get_swap_page(), get_huge_swap_page(), is added to
allocate a swap cluster (HPAGE_PMD_NR swap slots) based on the swap
cluster allocation function. A fair simple algorithm is used, that is,
only the first swap device in priority list will be tried to allocate
the
From: Huang Ying
This patch make it possible to charge or uncharge a set of continuous
swap entries in the swap cgroup. The number of swap entries is
specified via an added parameter.
This will be used for the THP (Transparent Huge Page) swap support.
Where a swap cluster backing a THP may be
From: Huang Ying
With this patch, a THP (Transparent Huge Page) can be added/deleted
to/from the swap cache as a set of (HPAGE_PMD_NR) sub-pages.
This will be used for the THP (Transparent Huge Page) swap support.
Where one THP may be added/delted to/from the swap cache. This will
batch the
From: Huang Ying
Hi, Andrew, could you help me to check whether the overall design is
reasonable?
Hi, Hugh, Shaohua, Minchan and Rik, could you help me to review the
swap part of the patchset? Especially [1/9], [3/9], [4/9], [5/9],
[6/9], [9/9].
Hi, Andrea could you help me to review the THP
From: Huang Ying
In this patch, splitting huge page is delayed from almost the first step
of swapping out to after allocating the swap space for the
THP (Transparent Huge Page) and adding the THP into the swap cache.
This will reduce lock acquiring/releasing for the locks used for the
swap cache
From: Huang Ying
The swap cluster allocation/free functions are added based on the
existing swap cluster management mechanism for SSD. These functions
don't work for the rotating hard disks because the existing swap cluster
management mechanism doesn't work for them. The hard disks s
From: Huang Ying
__swapcache_free() is added to support to clear the SWAP_HAS_CACHE flag
for the huge page. This will free the specified swap cluster now.
Because now this function will be called only in the error path to free
the swap cluster just allocated. So the corresponding swap_map[i
From: Huang Ying
Separates checking whether we can split the huge page from
split_huge_page_to_list() into a function. This will help to check that
before splitting the THP (Transparent Huge Page) really.
This will be used for delaying splitting THP during swapping out. Where
for a THP, we
From: Huang Ying
In this patch, the size of the swap cluster is changed to that of the
THP (Transparent Huge Page) on x86_64 architecture (512). This is for
the THP swap support on x86_64. Where one swap cluster will be used to
hold the contents of each THP swapped out. And some information
John Hubbard writes:
> On 03/23/2017 09:52 PM, Huang, Ying wrote:
>> John Hubbard writes:
>>
>>> On 03/23/2017 07:41 PM, Huang, Ying wrote:
>>>> David Rientjes writes:
>>>>
>>>>> On Mon, 20 Mar 2017, Huang, Ying wrote:
>>>
John Hubbard writes:
> On 03/23/2017 07:41 PM, Huang, Ying wrote:
>> David Rientjes writes:
>>
>>> On Mon, 20 Mar 2017, Huang, Ying wrote:
>>>
>>>> From: Huang Ying
>>>>
>>>> Now vzalloc() is used in swap code to alloca
David Rientjes writes:
> On Mon, 20 Mar 2017, Huang, Ying wrote:
>
>> From: Huang Ying
>>
>> Now vzalloc() is used in swap code to allocate various data
>> structures, such as swap cache, swap slots cache, cluster info, etc.
>> Because the size may be too
From: Huang Ying
Now vzalloc() is used in swap code to allocate various data
structures, such as swap cache, swap slots cache, cluster info, etc.
Because the size may be too large on some system, so that normal
kzalloc() may fail. But using kzalloc() has some advantages, for
example, less
From: Huang Ying
To reduce the lock contention of swap_info_struct->lock when freeing
swap entry. The freed swap entries will be collected in a per-CPU
buffer firstly, and be really freed later in batch. During the batch
freeing, if the consecutive swap entries in the per-CPU buffer belongs
901 - 1000 of 1830 matches
Mail list logo