From: Vivek Goyal <vgoyal@redhat.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org,
linux-kernel@vger.kernel.org, virtio-fs@redhat.com,
miklos@szeredi.hu, jack@suse.cz, slp@redhat.com, groug@kaod.org
Subject: Re: [PATCH v4 1/3] dax: Add an enum for specifying dax wakup mode
Date: Mon, 26 Apr 2021 13:52:17 -0400 [thread overview]
Message-ID: <20210426175217.GD1741690@redhat.com> (raw)
In-Reply-To: <20210426134632.GM235567@casper.infradead.org>
On Mon, Apr 26, 2021 at 02:46:32PM +0100, Matthew Wilcox wrote:
> On Fri, Apr 23, 2021 at 09:07:21AM -0400, Vivek Goyal wrote:
> > +enum dax_wake_mode {
> > + WAKE_NEXT,
> > + WAKE_ALL,
> > +};
>
> Why define them in this order when ...
>
> > @@ -196,7 +207,7 @@ static void dax_wake_entry(struct xa_state *xas, void *entry, bool wake_all)
> > * must be in the waitqueue and the following check will see them.
> > */
> > if (waitqueue_active(wq))
> > - __wake_up(wq, TASK_NORMAL, wake_all ? 0 : 1, &key);
> > + __wake_up(wq, TASK_NORMAL, mode == WAKE_ALL ? 0 : 1, &key);
>
> ... they're used like this? This is almost as bad as
>
> enum bool {
> true,
> false,
> };
Hi Matthew,
So you prefer that I should switch order of WAKE_NEXT and WAKE_ALL?
enum dax_wake_mode {
WAKE_ALL,
WAKE_NEXT,
};
And then do following to wake task.
if (waitqueue_active(wq))
__wake_up(wq, TASK_NORMAL, mode, &key);
I am fine with this if you like this better.
Or you are suggesting that don't introduce "enum dax_wake_mode" to
begin with.
Vivek
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: jack@suse.cz, miklos@szeredi.hu, linux-nvdimm@lists.01.org,
linux-kernel@vger.kernel.org, virtio-fs@redhat.com,
linux-fsdevel@vger.kernel.org, dan.j.williams@intel.com
Subject: Re: [Virtio-fs] [PATCH v4 1/3] dax: Add an enum for specifying dax wakup mode
Date: Mon, 26 Apr 2021 13:52:17 -0400 [thread overview]
Message-ID: <20210426175217.GD1741690@redhat.com> (raw)
In-Reply-To: <20210426134632.GM235567@casper.infradead.org>
On Mon, Apr 26, 2021 at 02:46:32PM +0100, Matthew Wilcox wrote:
> On Fri, Apr 23, 2021 at 09:07:21AM -0400, Vivek Goyal wrote:
> > +enum dax_wake_mode {
> > + WAKE_NEXT,
> > + WAKE_ALL,
> > +};
>
> Why define them in this order when ...
>
> > @@ -196,7 +207,7 @@ static void dax_wake_entry(struct xa_state *xas, void *entry, bool wake_all)
> > * must be in the waitqueue and the following check will see them.
> > */
> > if (waitqueue_active(wq))
> > - __wake_up(wq, TASK_NORMAL, wake_all ? 0 : 1, &key);
> > + __wake_up(wq, TASK_NORMAL, mode == WAKE_ALL ? 0 : 1, &key);
>
> ... they're used like this? This is almost as bad as
>
> enum bool {
> true,
> false,
> };
Hi Matthew,
So you prefer that I should switch order of WAKE_NEXT and WAKE_ALL?
enum dax_wake_mode {
WAKE_ALL,
WAKE_NEXT,
};
And then do following to wake task.
if (waitqueue_active(wq))
__wake_up(wq, TASK_NORMAL, mode, &key);
I am fine with this if you like this better.
Or you are suggesting that don't introduce "enum dax_wake_mode" to
begin with.
Vivek
WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org,
dan.j.williams@intel.com, linux-kernel@vger.kernel.org,
virtio-fs@redhat.com, miklos@szeredi.hu, jack@suse.cz,
slp@redhat.com, groug@kaod.org
Subject: Re: [PATCH v4 1/3] dax: Add an enum for specifying dax wakup mode
Date: Mon, 26 Apr 2021 13:52:17 -0400 [thread overview]
Message-ID: <20210426175217.GD1741690@redhat.com> (raw)
In-Reply-To: <20210426134632.GM235567@casper.infradead.org>
On Mon, Apr 26, 2021 at 02:46:32PM +0100, Matthew Wilcox wrote:
> On Fri, Apr 23, 2021 at 09:07:21AM -0400, Vivek Goyal wrote:
> > +enum dax_wake_mode {
> > + WAKE_NEXT,
> > + WAKE_ALL,
> > +};
>
> Why define them in this order when ...
>
> > @@ -196,7 +207,7 @@ static void dax_wake_entry(struct xa_state *xas, void *entry, bool wake_all)
> > * must be in the waitqueue and the following check will see them.
> > */
> > if (waitqueue_active(wq))
> > - __wake_up(wq, TASK_NORMAL, wake_all ? 0 : 1, &key);
> > + __wake_up(wq, TASK_NORMAL, mode == WAKE_ALL ? 0 : 1, &key);
>
> ... they're used like this? This is almost as bad as
>
> enum bool {
> true,
> false,
> };
Hi Matthew,
So you prefer that I should switch order of WAKE_NEXT and WAKE_ALL?
enum dax_wake_mode {
WAKE_ALL,
WAKE_NEXT,
};
And then do following to wake task.
if (waitqueue_active(wq))
__wake_up(wq, TASK_NORMAL, mode, &key);
I am fine with this if you like this better.
Or you are suggesting that don't introduce "enum dax_wake_mode" to
begin with.
Vivek
next prev parent reply other threads:[~2021-04-26 17:52 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 13:07 [PATCH v4 0/3] dax: Fix missed wakeup in put_unlocked_entry() Vivek Goyal
2021-04-23 13:07 ` Vivek Goyal
2021-04-23 13:07 ` [Virtio-fs] " Vivek Goyal
2021-04-23 13:07 ` [PATCH v4 1/3] dax: Add an enum for specifying dax wakup mode Vivek Goyal
2021-04-23 13:07 ` Vivek Goyal
2021-04-23 13:07 ` [Virtio-fs] " Vivek Goyal
2021-04-26 13:46 ` Matthew Wilcox
2021-04-26 13:46 ` Matthew Wilcox
2021-04-26 13:46 ` [Virtio-fs] " Matthew Wilcox
2021-04-26 17:52 ` Vivek Goyal [this message]
2021-04-26 17:52 ` Vivek Goyal
2021-04-26 17:52 ` [Virtio-fs] " Vivek Goyal
2021-04-26 18:02 ` Matthew Wilcox
2021-04-26 18:02 ` Matthew Wilcox
2021-04-26 18:02 ` [Virtio-fs] " Matthew Wilcox
2021-04-26 18:08 ` Vivek Goyal
2021-04-26 18:08 ` Vivek Goyal
2021-04-26 18:08 ` [Virtio-fs] " Vivek Goyal
2021-04-23 13:07 ` [PATCH v4 2/3] dax: Add a wakeup mode parameter to put_unlocked_entry() Vivek Goyal
2021-04-23 13:07 ` Vivek Goyal
2021-04-23 13:07 ` [Virtio-fs] " Vivek Goyal
2021-04-23 13:07 ` [PATCH v4 3/3] dax: Wake up all waiters after invalidating dax entry Vivek Goyal
2021-04-23 13:07 ` Vivek Goyal
2021-04-23 13:07 ` [Virtio-fs] " Vivek Goyal
2021-04-23 20:38 ` [PATCH v4 0/3] dax: Fix missed wakeup in put_unlocked_entry() Dan Williams
2021-04-23 20:38 ` Dan Williams
2021-04-23 20:38 ` [Virtio-fs] " Dan Williams
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=20210426175217.GD1741690@redhat.com \
--to=vgoyal@redhat.com \
--cc=groug@kaod.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=miklos@szeredi.hu \
--cc=slp@redhat.com \
--cc=virtio-fs@redhat.com \
--cc=willy@infradead.org \
/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.