Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933512Ab3FRRqU (ORCPT ); Tue, 18 Jun 2013 13:46:20 -0400 Received: from forward1h.mail.yandex.net ([84.201.187.146]:60056 "EHLO forward1h.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933015Ab3FRRqS (ORCPT ); Tue, 18 Jun 2013 13:46:18 -0400 From: Kirill Tkhai To: Peter Zijlstra Cc: "linux-kernel@vger.kernel.org" , Steven Rostedt , Ingo Molnar In-Reply-To: <20130618172805.GC16094@twins.programming.kicks-ass.net> References: <1981131371569812@web20h.yandex.ru> <20130618172805.GC16094@twins.programming.kicks-ass.net> Subject: Re: [PATCH 1/2] sched: Add schedule_(raw_)spin_unlock and schedule_(raw_)spin_unlock_irq MIME-Version: 1.0 Message-Id: <15591371577574@web20h.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 18 Jun 2013 21:46:14 +0400 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1219 Lines: 43 18.06.2013, 21:28, "Peter Zijlstra" : > On Tue, Jun 18, 2013 at 07:36:52PM +0400, Kirill Tkhai wrote: > >> ?Helpers for replacement repeating patterns: >> >> ?1)spin_unlock(lock); >> ???schedule(); >> ?2)spin_unlock_irq(lock); >> ???schedule(); > > I just noticed this; the existing schedule_preempt_disabled() is > equivalent to: > > ??preempt_enable() > ??schedule() > ??preempt_disable() > > So I somewhat expected these new primitives to be: > > ??spin_unlock() > ??schedule() > ??spin_lock() > > Now I haven't actually looked at the usage patch to see what the > converted sites look like (thanks for adding that one though!). > > My OCD just triggered on the preemption and locked schedule calls having > different semantics. They have different semantic and different ending. Many places (as you can see from the second patch) need additional actions between schedule() and next spin_lock(). Several places don't do the second lock. Kirill -- 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/