On Mon, 28 Sep 2015 11:28:15 -0500 (CDT) Christoph Lameter <cl@xxxxxxxxx> wrote: > On Mon, 28 Sep 2015, Jesper Dangaard Brouer wrote: > > > > Do you really need separate parameters for freelist_head? If you just want > > > to deal with one object pass it as freelist_head and set cnt = 1? > > > > Yes, I need it. We need to know both the head and tail of the list to > > splice it. > > Ok so this is to avoid having to scan the list to its end? True. > x is the end > of the list and freelist_head the beginning. That is weird. Yes, it is a bit weird... the bulk free of freelists comes out as a second-class citizen. Okay, I'll try to change the slab_free() and __slab_free() calls to have a "head" and "tail". And let tail be NULL on single object free, to allow compiler to do constant propagation (thus keeping existing fastpath unaffected). (The same code should be generated, but we will have a more intuitive API). -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat Author of http://www.iptv-analyzer.org LinkedIn: http://www.linkedin.com/in/brouer -- 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>