Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1243091

Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts disabled and page-draining IPI

From "Hillf Danton" <hillf.zj@alibaba-inc.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts disabled and page-draining IPI
Date 2015-10-09 09:40 +0200
Message-ID <qhArv-3UI-9@gated-at.bofh.it> (permalink)
References <qhAhP-3Jz-13@gated-at.bofh.it> <qhAhP-3Jz-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> >> @@ -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
> >

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts  disabled and page-draining IPI Nikolay Borisov <kernel@kyup.com> - 2015-10-09 09:30 +0200
  Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts disabled and page-draining IPI "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2015-10-09 09:40 +0200
    Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts  disabled and page-draining IPI Nikolay Borisov <kernel@kyup.com> - 2015-10-09 10:10 +0200
      Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local  interrupts disabled and page-draining IPI Jan Kara <jack@suse.cz> - 2015-10-12 15:50 +0200
        Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts  disabled and page-draining IPI Nikolay Borisov <kernel@kyup.com> - 2015-10-12 17:00 +0200
          Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local  interrupts disabled and page-draining IPI Jan Kara <jack@suse.cz> - 2015-10-13 10:20 +0200
            Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts  disabled and page-draining IPI Nikolay Borisov <kernel@kyup.com> - 2015-10-13 12:40 +0200
              Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local  interrupts disabled and page-draining IPI Jan Kara <jack@suse.cz> - 2015-10-13 15:20 +0200
                Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts  disabled and page-draining IPI Nikolay Borisov <kernel@kyup.com> - 2015-10-14 11:10 +0200
                Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts  disabled and page-draining IPI Nikolay Borisov <kernel@kyup.com> - 2015-10-16 10:10 +0200
                Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local  interrupts disabled and page-draining IPI Jan Kara <jack@suse.cz> - 2015-10-16 15:00 +0200

csiph-web