From: Christoph Hellwig <hch@lst.de> To: Jens Axboe <axboe@fb.com> Cc: Christoph Hellwig <hch@lst.de>, hare@suse.de, linux-scsi@vger.kernel.org, linux-nvme@lists.infradead.org Subject: Re: [PATCH, RFC] blk-mq: use a delayed work item for timeouts Date: Mon, 12 Oct 2015 22:22:17 +0200 [thread overview] Message-ID: <20151012202217.GA880@lst.de> (raw) In-Reply-To: <561C1324.3030800@fb.com> On Mon, Oct 12, 2015 at 02:08:04PM -0600, Jens Axboe wrote: >> No that's definitely fine with me, imho most error handling callbacks >> should be in process context for ease of use in the driver. > > Took a closer look. The patch looks incomplete. The hot path for blk-mq is > blk_add_timer(), looks like you left that one alone in the conversion? Oh, damn. I had that part in my initial version that also crudely converted the old request code and dropped a bit too much. That should defintively do the queue_deayed_work. > Might be easier to just leave the timer alone, and if it actually fires > _and_ we have to do something, punt to a workqueue instead of invoking the > timeout handler directly. queue_delayed_work just assigns two additional fields, then sets timer->experies and does an add_timer. So it's the generic implementation of your above scheme. I'd much rather use the generic version if possible instead of trying to recreate it.
WARNING: multiple messages have this Message-ID (diff)
From: hch@lst.de (Christoph Hellwig) Subject: [PATCH, RFC] blk-mq: use a delayed work item for timeouts Date: Mon, 12 Oct 2015 22:22:17 +0200 [thread overview] Message-ID: <20151012202217.GA880@lst.de> (raw) In-Reply-To: <561C1324.3030800@fb.com> On Mon, Oct 12, 2015@02:08:04PM -0600, Jens Axboe wrote: >> No that's definitely fine with me, imho most error handling callbacks >> should be in process context for ease of use in the driver. > > Took a closer look. The patch looks incomplete. The hot path for blk-mq is > blk_add_timer(), looks like you left that one alone in the conversion? Oh, damn. I had that part in my initial version that also crudely converted the old request code and dropped a bit too much. That should defintively do the queue_deayed_work. > Might be easier to just leave the timer alone, and if it actually fires > _and_ we have to do something, punt to a workqueue instead of invoking the > timeout handler directly. queue_delayed_work just assigns two additional fields, then sets timer->experies and does an add_timer. So it's the generic implementation of your above scheme. I'd much rather use the generic version if possible instead of trying to recreate it.
next prev parent reply other threads:[~2015-10-12 20:22 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-10-12 19:29 [PATCH, RFC] blk-mq: use a delayed work item for timeouts Christoph Hellwig 2015-10-12 19:29 ` Christoph Hellwig 2015-10-12 19:34 ` Jens Axboe 2015-10-12 19:34 ` Jens Axboe 2015-10-12 20:08 ` Jens Axboe 2015-10-12 20:08 ` Jens Axboe 2015-10-12 20:22 ` Christoph Hellwig [this message] 2015-10-12 20:22 ` Christoph Hellwig 2015-10-12 20:26 ` Jens Axboe 2015-10-12 20:26 ` 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=20151012202217.GA880@lst.de \ --to=hch@lst.de \ --cc=axboe@fb.com \ --cc=hare@suse.de \ --cc=linux-nvme@lists.infradead.org \ --cc=linux-scsi@vger.kernel.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: linkBe 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.