Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1458955
| From | "Huang, Ying" <ying.huang@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC 02/11] swap: Change SWAPFILE_CLUSTER to 512 |
| Date | 2016-08-09 18:50 +0200 |
| Message-ID | <s4io2-1E1-21@gated-at.bofh.it> (permalink) |
| References | <s4iel-1Aq-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Huang Ying <ying.huang@intel.com> In this patch, the size of swap cluster is changed to that of THP on x86_64 (512). This is for THP (Transparent Huge Page) swap support on x86_64. Where one swap cluster will be used to hold the contents of each THP swapped out. And some information of the swapped out THP (such as compound map count) will be recorded in the swap_cluster_info data structure. In effect, this will enlarge swap cluster size by 2 times. Which may make it harder to find a free cluster when swap space becomes fragmented. So that, this may reduce the continuous swap space allocation and sequence write if that happens in theory. The performance test in 0day show no regressions caused by this. Cc: Hugh Dickins <hughd@google.com> Cc: Shaohua Li <shli@kernel.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: "Huang, Ying" <ying.huang@intel.com> --- mm/swapfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index 09e3877..18f9292 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -196,7 +196,7 @@ static void discard_swap_cluster(struct swap_info_struct *si, } } -#define SWAPFILE_CLUSTER 256 +#define SWAPFILE_CLUSTER 512 #define LATENCY_LIMIT 256 static inline void cluster_set_flag(struct swap_cluster_info *info, -- 2.8.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC 00/11] THP swap: Delay splitting THP during swapping out "Huang, Ying" <ying.huang@intel.com> - 2016-08-09 18:40 +0200 [RFC 09/11] mm, THP: Add can_split_huge_page() "Huang, Ying" <ying.huang@intel.com> - 2016-08-09 18:40 +0200 [RFC 08/11] mm, THP, swap: Support to add/delete THP to/from swap cache "Huang, Ying" <ying.huang@intel.com> - 2016-08-09 18:40 +0200 [RFC 11/11] mm, THP, swap: Delay splitting THP during swap out "Huang, Ying" <ying.huang@intel.com> - 2016-08-09 18:40 +0200 [RFC 04/11] mm, memcg: Support to charge/uncharge multiple swap entries "Huang, Ying" <ying.huang@intel.com> - 2016-08-09 18:50 +0200 [RFC 02/11] swap: Change SWAPFILE_CLUSTER to 512 "Huang, Ying" <ying.huang@intel.com> - 2016-08-09 18:50 +0200 [RFC 03/11] mm, memcg: Add swap_cgroup_iter iterator "Huang, Ying" <ying.huang@intel.com> - 2016-08-09 18:50 +0200 [RFC 01/11] swap: Add swap_cluster_list "Huang, Ying" <ying.huang@intel.com> - 2016-08-09 18:50 +0200 [RFC 06/11] mm, THP, swap: Add get_huge_swap_page() "Huang, Ying" <ying.huang@intel.com> - 2016-08-09 18:50 +0200 [RFC 05/11] mm, THP, swap: Add swap cluster allocate/free functions "Huang, Ying" <ying.huang@intel.com> - 2016-08-09 18:50 +0200 Re: [RFC 00/11] THP swap: Delay splitting THP during swapping out "Huang\, Ying" <ying.huang@intel.com> - 2016-08-09 19:30 +0200
csiph-web