From: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
To: Alexey Lyashkov <alexey.lyashkov@gmail.com>
Cc: linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>,
Andreas Dilger <adilger@dilger.ca>,
Artem Blagodarenko <artem.blagodarenko@gmail.com>,
Andrew Perepechko <anserper@ya.ru>
Subject: Re: [PATCH] jbd2: wake up journal waiters in FIFO order, not LIFO
Date: Thu, 8 Sep 2022 14:43:32 +0530 [thread overview]
Message-ID: <20220908091332.lowhekyxcs23kgtu@riteshh-domain> (raw)
In-Reply-To: <20220908054611.vjcb27wmq4dggqmv@riteshh-domain>
On 22/09/08 11:16AM, Ritesh Harjani (IBM) wrote:
> On 22/09/07 07:59PM, Alexey Lyashkov wrote:
> > From: Andrew Perepechko <anserper@ya.ru>
> >
> > LIFO wakeup order is unfair and sometimes leads to a journal
> > user not being able to get a journal handle for hundreds of
> > transactions in a row.
> >
> > FIFO wakeup can make things more fair.
>
> prepare_to_wait() will always add the task to the head of the list.
> While prepare_to_wait_exclusive() will add the task to the tail since all of the
> exclusive tasks are added to the tail.
> wake_up() function will wake up all non-exclusive and single exclusive task
> v/s
> wake_up_all() function will wake up all tasks irrespective.
>
> So your change does makes the ordering to FIFO, in which the task which came in
> first will be woken up first.
With all other details which got discussed in other threads.
This looks like the right thing to do.
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
next prev parent reply other threads:[~2022-09-08 9:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 16:59 [PATCH] jbd2: wake up journal waiters in FIFO order, not LIFO Alexey Lyashkov
2022-09-08 5:46 ` Ritesh Harjani (IBM)
2022-09-08 5:51 ` Alexey Lyahkov
2022-09-08 6:11 ` Ritesh Harjani (IBM)
2022-09-08 8:21 ` Alexey Lyahkov
2022-09-08 8:28 ` Andrew
2022-09-08 9:11 ` Ritesh Harjani (IBM)
2022-09-08 9:13 ` Ritesh Harjani (IBM) [this message]
2022-09-12 18:01 Alexey Lyashkov
2022-09-30 3:19 ` Theodore Ts'o
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=20220908091332.lowhekyxcs23kgtu@riteshh-domain \
--to=ritesh.list@gmail.com \
--cc=adilger@dilger.ca \
--cc=alexey.lyashkov@gmail.com \
--cc=anserper@ya.ru \
--cc=artem.blagodarenko@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--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.