Re: [PATCH 1/3] kvm/ppc/booke: Hold srcu lock when calling gfn functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/01/2013 07:27:23 PM, Scott Wood wrote:
On 05/01/2013 07:15:53 PM, Marcelo Tosatti wrote:
This is not good practice (codepaths should either hold srcu or not hold
it, unconditionally).

How is it different from moving the srcu lock into individual cases of the switch? I just did it this way to make it easier to add new exception types if necessary (e.g. at the time I thought I'd end up adding exceptions which lead to instruction emulation, but I ended up acquiring the lock further down the path in that case).

Can you give more details of the issue? (not obvious)

ITLB/DTLB miss call things like gfn_to_memslot() which need the lock (but don't grab it themselves -- that seems like the real bad practice here...).

Never mind on the parenthetical -- grabbing it themselves wouldn't work because they return RCU-protected data.

-Scott
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux