mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Jens Axboe <jaxboe@fusionio.com>
Cc: Tejun Heo <tj@kernel.org>, Dave Jones <davej@redhat.com>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Sasha Levin <levinsasha928@gmail.com>
Subject: Re: [PATCH v3.4-rc5] block: iocontext->nr_tasks should be initialized to one
Date: Tue, 01 May 2012 14:31:07 -0400	[thread overview]
Message-ID: <x49wr4vlpn8.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <4FA028EE.7020208@fusionio.com> (Jens Axboe's message of "Tue, 1 May 2012 20:18:22 +0200")

Jens Axboe <jaxboe@fusionio.com> writes:

> On 2012-05-01 20:09, Tejun Heo wrote:
>> On Tue, May 01, 2012 at 08:02:39PM +0200, Jens Axboe wrote:
>>> On 2012-05-01 18:17, Tejun Heo wrote:
>>>> create_task_io_context() left ioc->nr_tasks at zero; however, a newly
>>>> created ioc should have its nr_tasks initialized to one as it begins
>>>> attached to the task creating it.
>>>>
>>>> This affects only CLONE_IO which currently doesn't seem to have any
>>>> actual user.  Sasha triggered WARN_ON_ONCE() in ioc_task_link() using
>>>> syscall fuzzer.  Even when it happens, the failure mode isn't critical
>>>> (blk-cgroup may allow attaching a CLONE_IO'd task to a cgroup when it
>>>> shouldn't and blkcg limits may behave weirdly).
>>>
>>> CLONE_IO is an exported interface, it can be set from clone(2).
>>> Otherwise Sasha would not have hit this :-)
>> 
>> Yeah, but with pthread not exposing it, I'm very skeptical how much,
>> if any, use it's getting.  With its incompatibility with blk-cgroup
>> and cfq being able to merge coop request streams, I'm not sure how
>> much we need it.  Maybe we can just make it noop?
>
> It's a lot more robust and specific than hoping to get coop merging. For
> cfq, it also implies that multiple threads sharing an io context should
> be accounted as one.
>
> But as to actual users, I really don't know. I agree it's probably not
> that widely used. If google still had that code search, we could get a
> better idea :-)

I know of one project: the venerable dump/restore utility uses CLONE_IO.

Cheers,
Jeff

  reply	other threads:[~2012-05-01 18:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-01 12:05 WARNING: at include/linux/iocontext.h:140 copy_io+0xb9/0x130() Sasha Levin
2012-05-01 16:17 ` [PATCH v3.4-rc5] block: iocontext->nr_tasks should be initialized to one Tejun Heo
2012-05-01 18:02   ` Jens Axboe
2012-05-01 18:09     ` Tejun Heo
2012-05-01 18:18       ` Jens Axboe
2012-05-01 18:31         ` Jeff Moyer [this message]
2012-05-01 18:36           ` Vivek Goyal
2012-05-01 18:48             ` Jeff Moyer
2012-05-01 18:59               ` Vivek Goyal
2012-05-01 19:04                 ` Jeff Moyer
2012-05-01 19:08                   ` Vivek Goyal
2012-05-01 18:37           ` Jens Axboe
2012-05-01 18:50             ` Jeff Moyer
2012-05-01 19:03               ` Jens Axboe
2012-05-01 18:04   ` Jens Axboe
2012-05-01 18:06     ` Tejun Heo

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=x49wr4vlpn8.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=davej@redhat.com \
    --cc=jaxboe@fusionio.com \
    --cc=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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: 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®