From: jack@suse.cz (Jan Kara)
Subject: [PATCH 2/4] introduce four macros for in-kernel hints
Date: Thu, 24 Jan 2019 09:35:36 +0100 [thread overview]
Message-ID: <20190124083536.GB12184@quack2.suse.cz> (raw)
In-Reply-To: <B4980620-2CFF-41C1-8EE7-C33F1FE431C0@javigon.com>
On Wed 23-01-19 19:27:12, Javier Gonz?lez wrote:
>
> > On 9 Jan 2019,@16.30, Kanchan Joshi <joshi.k@samsung.com> wrote:
> >
> > Exiting write-hints are exposed to user-mode. There is a possiblity
> > of conflict if kernel happens to use those. This patch introduces four
> > write-hints for exclusive kernel-mode use.
> >
> > Signed-off-by: Kanchan Joshi <joshi.k at samsung.com>
> > ---
> > include/linux/fs.h | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/include/linux/fs.h b/include/linux/fs.h
> > index 811c777..e8548eb 100644
> > --- a/include/linux/fs.h
> > +++ b/include/linux/fs.h
> > @@ -291,6 +291,11 @@ enum rw_hint {
> > WRITE_LIFE_MEDIUM = RWH_WRITE_LIFE_MEDIUM,
> > WRITE_LIFE_LONG = RWH_WRITE_LIFE_LONG,
> > WRITE_LIFE_EXTREME = RWH_WRITE_LIFE_EXTREME,
> > +/* below ones are meant for in-kernel use */
> > + KERN_WRITE_LIFE_SHORT,
> > + KERN_WRITE_LIFE_MEDIUM,
> > + KERN_WRITE_LIFE_LONG,
> > + KERN_WRITE_LIFE_EXTREME
> > };
> >
>
> I think Jens and Dave meant kernel hints to go top down. This would also
> give space for supporting more hints / streams from both ends for user
> and kernel.
Yes, that was the idea however if I understand it right, the write hints do
not really have to be consistent boot-to-boot since they aren't stored
persistently by the disk, are they? If that's the case, it doesn't really
matter which numbers we pick.
One thing I don't quite like is the naming of KERN_WRITE_LIFE_SHORT etc.. It
is upto filesystem to assign meanings to the write hints. So I think it is
enough to provide something like KERN_WRITE_HINT_MIN which is the first
hint available to the kernel and then the number of hints available to the
kernel.
Honza
--
Jan Kara <jack at suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2019-01-24 8:35 UTC|newest]
Thread overview: 20+ 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 ` [PATCH 1/4] block: Increase count of supported write-hints Kanchan Joshi
2019-01-09 15:30 ` [PATCH 2/4] fs: introduce four macros for in-kernel hints Kanchan Joshi
2019-01-23 18:27 ` [PATCH 2/4] " Javier González
2019-01-24 8:35 ` Jan Kara [this message]
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 ` [PATCH 4/4] fs/ext4,jbd2: add support for passing write-hint with journal Kanchan Joshi
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-24 8:29 ` Jan Kara
2019-01-25 14:20 ` Kanchan Joshi
2019-01-25 16:23 ` Keith Busch
2019-01-28 12:47 ` Jan Kara
2019-01-28 23:24 ` Keith Busch
2019-01-29 10:07 ` Jan Kara
2019-01-30 0:13 ` Dave Chinner
2019-01-30 13:54 ` Kanchan Joshi
2019-02-05 11:50 ` Jan Kara
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=20190124083536.GB12184@quack2.suse.cz \
--to=jack@suse.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox