Author: mjg
Date: Thu Jul 12 22:48:18 2018
New Revision: 336232
URL: https://svnweb.freebsd.org/changeset/base/336232
Log:
fd: stop passing M_ZERO to uma_zalloc
The optimisation seen with malloc cannot be used here as zone sizes are
now known at compilation. Thus bzero by hand to get the optimisation
instead.
Modified:
head/sys/kern/kern_descrip.c
Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c Thu Jul 12 22:35:52 2018
(r336231)
+++ head/sys/kern/kern_descrip.c Thu Jul 12 22:48:18 2018
(r336232)
@@ -1865,7 +1865,8 @@ falloc_noinstall(struct thread *td, struct file **resu
}
return (ENFILE);
}
- fp = uma_zalloc(file_zone, M_WAITOK | M_ZERO);
+ fp = uma_zalloc(file_zone, M_WAITOK);
+ bzero(fp, sizeof(*fp));
refcount_init(&fp->f_count, 1);
fp->f_cred = crhold(td->td_ucred);
fp->f_ops = &badfileops;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"