linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/8] swap: THP optimizing refactoring
@ 2018-07-20  7:18 Huang Ying
  2018-07-20  7:18 ` [PATCH v4 1/8] swap: Add comments to lock_cluster_or_swap_info() Huang Ying
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Huang Ying @ 2018-07-20  7:18 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] 9+ messages in thread

end of thread, other threads:[~2018-07-20  7:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20  7:18 [PATCH v4 0/8] swap: THP optimizing refactoring Huang Ying
2018-07-20  7:18 ` [PATCH v4 1/8] swap: Add comments to lock_cluster_or_swap_info() Huang Ying
2018-07-20  7:18 ` [PATCH v4 2/8] mm/swapfile.c: Replace some #ifdef with IS_ENABLED() Huang Ying
2018-07-20  7:18 ` [PATCH v4 3/8] swap: Use swap_count() in swap_page_trans_huge_swapped() Huang Ying
2018-07-20  7:18 ` [PATCH v4 4/8] swap: Unify normal/huge code path " Huang Ying
2018-07-20  7:18 ` [PATCH v4 5/8] swap: Unify normal/huge code path in put_swap_page() Huang Ying
2018-07-20  7:18 ` [PATCH v4 6/8] swap, get_swap_pages: Use entry_size instead of cluster in parameter Huang Ying
2018-07-20  7:18 ` [PATCH v4 7/8] swap: Add __swap_entry_free_locked() Huang Ying
2018-07-20  7:18 ` [PATCH v4 8/8] swap, put_swap_page: Share more between huge/normal code path 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).