Re: [PATCH 03/11] locking, rwsem: introduce basis for down_write_killable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Michal Hocko <mhocko@xxxxxxxxxx>
- Subject: Re: [PATCH 03/11] locking, rwsem: introduce basis for down_write_killable
- From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
- Date: Mon, 4 Apr 2016 11:21:43 +0200
- Cc: Davidlohr Bueso <dave@xxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Chris Zankel <chris@xxxxxxxxxx>, Max Filippov <jcmvbkbc@xxxxxxxxx>, x86@xxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx
- In-reply-to: <20160404091659.GA13463@dhcp22.suse.cz>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1459508695-14915-1-git-send-email-mhocko@kernel.org> <1459508695-14915-4-git-send-email-mhocko@kernel.org> <20160402044125.GC5329@linux-uzut.site> <20160404091659.GA13463@dhcp22.suse.cz>
- User-agent: Mutt/1.5.21 (2012-12-30)
On Mon, Apr 04, 2016 at 11:17:00AM +0200, Michal Hocko wrote:
> > >@@ -486,21 +487,39 @@ struct rw_semaphore __sched *rwsem_down_write_failed(struct rw_semaphore *sem)
> > >
> > > /* Block until there are no active lockers. */
> > > do {
> > >+ if (signal_pending_state(state, current)) {
> >
> > ^^ unlikely()?
>
> The generated code is identical after I've added unlikely. I haven't
> tried more gcc versions (mine is 5.3.1) but is this worth it?
Both signal_pending() and __fatal_signal_pending() already have an
unlikely(), which is why adding it here is superfluous.
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]