All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Kanchan Joshi <joshi.k@samsung.com>
Cc: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org,
	linux-ext4@vger.kernel.org, linux-nvme@lists.infradead.org,
	jack@suse.com, david@fromorbit.com, tytso@mit.edu,
	prakash.v@samsung.com
Subject: Re: [PATCH 4/4] fs/ext4,jbd2: add support for passing write-hint with journal.
Date: Thu, 24 Jan 2019 09:50:35 +0100	[thread overview]
Message-ID: <20190124085035.GC12184@quack2.suse.cz> (raw)
In-Reply-To: <1547047861-7271-5-git-send-email-joshi.k@samsung.com>

On Wed 09-01-19 21:01:01, Kanchan Joshi wrote:
> For NAND based SSDs, mixing of data with different life-time reduces
> efficiency of internal garbage-collection. During FS operations, series
> of journal updates will follow/precede series of data/meta updates, causing
> intermixing inside SSD. By passing a write-hint with journal, its write
> can be isolated from other data/meta writes, leading to endurance/performance
> benefit on SSD.
> 
> This patch introduces "j_writehint" member in JBD2 journal, using which
> Ext4 specifies write-hint (as SHORT) for journal.
> 
> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>

Thanks for the patch. It looks mostly good, just one nit below.

> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index d6c142d..3af4049 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -4289,6 +4289,8 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>  
>  	set_task_ioprio(sbi->s_journal->j_task, journal_ioprio);
>  
> +	sbi->s_journal->j_writehint = KERN_WRITE_LIFE_SHORT;
> +
>  	sbi->s_journal->j_commit_callback = ext4_journal_commit_callback;

So I'd rather have defines like:

#define EXT4_WRITE_HINT_JOURNAL KERN_WRITE_HINT_MIN

like I suggested in another email and then later we could add stuff like

#define EXT4_WRITE_HINT_BITMAP	(KERN_WRITE_HINT_MIN + 1)

etc.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

WARNING: multiple messages have this Message-ID (diff)
From: jack@suse.cz (Jan Kara)
Subject: [PATCH 4/4] fs/ext4,jbd2: add support for passing write-hint with journal.
Date: Thu, 24 Jan 2019 09:50:35 +0100	[thread overview]
Message-ID: <20190124085035.GC12184@quack2.suse.cz> (raw)
In-Reply-To: <1547047861-7271-5-git-send-email-joshi.k@samsung.com>

On Wed 09-01-19 21:01:01, Kanchan Joshi wrote:
> For NAND based SSDs, mixing of data with different life-time reduces
> efficiency of internal garbage-collection. During FS operations, series
> of journal updates will follow/precede series of data/meta updates, causing
> intermixing inside SSD. By passing a write-hint with journal, its write
> can be isolated from other data/meta writes, leading to endurance/performance
> benefit on SSD.
> 
> This patch introduces "j_writehint" member in JBD2 journal, using which
> Ext4 specifies write-hint (as SHORT) for journal.
> 
> Signed-off-by: Kanchan Joshi <joshi.k at samsung.com>

Thanks for the patch. It looks mostly good, just one nit below.

> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index d6c142d..3af4049 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -4289,6 +4289,8 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>  
>  	set_task_ioprio(sbi->s_journal->j_task, journal_ioprio);
>  
> +	sbi->s_journal->j_writehint = KERN_WRITE_LIFE_SHORT;
> +
>  	sbi->s_journal->j_commit_callback = ext4_journal_commit_callback;

So I'd rather have defines like:

#define EXT4_WRITE_HINT_JOURNAL KERN_WRITE_HINT_MIN

like I suggested in another email and then later we could add stuff like

#define EXT4_WRITE_HINT_BITMAP	(KERN_WRITE_HINT_MIN + 1)

etc.

								Honza
-- 
Jan Kara <jack at suse.com>
SUSE Labs, CR

  reply	other threads:[~2019-01-24  8:50 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190109153328epcas2p4643cbdc7a2182b47893a2bcaa0778e17@epcas2p4.samsung.com>
2019-01-09 15:30 ` [PATCH v2 0/4] Write-hint for FS journal Kanchan Joshi
2019-01-09 15:30   ` Kanchan Joshi
2019-01-09 15:30   ` [PATCH 1/4] block: Increase count of supported write-hints Kanchan Joshi
2019-01-09 15:30     ` Kanchan Joshi
2019-01-09 15:30   ` [PATCH 2/4] fs: introduce four macros for in-kernel hints Kanchan Joshi
2019-01-09 15:30     ` Kanchan Joshi
2019-01-23 18:27     ` [PATCH 2/4] " Javier González
2019-01-23 18:27       ` Javier González
2019-01-24  8:35       ` Jan Kara
2019-01-24  8:35         ` Jan Kara
2019-01-24  9:23         ` Javier González
2019-01-24  9:23           ` Javier González
2019-01-09 15:31   ` [PATCH 3/4] fs: introduce APIs to enable sending write-hint with buffer-head Kanchan Joshi
2019-01-09 15:31     ` Kanchan Joshi
2019-01-09 15:31   ` [PATCH 4/4] fs/ext4,jbd2: add support for passing write-hint with journal Kanchan Joshi
2019-01-09 15:31     ` Kanchan Joshi
2019-01-24  8:50     ` Jan Kara [this message]
2019-01-24  8:50       ` Jan Kara
2019-01-23 18:35   ` [PATCH v2 0/4] Write-hint for FS journal Javier González
2019-01-23 18:35     ` Javier González
2019-01-24  8:29   ` Jan Kara
2019-01-24  8:29     ` Jan Kara
2019-01-25 14:20     ` Kanchan Joshi
2019-01-25 14:20       ` Kanchan Joshi
2019-01-25 16:23   ` Keith Busch
2019-01-25 16:23     ` Keith Busch
2019-01-28 12:47     ` Jan Kara
2019-01-28 12:47       ` Jan Kara
2019-01-28 23:24       ` Keith Busch
2019-01-28 23:24         ` Keith Busch
2019-01-29 10:07         ` Jan Kara
2019-01-29 10:07           ` Jan Kara
2019-01-30  0:13           ` Dave Chinner
2019-01-30  0:13             ` Dave Chinner
2019-01-30 13:54             ` Kanchan Joshi
2019-01-30 13:54               ` Kanchan Joshi
2019-02-05 11:50               ` Jan Kara
2019-02-05 11:50                 ` Jan Kara
2019-02-05 22:53                 ` Dave Chinner
2019-02-05 22:53                   ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190124085035.GC12184@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=david@fromorbit.com \
    --cc=jack@suse.com \
    --cc=joshi.k@samsung.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=prakash.v@samsung.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.