Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1265892
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Peter Zijlstra <peterz@infradead.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH tip/locking/core v9 5/6] locking/pvqspinlock: Allow 1 lock stealing attempt |
| Date | Mon, 09 Nov 2015 18:40:02 +0100 |
| Message-ID | <qsYAa-123-15@gated-at.bofh.it> (permalink) |
| References | <qprhn-3F0-1@gated-at.bofh.it> <qprhn-3F0-7@gated-at.bofh.it> <qrQEG-5PE-11@gated-at.bofh.it> <qrTjb-7zi-7@gated-at.bofh.it> |
| X-Original-To | Waiman Long <waiman.long@hpe.com> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.21 (2012-12-30) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 45 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Ingo Molnar <mingo@redhat.com>, Thomas Gleixner <tglx@linutronix.de>, "H. Peter Anvin" <hpa@zytor.com>, x86@kernel.org, linux-kernel@vger.kernel.org, Scott J Norton <scott.norton@hpe.com>, Douglas Hatch <doug.hatch@hpe.com>, Davidlohr Bueso <dave@stgolabs.net> |
| X-Original-Date | Mon, 9 Nov 2015 18:29:45 +0100 |
| X-Original-Message-ID | <20151109172945.GM17308@twins.programming.kicks-ass.net> |
| X-Original-References | <1446247597-61863-1-git-send-email-Waiman.Long@hpe.com> <1446247597-61863-6-git-send-email-Waiman.Long@hpe.com> <20151106145005.GU17308@twins.programming.kicks-ass.net> <563CE7C5.9020508@hpe.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1265892 |
Show key headers only | View raw
On Fri, Nov 06, 2015 at 12:47:49PM -0500, Waiman Long wrote: > On 11/06/2015 09:50 AM, Peter Zijlstra wrote: > >*urgh*, last time we had: > > > >+ if (pv_wait_head_or_steal()) > >+ goto stolen; > > while ((val = smp_load_acquire(&lock->val.counter))& _Q_LOCKED_PENDING_MASK) > > cpu_relax(); > > > > ... > > > >+stolen: > > while (!(next = READ_ONCE(node->next))) > > cpu_relax(); > > > > ... > > > >Now you completely overhaul the native code.. what happened? > > I want to reuse as much of the existing native code as possible instead of > duplicating that in the PV function. The only difference now is that the PV > function will acquire that lock. Right; and while I doubt it hurts the native case (you did benchmark it I hope), I'm not too keen on the end result code wise. Maybe just keep the above. > Semantically, I don't want to call the lock > acquisition as lock stealing as the queue head is entitled to get the lock > next. Fair enough I suppose, pv_wait_head_or_lock() then? > I can rename pv_queued_spin_trylock_unfair() to > pv_queued_spin_steal_lock() to emphasize the fact that this is the routine > where lock stealing happens. OK. -- 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 | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH tip/locking/core v9 5/6] locking/pvqspinlock: Allow 1 lock stealing attempt Peter Zijlstra <peterz@infradead.org> - 2015-11-06 16:00 +0100
Re: [PATCH tip/locking/core v9 5/6] locking/pvqspinlock: Allow 1 lock stealing attempt Waiman Long <waiman.long@hpe.com> - 2015-11-06 18:50 +0100
Re: [PATCH tip/locking/core v9 5/6] locking/pvqspinlock: Allow 1 lock stealing attempt Peter Zijlstra <peterz@infradead.org> - 2015-11-09 18:40 +0100
Re: [PATCH tip/locking/core v9 5/6] locking/pvqspinlock: Allow 1 lock stealing attempt Waiman Long <waiman.long@hpe.com> - 2015-11-09 21:00 +0100
csiph-web