Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ifpoll: Utilize kmalloc_cachealign()

  • Loading branch information...
commit 7b33812f797e7b78003e7b88047255bef86323a2 1 parent cd12dbe
Sepherosa Ziehau authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 sys/net/if_poll.c
View
7 sys/net/if_poll.c
@@ -193,7 +193,7 @@ struct stpoll_ctx {
struct sysctl_ctx_list poll_sysctl_ctx;
struct sysctl_oid *poll_sysctl_tree;
-};
+} __cachealign;
struct iopoll_sysctl_netmsg {
struct netmsg_base base;
@@ -677,7 +677,8 @@ iopoll_ctx_create(int cpuid, int poll_type)
/*
* Create the per-cpu polling context
*/
- io_ctx = kmalloc(sizeof(*io_ctx), M_DEVBUF, M_WAITOK | M_ZERO);
+ io_ctx = kmalloc_cachealign(sizeof(*io_ctx), M_DEVBUF,
+ M_WAITOK | M_ZERO);
io_ctx->poll_each_burst = iopoll_each_burst;
io_ctx->poll_burst_max = iopoll_burst_max;
@@ -1224,7 +1225,7 @@ poll_comm_init(int cpuid)
struct poll_comm *comm;
char cpuid_str[16];
- comm = kmalloc(sizeof(*comm), M_DEVBUF, M_WAITOK | M_ZERO);
+ comm = kmalloc_cachealign(sizeof(*comm), M_DEVBUF, M_WAITOK | M_ZERO);
if (ifpoll_stfrac < 0)
ifpoll_stfrac = IFPOLL_STFRAC_DEFAULT;
Please sign in to comment.
Something went wrong with that request. Please try again.