Re: sched: memory corruption on completing completions

From: Raghavendra K T
Date: Fri Feb 06 2015 - 01:47:24 EST


On 02/06/2015 04:27 AM, Linus Torvalds wrote:
On Thu, Feb 5, 2015 at 2:37 PM, Davidlohr Bueso <dave@xxxxxxxxxxxx> wrote:

It is possible that the paravirt spinlocks could be saved by:

- moving the clearing of TICKET_SLOWPATH_FLAG into the fastpath locking code.

Ouch, to avoid deadlocks they explicitly need the unlock to occur before
the slowpath tail flag is read.

Well, just make the unlock do the actual real unlock operation
("fastpath"), leaving the TICKET_SLOWPATH_FLAG alone. The unlock path
can *test* the flag and do whatever kicking it needs to get people
started again, but not clear it again.


This is definitely a good idea, will think more on this.

(especially since any remote possibility of forgetting to wake up the lock-waiter would result in eventual hang of kvm guest).
Hopeful to come up with a solution soon.

/me agreeing with the fact that we did not have the 'lifetime' in mind
during the design :(.

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