From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaegeuk Kim Subject: Re: [PATCH] f2fs: avoid issuing small bios due to several dirty node pages Date: Fri, 18 Jan 2013 18:28:41 +0900 Message-ID: <1358501321.8234.127.camel@kjgkr> References: <1358490548-32675-1-git-send-email-jaegeuk.kim@samsung.com> <1358497552.8234.113.camel@kjgkr> Reply-To: jaegeuk.kim@samsung.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-W3BF8rM72DjjwbIzLnFg" Cc: linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net To: Namjae Jeon Return-path: Received: from mailout3.samsung.com ([203.254.224.33]:43119 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750759Ab3ARJ2r (ORCPT ); Fri, 18 Jan 2013 04:28:47 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MGT00JAUEBX9B70@mailout3.samsung.com> for linux-fsdevel@vger.kernel.org; Fri, 18 Jan 2013 18:28:45 +0900 (KST) Received: from [12.52.126.105] by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MGT00DBAEBXAJ60@mmp2.samsung.com> for linux-fsdevel@vger.kernel.org; Fri, 18 Jan 2013 18:28:45 +0900 (KST) In-reply-to: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: --=-W3BF8rM72DjjwbIzLnFg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2013-01-18 (=EA=B8=88), 17:57 +0900, Namjae Jeon: > 2013/1/18, Jaegeuk Kim : > > 2013-01-18 (=EA=B8=88), 16:58 +0900, Namjae Jeon: > >> 2013/1/18, Jaegeuk Kim : > >> > If some small bios of dirty node pages are supposed to be issued dur= ing > >> > the > >> > sequential data writes, there-in well-produced consecutive data bios > >> > are > >> > able > >> > to be split by the small node bios, resulting in performance > >> > degradation. > >> > So, let's collect a number of dirty node pages until reaching a > >> > threshold. > >> > And, by default, I set the threshold as 2MB, a segment size. > >> > > >> > This improves sequential write performance on i5, 512GB SSD (830 w/ > >> > SATA2) > >> > as > >> > follows. > >> > Before: 231 MB/s -> After: 255 MB/s > >> > > >> > Signed-off-by: Jaegeuk Kim > >> > --- > >> > fs/f2fs/node.c | 17 +++++++++++------ > >> > 1 file changed, 11 insertions(+), 6 deletions(-) > >> > > >> > diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c > >> > index f177c01..9bda63c 100644 > >> > --- a/fs/f2fs/node.c > >> > +++ b/fs/f2fs/node.c > >> > @@ -1124,6 +1124,12 @@ static int f2fs_write_node_page(struct page > >> > *page, > >> > return 0; > >> > } > >> > > >> > +/* > >> > + * It is very important to gather dirty pages and write at once, so > >> > that we > >> > can > >> > + * submit a big bio without interfering other data writes. > >> > + * Be default, 512 pages (2MB), a segment size, is quite reasonable= . > >> > + */ > >> > +#define COLLECT_DIRTY_NODES 512 > >> Hi Jaeguek. > >> It is just my opinion. > >> One of f2fs advantages is that user can set segment size to fit own > >> device. > >> For future, Is it not good to use segment size set by user(from > >> superblock) instead of fixed size ? > > > > At this moment, it's very hard to change the segment size due to many > > hardcoded data structures such as SSA, bitmaps, etc. > > Instead, I proposed something like section and zone which are based on > > segment. > > But, somebody will be able to do later. :) > Reviewed-by: Namjae Jeon > Okay, I think It is better if you add TODO comment about this to be > fixed by the other. >=20 > Talk Incidentally, let me ask you other thing. > get_meta_page never return NULL about allocate page and readpage. > Is there any reason it try to infinitely retry about two case ? That is just to handle errors more easily especially for file system metadata operations. Definitely, we need to consider all the error handling codes in more detail by using the fault-injection facility later. Thanks, --=20 Jaegeuk Kim Samsung --=-W3BF8rM72DjjwbIzLnFg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJQ+RXJAAoJEEAUqH6CSFDSIkIP/3r+9Cce34HOhimJa0Hz9CRf oJU/oKn/doMjrX8Y9o1ooyo9d4fEWCkwN+GLc/+nHGd71zsyaV5+/I4Y147rHvbl MR+UAbY9IHL6pItQY8L2kH+UVFGb/+RiN8+Dwr+5wNTGe7620AswMAYQGoPtuCoT 4h4OzS60suXnuLH2xmL1oyGMJMMQCUHijDK18wzRG26VnH4o12Hut5XMCZqnbjbp vZhPJ+XRkPxnX5sueN1qLBeQKsPxG77A2FchxGCsuUpnSqSTz27GhTtbWHJZpcX3 7vf39z5g6ISJPi1KcnJ8oQjFRmkK7SjFoHFDhTHXpiYnsBauqBb83Dd9kkVn1Xf/ RFDHLjYmmSUuVjrX2PUCPRNQOE0jPqvSJffa23sxnhrgYdvOedcFPlwImdz9GWZj HOMUN1E9LaYrwhx01ILkqHJiYx1481MDM9mmh+zHqSLwMwBF+oXCC3PAAuxrUk2L 3OBxehX4BbHMpBHcj2S55xjPa6wtcEtGl4+dihAyxuA3zqSF0ikdUCIm35y+21Fd A2+cSO8x+0bJPFedOPv6xcgG2BoM9DH+UvGvCGJko0rZ8yfy5xElFo8G0dL7+0gF P/hrAjgcjnYq4SxjCLEyV+D2FrJZ8MmD4MPJI1TpG4J98Nt5HHngpkp3gKNiZXI7 SmNFzvj5qKWIr3QpQNIc =UiW5 -----END PGP SIGNATURE----- --=-W3BF8rM72DjjwbIzLnFg--