linux-um archives
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Richard Weinberger <richard@nod.at>
Cc: linux-um@lists.infradead.org,
	Anton Ivanov <anton.ivanov@kot-begemot.co.uk>,
	hch@lst.de
Subject: Re: Summary so far - ubd breakage in 4.20-rc1
Date: Wed, 7 Nov 2018 14:16:20 -0700	[thread overview]
Message-ID: <fe020526-ac24-0279-ca27-7ccabba7a6cc@kernel.dk> (raw)
In-Reply-To: <2067083.opUWeOxqyK@blindfold>

On 11/7/18 2:15 PM, Richard Weinberger wrote:
> Jens,
> 
> Am Mittwoch, 7. November 2018, 20:19:42 CET schrieb Jens Axboe:
>> My guess would be that the issue of requests is no longer blocking
>> interrupts, that looks like an oversight. So you could have your
>> IRQ handler race with writing new requests, which would be a problem...
> 
> sounds reasonable.
> 
>> Does the below help things?
>>
> 
> It does!
> Anton, please give it also a try.

OK good, it's definitely a bug, and given the symptoms, sounds like
THE bug in this case.

>> diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
>> index 74c002ddc0ce..019bc4828e30 100644
>> --- a/arch/um/drivers/ubd_kern.c
>> +++ b/arch/um/drivers/ubd_kern.c
>> @@ -1341,11 +1341,14 @@ static int ubd_queue_one_vec(struct blk_mq_hw_ctx *hctx, struct request *req,
>>  static blk_status_t ubd_queue_rq(struct blk_mq_hw_ctx *hctx,
>>  				 const struct blk_mq_queue_data *bd)
>>  {
>> +	struct ubd *ubd_dev = hctx->queue->queuedata;
>>  	struct request *req = bd->rq;
>>  	int ret = 0;
>>  
>>  	blk_mq_start_request(req);
>>  
>> +	spin_lock_irq(&ubd_dev->lock);
>> +
> 
> BTW: Why not irq_save/restore?

You only need the save/restore versions if you're called with
interrupts already disabled (or may be), that's not the case
here. Hence we can use the faster versions.

-- 
Jens Axboe


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


  reply	other threads:[~2018-11-07 21:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 18:40 Summary so far - ubd breakage in 4.20-rc1 Anton Ivanov
2018-11-07 18:53 ` Richard Weinberger
2018-11-07 19:19   ` Jens Axboe
2018-11-07 21:15     ` Richard Weinberger
2018-11-07 21:16       ` Jens Axboe [this message]
2018-11-07 21:46         ` Richard Weinberger
2018-11-07 21:47           ` Jens Axboe
2018-11-08  8:30             ` Anton Ivanov
2018-11-08 12:06               ` Anton Ivanov
2018-11-08 12:31                 ` Anton Ivanov
2018-11-08 12:43                   ` Anton Ivanov
2018-11-08 13:08                     ` 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=fe020526-ac24-0279-ca27-7ccabba7a6cc@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=anton.ivanov@kot-begemot.co.uk \
    --cc=hch@lst.de \
    --cc=linux-um@lists.infradead.org \
    --cc=richard@nod.at \
    /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