Message ID | 20180622035151.6676-3-ying.huang@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Jun 21, 2018 at 8:55 PM Huang, Ying <ying.huang@intel.com> wrote: > > From: Huang Ying <ying.huang@intel.com> > > It's unreasonable to optimize swapping for THP without basic swapping > support. And this will cause build errors when THP_SWAP functions are > defined in swapfile.c and called elsewhere. > > The comments are fixed too to reflect the latest progress. Looks good to me: Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Dan Williams <dan.j.williams@gmail.com> writes: > On Thu, Jun 21, 2018 at 8:55 PM Huang, Ying <ying.huang@intel.com> wrote: >> >> From: Huang Ying <ying.huang@intel.com> >> >> It's unreasonable to optimize swapping for THP without basic swapping >> support. And this will cause build errors when THP_SWAP functions are >> defined in swapfile.c and called elsewhere. >> >> The comments are fixed too to reflect the latest progress. > > Looks good to me: > > Reviewed-by: Dan Williams <dan.j.williams@intel.com> Thanks! Best Regards, Huang, Ying
> config THP_SWAP > def_bool y > - depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP > + depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP > help This seems like a bug-fix. Is there a reason this didn't cause problems up to now?
Dave Hansen <dave.hansen@linux.intel.com> writes: >> config THP_SWAP >> def_bool y >> - depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP >> + depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP >> help > > > This seems like a bug-fix. Is there a reason this didn't cause problems > up to now? Yes. The original code has some problem in theory, but not in practice because all code enclosed by #ifdef CONFIG_THP_SWAP #endif are in swapfile.c. But that will be not true in this patchset. Best Regards, Huang, Ying
On 07/09/2018 06:19 PM, Huang, Ying wrote: > Dave Hansen <dave.hansen@linux.intel.com> writes: > >>> config THP_SWAP >>> def_bool y >>> - depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP >>> + depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP >>> help >> >> This seems like a bug-fix. Is there a reason this didn't cause problems >> up to now? > Yes. The original code has some problem in theory, but not in practice > because all code enclosed by > > #ifdef CONFIG_THP_SWAP > #endif > > are in swapfile.c. But that will be not true in this patchset. That's great info for the changelog.
Dave Hansen <dave.hansen@linux.intel.com> writes: > On 07/09/2018 06:19 PM, Huang, Ying wrote: >> Dave Hansen <dave.hansen@linux.intel.com> writes: >> >>>> config THP_SWAP >>>> def_bool y >>>> - depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP >>>> + depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP >>>> help >>> >>> This seems like a bug-fix. Is there a reason this didn't cause problems >>> up to now? >> Yes. The original code has some problem in theory, but not in practice >> because all code enclosed by >> >> #ifdef CONFIG_THP_SWAP >> #endif >> >> are in swapfile.c. But that will be not true in this patchset. > > That's great info for the changelog. Sure. Will add it. Best Regards, Huang, Ying
diff --git a/mm/Kconfig b/mm/Kconfig index ce95491abd6a..cee958bb6002 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -420,10 +420,9 @@ config ARCH_WANTS_THP_SWAP config THP_SWAP def_bool y - depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP + depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP help Swap transparent huge pages in one piece, without splitting. - XXX: For now this only does clustered swap space allocation. For selection by architectures with reasonable THP sizes.