SMP - fixed usage of stale TLB entries
- when kernel copies from userspace, it must be sure that the TLB entries are not stale and thus the referenced memory is correct - everytime we change a process' address space we set p_stale_tlb bits for all CPUs. - Whenever a cpu finds its bit set when it wants to access the process' memory, it refreshes the TLB - it is more conservative than it needs to be but it has low overhead than checking precisely
This commit is contained in:
@@ -38,6 +38,11 @@ struct proc {
|
||||
bitchunk_t p_cpu_mask[BITMAP_CHUNKS(CONFIG_MAX_CPUS)]; /* what CPUs is hte
|
||||
process allowed to
|
||||
run on */
|
||||
bitchunk_t p_stale_tlb[BITMAP_CHUNKS(CONFIG_MAX_CPUS)]; /* On which cpu are
|
||||
possibly stale entries from this process and has
|
||||
to be fresed the next kernel touches this
|
||||
processes memory
|
||||
*/
|
||||
#endif
|
||||
|
||||
/* Accounting statistics that get passed to the process' scheduler */
|
||||
|
||||
Reference in New Issue
Block a user