From: Pavel Begunkov <asml.silence@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>, Ingo Molnar <mingo@redhat.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] sched/wait: Add wait_threshold
Date: Tue, 24 Sep 2019 09:44:22 +0300 [thread overview]
Message-ID: <8c83b046-5c8a-7303-5541-180c094c875e@gmail.com> (raw)
In-Reply-To: <20190923192742.GH2369@hirez.programming.kicks-ass.net>
[-- Attachment #1.1: Type: text/plain, Size: 1889 bytes --]
On 23/09/2019 22:27, Peter Zijlstra wrote:
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> On Mon, Sep 23, 2019 at 07:37:46PM +0300, Pavel Begunkov wrote:
>> Just in case duplicating a mail from the cover-letter thread:
>
> Just because every patch should have a self contained and coherent
> Changelog.
Well, I will expand the patch description, if we agree on the
implementation (at least conceptually).
>>
>> BTW, this monster is mostly a copy-paste from wait_event_*(),
>> wait_bit_*(). We could try to extract some common parts from these
>> three, but that's another topic.
>
> I don't think that is another topic at all. It is a quality of
> implementation issue. We already have too many copies of all that (3).
For example, ___wait_event() is copied in ___wait_var_event(). Instead
it could accept a wait entry generator or just accept entry from above
and be reused in both cases. I've had such a patch, but want to think
what else could be done.
e.g.
```
#define generic_wait_event(ENTRY_GEN, ...)
ENTRY_GEN(wq_entry_name);
do_wait_event(wq_entry_name);
#define WBQ_ENTRY_GEN(name)
struct wait_bit_queue_entry tmp = WBQ_INITIALIZER;
struct wait_queue_entry name = &tmp->wq_entry;
```
>
> So basically you want to fudge the wake function to do the/a @cond test,
> not unlike what wait_bit already does, but differenly.
>
Yes
> I'm really rather annoyed with C for not having proper lambda functions;
> that would make all this so much easier. Anyway, let me have a poke at
> this in the morning, it's late already.
>
> Also, is anything actually using wait_queue_entry::private ? I'm
> not finding any in a hurry.
>
>
--
Yours sincerely,
Pavel Begunkov
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-09-24 6:44 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-22 8:08 [PATCH v2 0/2] Optimise io_uring completion waiting Pavel Begunkov (Silence)
2019-09-22 8:08 ` [PATCH v2 1/2] sched/wait: Add wait_threshold Pavel Begunkov (Silence)
2019-09-23 7:19 ` Peter Zijlstra
2019-09-23 16:37 ` Pavel Begunkov
2019-09-23 19:27 ` Peter Zijlstra
2019-09-23 20:23 ` Peter Zijlstra
2019-09-24 6:44 ` Pavel Begunkov [this message]
2019-09-22 8:08 ` [PATCH v2 2/2] io_uring: Optimise cq waiting with wait_threshold Pavel Begunkov (Silence)
2019-09-22 15:51 ` [PATCH v2 0/2] Optimise io_uring completion waiting Jens Axboe
2019-09-23 8:35 ` Ingo Molnar
2019-09-23 16:21 ` Pavel Begunkov
2019-09-23 16:32 ` Pavel Begunkov
2019-09-23 20:48 ` Jens Axboe
2019-09-23 23:00 ` Jens Axboe
2019-09-24 7:06 ` Pavel Begunkov
2019-09-24 8:02 ` Jens Axboe
2019-09-24 8:27 ` Jens Axboe
2019-09-24 8:36 ` Jens Axboe
2019-09-24 9:33 ` Pavel Begunkov
2019-09-24 10:11 ` Jens Axboe
2019-09-24 9:49 ` Peter Zijlstra
2019-09-24 10:13 ` Jens Axboe
2019-09-24 10:34 ` Jens Axboe
2019-09-24 11:11 ` Pavel Begunkov
2019-09-24 11:15 ` Jens Axboe
2019-09-24 11:23 ` Pavel Begunkov
2019-09-24 13:13 ` Jens Axboe
2019-09-24 17:33 ` Pavel Begunkov
2019-09-24 17:46 ` Jens Axboe
2019-09-24 18:28 ` Pavel Begunkov
2019-09-24 19:32 ` Jens Axboe
2019-09-24 11:43 ` Peter Zijlstra
2019-09-24 12:57 ` Jens Axboe
2019-09-24 11:33 ` Peter Zijlstra
2019-09-24 9:20 ` Pavel Begunkov
2019-09-24 10:09 ` Jens Axboe
2019-09-24 9:21 ` Pavel Begunkov
2019-09-24 10:09 ` Jens Axboe
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=8c83b046-5c8a-7303-5541-180c094c875e@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®