Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-21 Thread Minchan Kim
Hi Jens, On Wed, Aug 16, 2017 at 09:56:12AM -0600, Jens Axboe wrote: > On 08/15/2017 10:48 PM, Minchan Kim wrote: > > Hi Jens, > > > > On Mon, Aug 14, 2017 at 10:17:09AM -0600, Jens Axboe wrote: > >> On 08/14/2017 09:38 AM, Jens Axboe wrote: > >>> On 08/14/2017 09:31 AM, Minchan Kim wrote: >

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-21 Thread Minchan Kim
Hi Jens, On Wed, Aug 16, 2017 at 09:56:12AM -0600, Jens Axboe wrote: > On 08/15/2017 10:48 PM, Minchan Kim wrote: > > Hi Jens, > > > > On Mon, Aug 14, 2017 at 10:17:09AM -0600, Jens Axboe wrote: > >> On 08/14/2017 09:38 AM, Jens Axboe wrote: > >>> On 08/14/2017 09:31 AM, Minchan Kim wrote: >

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-16 Thread Jens Axboe
On 08/15/2017 10:48 PM, Minchan Kim wrote: > Hi Jens, > > On Mon, Aug 14, 2017 at 10:17:09AM -0600, Jens Axboe wrote: >> On 08/14/2017 09:38 AM, Jens Axboe wrote: >>> On 08/14/2017 09:31 AM, Minchan Kim wrote: > Secondly, generally you don't have slow devices and fast devices >

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-16 Thread Jens Axboe
On 08/15/2017 10:48 PM, Minchan Kim wrote: > Hi Jens, > > On Mon, Aug 14, 2017 at 10:17:09AM -0600, Jens Axboe wrote: >> On 08/14/2017 09:38 AM, Jens Axboe wrote: >>> On 08/14/2017 09:31 AM, Minchan Kim wrote: > Secondly, generally you don't have slow devices and fast devices >

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-15 Thread Minchan Kim
Hi Jens, On Mon, Aug 14, 2017 at 10:17:09AM -0600, Jens Axboe wrote: > On 08/14/2017 09:38 AM, Jens Axboe wrote: > > On 08/14/2017 09:31 AM, Minchan Kim wrote: > >>> Secondly, generally you don't have slow devices and fast devices > >>> intermingled when running workloads. That's the rare case. >

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-15 Thread Minchan Kim
Hi Jens, On Mon, Aug 14, 2017 at 10:17:09AM -0600, Jens Axboe wrote: > On 08/14/2017 09:38 AM, Jens Axboe wrote: > > On 08/14/2017 09:31 AM, Minchan Kim wrote: > >>> Secondly, generally you don't have slow devices and fast devices > >>> intermingled when running workloads. That's the rare case. >

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Jens Axboe
On 08/14/2017 09:38 AM, Jens Axboe wrote: > On 08/14/2017 09:31 AM, Minchan Kim wrote: >>> Secondly, generally you don't have slow devices and fast devices >>> intermingled when running workloads. That's the rare case. >> >> Not true. zRam is really popular swap for embedded devices where >> one

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Jens Axboe
On 08/14/2017 09:38 AM, Jens Axboe wrote: > On 08/14/2017 09:31 AM, Minchan Kim wrote: >>> Secondly, generally you don't have slow devices and fast devices >>> intermingled when running workloads. That's the rare case. >> >> Not true. zRam is really popular swap for embedded devices where >> one

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Jens Axboe
On 08/14/2017 09:31 AM, Minchan Kim wrote: >> Secondly, generally you don't have slow devices and fast devices >> intermingled when running workloads. That's the rare case. > > Not true. zRam is really popular swap for embedded devices where > one of low cost product has a really poor slow nand

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Jens Axboe
On 08/14/2017 09:31 AM, Minchan Kim wrote: >> Secondly, generally you don't have slow devices and fast devices >> intermingled when running workloads. That's the rare case. > > Not true. zRam is really popular swap for embedded devices where > one of low cost product has a really poor slow nand

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Minchan Kim
On Mon, Aug 14, 2017 at 09:14:03AM -0600, Jens Axboe wrote: > On 08/14/2017 09:06 AM, Minchan Kim wrote: > > On Mon, Aug 14, 2017 at 08:36:00AM -0600, Jens Axboe wrote: > >> On 08/14/2017 02:50 AM, Minchan Kim wrote: > >>> Hi Jens, > >>> > >>> On Fri, Aug 11, 2017 at 08:26:59AM -0600, Jens Axboe

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Minchan Kim
On Mon, Aug 14, 2017 at 09:14:03AM -0600, Jens Axboe wrote: > On 08/14/2017 09:06 AM, Minchan Kim wrote: > > On Mon, Aug 14, 2017 at 08:36:00AM -0600, Jens Axboe wrote: > >> On 08/14/2017 02:50 AM, Minchan Kim wrote: > >>> Hi Jens, > >>> > >>> On Fri, Aug 11, 2017 at 08:26:59AM -0600, Jens Axboe

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Jens Axboe
On 08/14/2017 09:06 AM, Minchan Kim wrote: > On Mon, Aug 14, 2017 at 08:36:00AM -0600, Jens Axboe wrote: >> On 08/14/2017 02:50 AM, Minchan Kim wrote: >>> Hi Jens, >>> >>> On Fri, Aug 11, 2017 at 08:26:59AM -0600, Jens Axboe wrote: On 08/11/2017 04:46 AM, Christoph Hellwig wrote: > On

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Jens Axboe
On 08/14/2017 09:06 AM, Minchan Kim wrote: > On Mon, Aug 14, 2017 at 08:36:00AM -0600, Jens Axboe wrote: >> On 08/14/2017 02:50 AM, Minchan Kim wrote: >>> Hi Jens, >>> >>> On Fri, Aug 11, 2017 at 08:26:59AM -0600, Jens Axboe wrote: On 08/11/2017 04:46 AM, Christoph Hellwig wrote: > On

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Minchan Kim
On Mon, Aug 14, 2017 at 08:36:00AM -0600, Jens Axboe wrote: > On 08/14/2017 02:50 AM, Minchan Kim wrote: > > Hi Jens, > > > > On Fri, Aug 11, 2017 at 08:26:59AM -0600, Jens Axboe wrote: > >> On 08/11/2017 04:46 AM, Christoph Hellwig wrote: > >>> On Wed, Aug 09, 2017 at 08:06:24PM -0700, Dan

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Minchan Kim
On Mon, Aug 14, 2017 at 08:36:00AM -0600, Jens Axboe wrote: > On 08/14/2017 02:50 AM, Minchan Kim wrote: > > Hi Jens, > > > > On Fri, Aug 11, 2017 at 08:26:59AM -0600, Jens Axboe wrote: > >> On 08/11/2017 04:46 AM, Christoph Hellwig wrote: > >>> On Wed, Aug 09, 2017 at 08:06:24PM -0700, Dan

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Jens Axboe
On 08/14/2017 02:50 AM, Minchan Kim wrote: > Hi Jens, > > On Fri, Aug 11, 2017 at 08:26:59AM -0600, Jens Axboe wrote: >> On 08/11/2017 04:46 AM, Christoph Hellwig wrote: >>> On Wed, Aug 09, 2017 at 08:06:24PM -0700, Dan Williams wrote: I like it, but do you think we should switch to sbvec[]

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Jens Axboe
On 08/14/2017 02:50 AM, Minchan Kim wrote: > Hi Jens, > > On Fri, Aug 11, 2017 at 08:26:59AM -0600, Jens Axboe wrote: >> On 08/11/2017 04:46 AM, Christoph Hellwig wrote: >>> On Wed, Aug 09, 2017 at 08:06:24PM -0700, Dan Williams wrote: I like it, but do you think we should switch to sbvec[]

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Minchan Kim
Hi Jens, On Fri, Aug 11, 2017 at 08:26:59AM -0600, Jens Axboe wrote: > On 08/11/2017 04:46 AM, Christoph Hellwig wrote: > > On Wed, Aug 09, 2017 at 08:06:24PM -0700, Dan Williams wrote: > >> I like it, but do you think we should switch to sbvec[] to > >> preclude pathological cases where nr_pages

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Minchan Kim
Hi Jens, On Fri, Aug 11, 2017 at 08:26:59AM -0600, Jens Axboe wrote: > On 08/11/2017 04:46 AM, Christoph Hellwig wrote: > > On Wed, Aug 09, 2017 at 08:06:24PM -0700, Dan Williams wrote: > >> I like it, but do you think we should switch to sbvec[] to > >> preclude pathological cases where nr_pages

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Minchan Kim
Hi Christoph, On Fri, Aug 11, 2017 at 12:46:15PM +0200, Christoph Hellwig wrote: > On Wed, Aug 09, 2017 at 08:06:24PM -0700, Dan Williams wrote: > > I like it, but do you think we should switch to sbvec[] to > > preclude pathological cases where nr_pages is large? > > Yes, please. Still, I

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-14 Thread Minchan Kim
Hi Christoph, On Fri, Aug 11, 2017 at 12:46:15PM +0200, Christoph Hellwig wrote: > On Wed, Aug 09, 2017 at 08:06:24PM -0700, Dan Williams wrote: > > I like it, but do you think we should switch to sbvec[] to > > preclude pathological cases where nr_pages is large? > > Yes, please. Still, I

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-11 Thread Jens Axboe
On 08/11/2017 04:46 AM, Christoph Hellwig wrote: > On Wed, Aug 09, 2017 at 08:06:24PM -0700, Dan Williams wrote: >> I like it, but do you think we should switch to sbvec[] to >> preclude pathological cases where nr_pages is large? > > Yes, please. > > Then I'd like to see that the on-stack bio

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-11 Thread Jens Axboe
On 08/11/2017 04:46 AM, Christoph Hellwig wrote: > On Wed, Aug 09, 2017 at 08:06:24PM -0700, Dan Williams wrote: >> I like it, but do you think we should switch to sbvec[] to >> preclude pathological cases where nr_pages is large? > > Yes, please. > > Then I'd like to see that the on-stack bio

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-11 Thread Christoph Hellwig
On Wed, Aug 09, 2017 at 08:06:24PM -0700, Dan Williams wrote: > I like it, but do you think we should switch to sbvec[] to > preclude pathological cases where nr_pages is large? Yes, please. Then I'd like to see that the on-stack bio even matters for mpage_readpage / mpage_writepage. Compared

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-11 Thread Christoph Hellwig
On Wed, Aug 09, 2017 at 08:06:24PM -0700, Dan Williams wrote: > I like it, but do you think we should switch to sbvec[] to > preclude pathological cases where nr_pages is large? Yes, please. Then I'd like to see that the on-stack bio even matters for mpage_readpage / mpage_writepage. Compared

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-09 Thread Minchan Kim
On Wed, Aug 09, 2017 at 08:04:33PM -0700, Matthew Wilcox wrote: > On Wed, Aug 09, 2017 at 11:41:50AM +0900, Minchan Kim wrote: > > On Tue, Aug 08, 2017 at 07:31:22PM -0700, Matthew Wilcox wrote: > > > On Wed, Aug 09, 2017 at 10:51:13AM +0900, Minchan Kim wrote: > > > > On Tue, Aug 08, 2017 at

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-09 Thread Minchan Kim
On Wed, Aug 09, 2017 at 08:04:33PM -0700, Matthew Wilcox wrote: > On Wed, Aug 09, 2017 at 11:41:50AM +0900, Minchan Kim wrote: > > On Tue, Aug 08, 2017 at 07:31:22PM -0700, Matthew Wilcox wrote: > > > On Wed, Aug 09, 2017 at 10:51:13AM +0900, Minchan Kim wrote: > > > > On Tue, Aug 08, 2017 at

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-09 Thread Dan Williams
On Wed, Aug 9, 2017 at 8:04 PM, Matthew Wilcox wrote: > On Wed, Aug 09, 2017 at 11:41:50AM +0900, Minchan Kim wrote: >> On Tue, Aug 08, 2017 at 07:31:22PM -0700, Matthew Wilcox wrote: >> > On Wed, Aug 09, 2017 at 10:51:13AM +0900, Minchan Kim wrote: >> > > On Tue, Aug 08,

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-09 Thread Dan Williams
On Wed, Aug 9, 2017 at 8:04 PM, Matthew Wilcox wrote: > On Wed, Aug 09, 2017 at 11:41:50AM +0900, Minchan Kim wrote: >> On Tue, Aug 08, 2017 at 07:31:22PM -0700, Matthew Wilcox wrote: >> > On Wed, Aug 09, 2017 at 10:51:13AM +0900, Minchan Kim wrote: >> > > On Tue, Aug 08, 2017 at 06:29:04AM

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-09 Thread Matthew Wilcox
On Wed, Aug 09, 2017 at 11:41:50AM +0900, Minchan Kim wrote: > On Tue, Aug 08, 2017 at 07:31:22PM -0700, Matthew Wilcox wrote: > > On Wed, Aug 09, 2017 at 10:51:13AM +0900, Minchan Kim wrote: > > > On Tue, Aug 08, 2017 at 06:29:04AM -0700, Matthew Wilcox wrote: > > > > On Tue, Aug 08, 2017 at

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-09 Thread Matthew Wilcox
On Wed, Aug 09, 2017 at 11:41:50AM +0900, Minchan Kim wrote: > On Tue, Aug 08, 2017 at 07:31:22PM -0700, Matthew Wilcox wrote: > > On Wed, Aug 09, 2017 at 10:51:13AM +0900, Minchan Kim wrote: > > > On Tue, Aug 08, 2017 at 06:29:04AM -0700, Matthew Wilcox wrote: > > > > On Tue, Aug 08, 2017 at

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Matthew Wilcox
On Wed, Aug 09, 2017 at 10:51:13AM +0900, Minchan Kim wrote: > On Tue, Aug 08, 2017 at 06:29:04AM -0700, Matthew Wilcox wrote: > > On Tue, Aug 08, 2017 at 05:49:59AM -0700, Matthew Wilcox wrote: > > > + struct bio sbio; > > > + struct bio_vec sbvec; > > > > ... this needs to be sbvec[nr_pages],

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Matthew Wilcox
On Wed, Aug 09, 2017 at 10:51:13AM +0900, Minchan Kim wrote: > On Tue, Aug 08, 2017 at 06:29:04AM -0700, Matthew Wilcox wrote: > > On Tue, Aug 08, 2017 at 05:49:59AM -0700, Matthew Wilcox wrote: > > > + struct bio sbio; > > > + struct bio_vec sbvec; > > > > ... this needs to be sbvec[nr_pages],

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Minchan Kim
On Tue, Aug 08, 2017 at 07:31:22PM -0700, Matthew Wilcox wrote: > On Wed, Aug 09, 2017 at 10:51:13AM +0900, Minchan Kim wrote: > > On Tue, Aug 08, 2017 at 06:29:04AM -0700, Matthew Wilcox wrote: > > > On Tue, Aug 08, 2017 at 05:49:59AM -0700, Matthew Wilcox wrote: > > > > + struct bio sbio;

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Minchan Kim
On Tue, Aug 08, 2017 at 07:31:22PM -0700, Matthew Wilcox wrote: > On Wed, Aug 09, 2017 at 10:51:13AM +0900, Minchan Kim wrote: > > On Tue, Aug 08, 2017 at 06:29:04AM -0700, Matthew Wilcox wrote: > > > On Tue, Aug 08, 2017 at 05:49:59AM -0700, Matthew Wilcox wrote: > > > > + struct bio sbio;

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Minchan Kim
On Tue, Aug 08, 2017 at 06:29:04AM -0700, Matthew Wilcox wrote: > On Tue, Aug 08, 2017 at 05:49:59AM -0700, Matthew Wilcox wrote: > > + struct bio sbio; > > + struct bio_vec sbvec; > > ... this needs to be sbvec[nr_pages], of course. > > > - bio = mpage_alloc(bdev, blocks[0] <<

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Minchan Kim
On Tue, Aug 08, 2017 at 06:29:04AM -0700, Matthew Wilcox wrote: > On Tue, Aug 08, 2017 at 05:49:59AM -0700, Matthew Wilcox wrote: > > + struct bio sbio; > > + struct bio_vec sbvec; > > ... this needs to be sbvec[nr_pages], of course. > > > - bio = mpage_alloc(bdev, blocks[0] <<

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Minchan Kim
Hi Matthew, On Tue, Aug 08, 2017 at 05:49:59AM -0700, Matthew Wilcox wrote: > On Tue, Aug 08, 2017 at 03:50:20PM +0900, Minchan Kim wrote: > > There is no need to use dynamic bio allocation for BDI_CAP_SYNC > > devices. They can with on-stack-bio without concern about waiting > > bio allocation

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Minchan Kim
Hi Matthew, On Tue, Aug 08, 2017 at 05:49:59AM -0700, Matthew Wilcox wrote: > On Tue, Aug 08, 2017 at 03:50:20PM +0900, Minchan Kim wrote: > > There is no need to use dynamic bio allocation for BDI_CAP_SYNC > > devices. They can with on-stack-bio without concern about waiting > > bio allocation

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Matthew Wilcox
On Tue, Aug 08, 2017 at 05:49:59AM -0700, Matthew Wilcox wrote: > + struct bio sbio; > + struct bio_vec sbvec; ... this needs to be sbvec[nr_pages], of course. > - bio = mpage_alloc(bdev, blocks[0] << (blkbits - 9), > + if

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Matthew Wilcox
On Tue, Aug 08, 2017 at 05:49:59AM -0700, Matthew Wilcox wrote: > + struct bio sbio; > + struct bio_vec sbvec; ... this needs to be sbvec[nr_pages], of course. > - bio = mpage_alloc(bdev, blocks[0] << (blkbits - 9), > + if

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Matthew Wilcox
On Tue, Aug 08, 2017 at 03:50:20PM +0900, Minchan Kim wrote: > There is no need to use dynamic bio allocation for BDI_CAP_SYNC > devices. They can with on-stack-bio without concern about waiting > bio allocation from mempool under heavy memory pressure. This seems ... more complex than necessary?

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Matthew Wilcox
On Tue, Aug 08, 2017 at 03:50:20PM +0900, Minchan Kim wrote: > There is no need to use dynamic bio allocation for BDI_CAP_SYNC > devices. They can with on-stack-bio without concern about waiting > bio allocation from mempool under heavy memory pressure. This seems ... more complex than necessary?

[PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Minchan Kim
There is no need to use dynamic bio allocation for BDI_CAP_SYNC devices. They can with on-stack-bio without concern about waiting bio allocation from mempool under heavy memory pressure. Signed-off-by: Minchan Kim --- fs/mpage.c | 43

[PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Minchan Kim
There is no need to use dynamic bio allocation for BDI_CAP_SYNC devices. They can with on-stack-bio without concern about waiting bio allocation from mempool under heavy memory pressure. Signed-off-by: Minchan Kim --- fs/mpage.c | 43 +++ 1 file changed,