Re: [PATCH] mm, THP, swap: fix allocating cluster for swapfile by mistake

2020-08-19 Thread Gao Xiang
Hi Ying, On Thu, Aug 20, 2020 at 12:36:08PM +0800, Huang, Ying wrote: > Gao Xiang writes: > > > SWP_FS doesn't mean the device is file-backed swap device, > > which just means each writeback request should go through fs > > by DIO. Or it'll just use extents added by .swap_activate(), > > but it

Re: [PATCH] mm, THP, swap: fix allocating cluster for swapfile by mistake

2020-08-19 Thread Huang, Ying
Gao Xiang writes: > SWP_FS doesn't mean the device is file-backed swap device, > which just means each writeback request should go through fs > by DIO. Or it'll just use extents added by .swap_activate(), > but it also works as file-backed swap device. > > So in order to achieve the goal of the

Re: [PATCH] mm, THP, swap: fix allocating cluster for swapfile by mistake

2020-08-19 Thread Gao Xiang
Hi Yang, On Wed, Aug 19, 2020 at 02:41:08PM -0700, Yang Shi wrote: > On Wed, Aug 19, 2020 at 1:15 PM Gao Xiang wrote: > > > > Hi Andrew, > > > > On Wed, Aug 19, 2020 at 01:05:06PM -0700, Andrew Morton wrote: > > > On Thu, 20 Aug 2020 03:56:13 +0800 Gao Xiang wrote: > > > > > > > SWP_FS doesn't

Re: [PATCH] mm, THP, swap: fix allocating cluster for swapfile by mistake

2020-08-19 Thread Yang Shi
On Wed, Aug 19, 2020 at 1:15 PM Gao Xiang wrote: > > Hi Andrew, > > On Wed, Aug 19, 2020 at 01:05:06PM -0700, Andrew Morton wrote: > > On Thu, 20 Aug 2020 03:56:13 +0800 Gao Xiang wrote: > > > > > SWP_FS doesn't mean the device is file-backed swap device, > > > which just means each writeback

Re: [PATCH] mm, THP, swap: fix allocating cluster for swapfile by mistake

2020-08-19 Thread Gao Xiang
Hi Rafael, On Wed, Aug 19, 2020 at 04:44:05PM -0400, Rafael Aquini wrote: > On Wed, Aug 19, 2020 at 01:05:06PM -0700, Andrew Morton wrote: > > On Thu, 20 Aug 2020 03:56:13 +0800 Gao Xiang wrote: > > > > > SWP_FS doesn't mean the device is file-backed swap device, > > > which just means each

Re: [PATCH] mm, THP, swap: fix allocating cluster for swapfile by mistake

2020-08-19 Thread Rafael Aquini
On Wed, Aug 19, 2020 at 01:05:06PM -0700, Andrew Morton wrote: > On Thu, 20 Aug 2020 03:56:13 +0800 Gao Xiang wrote: > > > SWP_FS doesn't mean the device is file-backed swap device, > > which just means each writeback request should go through fs > > by DIO. Or it'll just use extents added by

Re: [PATCH] mm, THP, swap: fix allocating cluster for swapfile by mistake

2020-08-19 Thread Gao Xiang
Hi Andrew, On Wed, Aug 19, 2020 at 01:05:06PM -0700, Andrew Morton wrote: > On Thu, 20 Aug 2020 03:56:13 +0800 Gao Xiang wrote: > > > SWP_FS doesn't mean the device is file-backed swap device, > > which just means each writeback request should go through fs > > by DIO. Or it'll just use extents

Re: [PATCH] mm, THP, swap: fix allocating cluster for swapfile by mistake

2020-08-19 Thread Andrew Morton
On Thu, 20 Aug 2020 03:56:13 +0800 Gao Xiang wrote: > SWP_FS doesn't mean the device is file-backed swap device, > which just means each writeback request should go through fs > by DIO. Or it'll just use extents added by .swap_activate(), > but it also works as file-backed swap device. This is

[PATCH] mm, THP, swap: fix allocating cluster for swapfile by mistake

2020-08-19 Thread Gao Xiang
SWP_FS doesn't mean the device is file-backed swap device, which just means each writeback request should go through fs by DIO. Or it'll just use extents added by .swap_activate(), but it also works as file-backed swap device. So in order to achieve the goal of the original patch, SWP_BLKDEV