Author: glebius
Date: Fri Mar 15 10:15:07 2013
New Revision: 248315
URL: http://svnweb.freebsd.org/changeset/base/248315

Log:
  Make m_get2() never use clusters that are bigger than PAGE_SIZE.
  
  Requested by: andre, jhb
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/kern/uipc_mbuf.c

Modified: head/sys/kern/uipc_mbuf.c
==============================================================================
--- head/sys/kern/uipc_mbuf.c   Fri Mar 15 09:19:19 2013        (r248314)
+++ head/sys/kern/uipc_mbuf.c   Fri Mar 15 10:15:07 2013        (r248315)
@@ -92,7 +92,6 @@ m_get2(int size, int how, short type, in
 {
        struct mb_args args;
        struct mbuf *m, *n;
-       uma_zone_t zone;
 
        args.flags = flags;
        args.type = type;
@@ -101,24 +100,15 @@ m_get2(int size, int how, short type, in
                return (uma_zalloc_arg(zone_mbuf, &args, how));
        if (size <= MCLBYTES)
                return (uma_zalloc_arg(zone_pack, &args, how));
-       if (size > MJUM16BYTES)
+
+       if (size > MJUMPAGESIZE)
                return (NULL);
 
        m = uma_zalloc_arg(zone_mbuf, &args, how);
        if (m == NULL)
                return (NULL);
 
-#if MJUMPAGESIZE != MCLBYTES
-       if (size <= MJUMPAGESIZE)
-               zone = zone_jumbop;
-       else
-#endif
-       if (size <= MJUM9BYTES)
-               zone = zone_jumbo9;
-       else
-               zone = zone_jumbo16;
-
-       n = uma_zalloc_arg(zone, m, how);
+       n = uma_zalloc_arg(zone_jumbop, m, how);
        if (n == NULL) {
                uma_zfree(zone_mbuf, m);
                return (NULL);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to