lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 22 Aug 2007 13:19:16 -0700 (PDT) From: Christoph Lameter <clameter@....com> To: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca> cc: Andi Kleen <andi@...stfloor.org>, akpm@...ux-foundation.org, linux-kernel@...r.kernel.org, mingo@...hat.com Subject: Re: [PATCH] SLUB use cmpxchg_local On Wed, 22 Aug 2007, Mathieu Desnoyers wrote: > * Christoph Lameter (clameter@....com) wrote: > > void *kmem_cache_alloc(struct kmem_cache *s, gfp_t gfpflags) > > @@ -1577,7 +1590,10 @@ static void __slab_free(struct kmem_cach > > { > > void *prior; > > void **object = (void *)x; > > + unsigned long flags; > > > > + local_irq_save(flags); > > + put_cpu_no_resched(); > > Those two lines may skip a preempt_check. Yes we cannot execute something else here. > Could we change them to this instead ? > > put_cpu(); > local_irq_save(flags); Then the thread could be preempted and rescheduled on a different cpu between put_cpu and local_irq_save() which means that we loose the state information of the kmem_cache_cpu structure. > Otherwise, it would be good to call > > preempt_check_resched(); > > After each local_irq_restore() in this function. We could do that but maybe the frequency of these checks would be too high? When should the resched checks be used? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists