On Wed, 11 Feb 2015, Jesper Dangaard Brouer wrote: > > + > > + > > + spin_lock_irqsave(&n->list_lock, flags); > > This is quite an expensive lock with irqsave. Yes but we take it for all partial pages. > Yet another lock cost. Yup the page access is shared but there is one per page. Contention is unlikely. > > + spin_unlock_irqrestore(&n->list_lock, flags); > > + return allocated; > > I estimate (on my CPU) the locking cost itself is more than 32ns, plus > the irqsave (which I've also found quite expensive, alone 14ns). Thus, > estimated 46ns. Single elem slub fast path cost is 18-19ns. Thus 3-4 > elem bulking should be enough to amortized the cost, guess we are still > good :-) We can require that interrupt are off when the functions are called. Then we can avoid the "save" part? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>