less aggressive contigmalloc ?

看板FB_current作者時間13年前 (2012/08/22 20:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/11 (看更多)
I am trying to make netmap adapt the amount of memory it allocates to what is available. At its core, it uses contigmalloc() with small chunks (even down to 1 page) to fetch memory. Problem is, i notice that before failing, contigmalloc() tries to swap out some processes (effectively killing them because i have no swap configured in my picobsd image). This happens with both M_WAITOK and M_NOWAIT, the difference is only in the number of retries it does -- see e.g. sys/vm/vm_kern.c :: kmem_alloc_contig() where it retries once for M_NOWAIT and 3 times for M_WAITOK. I wonder if there is a way to make contigmalloc less aggressive and fail without killing those innocent processes ? cheers luigi _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1GDCd_fL (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1GDCd_fL (FB_current)