linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] migration cleanup patches
@ 2013-11-30  3:05 Nicholas Mc Guire
  2013-12-15 14:31 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Mc Guire @ 2013-11-30  3:05 UTC (permalink / raw)
  To: linux-rt-users

Hi !

 These patches are migrate_disable/enable cleanups only
 basically migrate_disabe/enable is in all of the locking primitives because
 it is not known (or not differenciatable) if the lock is protecting a per
 cpu object or not - so all lock primitives that potentially could also be 
 used for concurrency management of per cpu objects must include 
 migrate_disable/enable to make them safely preemptible (it could get pushed 
 of the cpu and the reference would then be invalid). 

 The location of the migration though is prety much irrelevant as long as the
 access is ensured to be while holding the lock and migration being disabled.
 Locking/migrate_disable patters thus can be any of:

  lock/disable  access  enable/unlock
  disable/lock  access  unlock/enable
  disable/lock  access  enable/unlock
  lock/disable  access  unlock/enable

 Based on this the migrate_disable is pushed down to the latest point before
 signaling a successfully acquired lock

 Further more the first migrate_disable of the task will try to push the task 
 of the CPU before actually disabling migration. For cases of unsuccessful
 lock acquisition this would lead to unnecessary migration of task like in

        int __locked;                           \
        migrate_disable();                      \
        __locked = spin_do_trylock(lock);       \
        if (!__locked)                          \
                migrate_enable();               \
        __locked;                               \

 This patch set pushes the migrate_disable down to the end of the success
 path in the different trylock primitives. 

 patchs are on top of 3.12-rt4

 No change of functional behavior

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 0/4] migration cleanup patches
  2013-11-30  3:05 [PATCH 0/4] migration cleanup patches Nicholas Mc Guire
@ 2013-12-15 14:31 ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-12-15 14:31 UTC (permalink / raw)
  To: Nicholas Mc Guire; +Cc: linux-rt-users

* Nicholas Mc Guire | 2013-11-30 04:05:56 [+0100]:

>Hi !
Hi Nicholas,

I applied 1-3 or 2-4 depends how you look at this :)
Thanks for the series.

Sebastian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-15 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-30  3:05 [PATCH 0/4] migration cleanup patches Nicholas Mc Guire
2013-12-15 14:31 ` Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).