linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] swap: THP optimizing refactoring
@ 2018-07-17  0:55 Huang, Ying
  2018-07-17  0:55 ` [PATCH v2 1/7] swap: Add comments to lock_cluster_or_swap_info() Huang, Ying
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Huang, Ying @ 2018-07-17  0:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, linux-kernel, Dave Hansen, Michal Hocko,
	Johannes Weiner, Shaohua Li, Hugh Dickins, Minchan Kim,
	Rik van Riel, Daniel Jordan, Dan Williams

This patchset is based on 2018-07-13 head of mmotm tree.

Now the THP (Transparent Huge Page) swap optimizing is implemented in
the way like below,

#ifdef CONFIG_THP_SWAP
huge_function(...)
{
}
#else
normal_function(...)
{
}
#endif

general_function(...)
{
	if (huge)
		return thp_function(...);
	else
		return normal_function(...);
}

As pointed out by Dave Hansen, this will,

1. Created a new, wholly untested code path for huge page
2. Created two places to patch bugs
3. Are not reusing code when possible

This patchset is to address these problems via merging huge/normal
code path/functions if possible.

One concern is that this may cause code size to dilate when
!CONFIG_TRANSPARENT_HUGEPAGE.  The data shows that most refactoring
will only cause quite slight code size increase.

Best Regards,
Huang, Ying

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-07-19  4:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17  0:55 [PATCH v2 0/7] swap: THP optimizing refactoring Huang, Ying
2018-07-17  0:55 ` [PATCH v2 1/7] swap: Add comments to lock_cluster_or_swap_info() Huang, Ying
2018-07-17 18:27   ` Dave Hansen
2018-07-18  3:09     ` Huang, Ying
2018-07-17  0:55 ` [PATCH v2 2/7] mm/swapfile.c: Replace some #ifdef with IS_ENABLED() Huang, Ying
2018-07-17 18:32   ` Dave Hansen
2018-07-18  3:25     ` Huang, Ying
2018-07-18 15:15       ` Dave Hansen
2018-07-19  4:42         ` Huang, Ying
2018-07-17  0:55 ` [PATCH v2 3/7] swap: Use swap_count() in swap_page_trans_huge_swapped() Huang, Ying
2018-07-17  0:55 ` [PATCH v2 4/7] swap: Unify normal/huge code path " Huang, Ying
2018-07-17  0:55 ` [PATCH v2 5/7] swap: Unify normal/huge code path in put_swap_page() Huang, Ying
2018-07-17  0:55 ` [PATCH v2 6/7] swap: Add __swap_entry_free_locked() Huang, Ying
2018-07-17  0:55 ` [PATCH v2 7/7] swap, put_swap_page: Share more between huge/normal code path Huang, Ying
2018-07-17 18:36   ` Dave Hansen
2018-07-18  2:56     ` Huang, Ying
2018-07-18 15:13       ` Dave Hansen
2018-07-17 15:17 ` [PATCH v2 0/7] swap: THP optimizing refactoring Daniel Jordan
2018-07-18  2:56   ` Huang, Ying

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).