mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Hillf Danton" <hillf.zj@alibaba-inc.com>
To: "'Nikolay Borisov'" <kernel@kyup.com>
Cc: "'linux-kernel'" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts disabled and page-draining IPI
Date: Fri, 09 Oct 2015 15:37:29 +0800	[thread overview]
Message-ID: <062801d10265$5a749fc0$0f5ddf40$@alibaba-inc.com> (raw)
In-Reply-To: <56176C10.8040709@kyup.com>

> >> @@ -109,8 +109,8 @@ static void ext4_finish_bio(struct bio *bio)
> >>  			if (bio->bi_error)
> >>  				buffer_io_error(bh);
> >>  		} while ((bh = bh->b_this_page) != head);
> >> -		bit_spin_unlock(BH_Uptodate_Lock, &head->b_state);
> >>  		local_irq_restore(flags);
> >
> > What if it takes 100ms to unlock after IRQ restored?
> 
> I'm not sure I understand in what direction you are going? Care to
> elaborate?
> 
Your change introduces extra time cost the lock waiter has to pay in
the case that irq happens before the lock is released.

> >> +		bit_spin_unlock(BH_Uptodate_Lock, &head->b_state);
> >>  		if (!under_io) {
> >>  #ifdef CONFIG_EXT4_FS_ENCRYPTION
> >>  			if (ctx)
> >> --
> >> 2.5.0
> >


  reply	other threads:[~2015-10-09  7:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09  7:19 Hillf Danton
2015-10-09  7:26 ` Nikolay Borisov
2015-10-09  7:37   ` Hillf Danton [this message]
2015-10-09  8:03     ` Nikolay Borisov
2015-10-12 13:40       ` Jan Kara
2015-10-12 14:51         ` Nikolay Borisov
2015-10-13  8:15           ` Jan Kara
2015-10-13 10:37             ` Nikolay Borisov
2015-10-13 13:14               ` Jan Kara
2015-10-14  9:02                 ` Nikolay Borisov
2015-10-16  8:08                 ` Nikolay Borisov
2015-10-16 12:51                   ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2015-10-08 15:31 Nikolay Borisov
     [not found] ` <CAOtvUMcrhq3epOPCEciMGq53S6rTyURAKEWhQ=NwrkF95aJ+_Q@mail.gmail.com>
2015-10-09  8:50   ` Nikolay Borisov

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='062801d10265$5a749fc0$0f5ddf40$@alibaba-inc.com' \
    --to=hillf.zj@alibaba-inc.com \
    --cc=kernel@kyup.com \
    --cc=linux-kernel@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: 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

Powered by JetHome