Date: Fri, 14 May 2010 21:11:59 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r208100 - in head/sys: kern net Message-ID: <201005142111.o4ELBxLw071689@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Fri May 14 21:11:58 2010 New Revision: 208100 URL: http://svn.freebsd.org/changeset/base/208100 Log: Fix an issue with the dynamic pcpu/vnet data allocators. We cannot expect that modspace is the last entry in the linker set and thus that modspace + possible extra space up to PAGE_SIZE would be contiguous. For the moment do not support more than *_MODMIN space and ignore the extra space (*). (*) We know how to get it back but it'll need testing. Discussed with: jeff, rwatson (briefly) Reviewed by: jeff Sponsored by: The FreeBSD Foundation Sponsored by: CK Software GmbH MFC after: 4 days Modified: head/sys/kern/subr_pcpu.c head/sys/net/vnet.c Modified: head/sys/kern/subr_pcpu.c ============================================================================== --- head/sys/kern/subr_pcpu.c Fri May 14 20:40:37 2010 (r208099) +++ head/sys/kern/subr_pcpu.c Fri May 14 21:11:58 2010 (r208100) @@ -125,7 +125,7 @@ dpcpu_startup(void *dummy __unused) df = malloc(sizeof(*df), M_PCPU, M_WAITOK | M_ZERO); df->df_start = (uintptr_t)&DPCPU_NAME(modspace); - df->df_len = DPCPU_MODSIZE; + df->df_len = DPCPU_MODMIN; TAILQ_INSERT_HEAD(&dpcpu_head, df, df_link); sx_init(&dpcpu_lock, "dpcpu alloc lock"); } Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Fri May 14 20:40:37 2010 (r208099) +++ head/sys/net/vnet.c Fri May 14 21:11:58 2010 (r208100) @@ -348,7 +348,7 @@ vnet_data_startup(void *dummy __unused) df = malloc(sizeof(*df), M_VNET_DATA_FREE, M_WAITOK | M_ZERO); df->vnd_start = (uintptr_t)&VNET_NAME(modspace); - df->vnd_len = VNET_MODSIZE; + df->vnd_len = VNET_MODMIN; TAILQ_INSERT_HEAD(&vnet_data_free_head, df, vnd_link); sx_init(&vnet_data_free_lock, "vnet_data alloc lock"); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005142111.o4ELBxLw071689>