From owner-svn-src-user@FreeBSD.ORG Thu Aug 22 06:28:07 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A7E715B7; Thu, 22 Aug 2013 06:28:07 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9476A216B; Thu, 22 Aug 2013 06:28:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7M6S7kn085837; Thu, 22 Aug 2013 06:28:07 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7M6S7qr085836; Thu, 22 Aug 2013 06:28:07 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201308220628.r7M6S7qr085836@svn.freebsd.org> From: Peter Holm Date: Thu, 22 Aug 2013 06:28:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r254643 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 06:28:07 -0000 Author: pho Date: Thu Aug 22 06:28:07 2013 New Revision: 254643 URL: http://svnweb.freebsd.org/changeset/base/254643 Log: Added VM test scenario. Sponsored by: EMC / Isilon storage division Added: user/pho/stress2/misc/holdcnt0.sh (contents, props changed) Added: user/pho/stress2/misc/holdcnt0.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/holdcnt0.sh Thu Aug 22 06:28:07 2013 (r254643) @@ -0,0 +1,244 @@ +#!/bin/sh + +# +# Copyright (c) 2013 EMC Corp. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# "panic: cluster_wbuild: page 0xc2eebc10 failed shared busing" seen. +# "panic: vdrop: holdcnt 0" seen. +# "panic: cleaned vnode isn't" seen. + +# Test scenario suggestion by alc@ + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +[ `uname -m` = "i386" ] && exit 0 # Not enough vm + +. ../default.cfg + +here=`pwd` +cd /tmp +sed '1,/^EOF/d' < $here/$0 > holdcnt0.c +cc -o holdcnt0 -Wall -Wextra -g holdcnt0.c || exit 1 +rm -f holdcnt0.c +cd $here + +mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart +mdconfig -a -t swap -s 5g -u $mdstart +bsdlabel -w md$mdstart auto +newfs md${mdstart}$part > /dev/null +mount /dev/md${mdstart}$part $mntpoint + +(cd $mntpoint; /tmp/holdcnt0) & +sleep 5 +while kill -0 $! 2> /dev/null; do + (cd ../testcases/swap; ./swap -t 1m -i 1) > /dev/null 2>&1 +done +wait + +while mount | grep -q md${mdstart}$part; do + umount $mntpoint || sleep 1 +done +mdconfig -d -u $mdstart +rm -f /tmp/holdcnt0 +exit 0 +EOF +/* + A test that causes the page daemon to generate cached pages + within a bunch of files and has some consumer that is trying to + allocate new pages to the same files. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BUFSIZE (1024 * 1024) +#define FILES 200 +#define RPARALLEL 8 +#define WPARALLEL 2 + +static jmp_buf jbuf; +off_t maxsize; +int ps; +static char *buf; +volatile char val; + +static void +hand(int i __unused) { /* handler */ + longjmp(jbuf, 1); +} + +void +cleanup(void) +{ + int i; + char file[80]; + + for (i = 0; i < FILES; i++) { + snprintf(file, sizeof(file), "f%06d", i); + unlink(file); + } +} + +void +init(void) +{ + char file[80]; + int fd, i; + + for (i = 0; i < FILES; i++) { + snprintf(file, sizeof(file), "f%06d", i); + if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC, 0644)) == -1) + err(1, "open(%s)", file); + if (write(fd, buf, BUFSIZE) != BUFSIZE) + err(1, "write"); + close(fd); + } + +} + +void +writer(void) +{ + int fd, i; + char file[80]; + time_t start; + struct stat statbuf; + + setproctitle("writer"); + start = time(NULL); + while (time(NULL) - start < 600) { + for (i = 0; i < FILES; i++) { + snprintf(file, sizeof(file), "f%06d", i); + if ((fd = open(file, O_RDWR | O_APPEND)) == -1) { + if (errno != ENOENT) + err(1, "open(%s) append", file); + goto err; + } + if (fstat(fd, &statbuf) < 0) + err(1, "fstat error"); + if (statbuf.st_size < maxsize) { + if (write(fd, buf, ps) != ps) { + warn("writer"); + goto err; + } + } + close(fd); + } + } +err: + cleanup(); + + _exit(0); +} + +void +reader(void) +{ + int fd, i, j, n; + void *p; + size_t len; + char file[80]; + struct stat statbuf; + + setproctitle("reader"); + signal(SIGSEGV, hand); + fd = 0; + for (;;) { + (void)setjmp(jbuf); + for (i = 0; i < FILES; i++) { + snprintf(file, sizeof(file), "f%06d", i); + if (fd > 0) + close(fd); + if ((fd = open(file, O_RDWR)) == -1) { + if (errno != ENOENT) + warn("reader(%s)", file); + _exit(0); + } + if (fstat(fd, &statbuf) < 0) + err(1, "fstat error"); + if (statbuf.st_size >= maxsize) { + if (ftruncate(fd, ps) == -1) + err(1, "ftruncate"); + continue; + } + len = statbuf.st_size; + if ((p = mmap(p, len, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) + err(1, "mmap()"); + close(fd); + n = statbuf.st_size / ps; + for (j = 0; j < n; j++) { + val = *(char *)p; + p = p + ps; + } +#if 0 + if (munmap(p, len) == -1) + perror("munmap"); +#endif + } + } + _exit(0); +} +int +main(void) +{ + int i; + + maxsize = 2LL * 1024 * 1024 * 1024 / FILES; + buf = malloc(BUFSIZE); + ps = getpagesize(); + + init(); + for (i = 0; i < WPARALLEL; i++) { + if (fork() == 0) + writer(); + } + for (i = 0; i < RPARALLEL; i++) { + if (fork() == 0) + reader(); + } + + for (i = 0; i < WPARALLEL; i++) + wait(NULL); + for (i = 0; i < RPARALLEL; i++) + wait(NULL); + + free(buf); + + return (0); +} From owner-svn-src-user@FreeBSD.ORG Thu Aug 22 06:30:07 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 074057A7; Thu, 22 Aug 2013 06:30:07 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E9B3F2179; Thu, 22 Aug 2013 06:30:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7M6U6vu086700; Thu, 22 Aug 2013 06:30:06 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7M6U6Ys086699; Thu, 22 Aug 2013 06:30:06 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201308220630.r7M6U6Ys086699@svn.freebsd.org> From: Peter Holm Date: Thu, 22 Aug 2013 06:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r254645 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 06:30:07 -0000 Author: pho Date: Thu Aug 22 06:30:06 2013 New Revision: 254645 URL: http://svnweb.freebsd.org/changeset/base/254645 Log: Fix typo and add check for allocated memory disk before deleting it. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/rename8.sh Modified: user/pho/stress2/misc/rename8.sh ============================================================================== --- user/pho/stress2/misc/rename8.sh Thu Aug 22 06:28:52 2013 (r254644) +++ user/pho/stress2/misc/rename8.sh Thu Aug 22 06:30:06 2013 (r254645) @@ -30,7 +30,7 @@ [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 -# Cache inconsistancy seen on "to" file for rename(2). +# Cache inconsistency seen on "to" file for rename(2). # Scenario by jhb@ @@ -65,7 +65,8 @@ if mount | grep -q md${mdstart}$part; th exit 1 fi -mdconfig -d -u $mdstart +mdconfig -l | grep -q md$mdstart && + mdconfig -d -u $mdstart rm -f /tmp/rename8 exit EOF From owner-svn-src-user@FreeBSD.ORG Fri Aug 23 08:20:39 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B1B3453D; Fri, 23 Aug 2013 08:20:39 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9EF61255A; Fri, 23 Aug 2013 08:20:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7N8Kdx1093467; Fri, 23 Aug 2013 08:20:39 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7N8KdHO093466; Fri, 23 Aug 2013 08:20:39 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201308230820.r7N8KdHO093466@svn.freebsd.org> From: Peter Holm Date: Fri, 23 Aug 2013 08:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r254682 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 08:20:39 -0000 Author: pho Date: Fri Aug 23 08:20:39 2013 New Revision: 254682 URL: http://svnweb.freebsd.org/changeset/base/254682 Log: Delete unused lines from copy/paste. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/tmpfs2.sh Modified: user/pho/stress2/misc/tmpfs2.sh ============================================================================== --- user/pho/stress2/misc/tmpfs2.sh Fri Aug 23 07:39:32 2013 (r254681) +++ user/pho/stress2/misc/tmpfs2.sh Fri Aug 23 08:20:39 2013 (r254682) @@ -25,7 +25,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $Id: crossmp.sh,v 1.2 2008/02/25 16:31:43 pho Exp $ +# $FreeBSD$ # # panic: vfs_mount_destroy: nonzero writeopcount, seen. @@ -35,20 +35,11 @@ . ../default.cfg mounts=15 # Number of parallel scripts -mdstart=$MDSTART # Use md unit numbers from this point -D=$DISKIMAGE if [ $# -eq 0 ]; then - for i in `jot $mounts`; do - m=$(( i + mdstart - 1 )) - [ ! -d ${mntpoint}$m ] && mkdir ${mntpoint}$m - mount | grep "$mntpoint" | grep -q md$m && umount ${mntpoint}$m - done - # start the parallel tests for i in `jot $mounts`; do - m=$(( i + mdstart - 1 )) - ./$0 $m & + ./$0 $i & ./$0 find & done @@ -70,7 +61,6 @@ else mount -t tmpfs tmpfs ${mntpoint}$m cp -r /usr/include/machine/a* ${mntpoint}$m while mount | grep -qw $mntpoint$m; do - opt=$([ $((`date '+%s'` % 2)) -eq 0 ] && echo "-f") umount $opt ${mntpoint}$m > /dev/null 2>&1 done done From owner-svn-src-user@FreeBSD.ORG Fri Aug 23 08:26:54 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 152FA800; Fri, 23 Aug 2013 08:26:54 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0297425A4; Fri, 23 Aug 2013 08:26:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7N8QrqS097325; Fri, 23 Aug 2013 08:26:53 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7N8Qrcq097308; Fri, 23 Aug 2013 08:26:53 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201308230826.r7N8Qrcq097308@svn.freebsd.org> From: Peter Holm Date: Fri, 23 Aug 2013 08:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r254683 - user/pho/stress2 X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 08:26:54 -0000 Author: pho Date: Fri Aug 23 08:26:52 2013 New Revision: 254683 URL: http://svnweb.freebsd.org/changeset/base/254683 Log: My inconsistent use of upper and lower case in shell variable names finally caught up with me. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/beaver1.sentex.ca user/pho/stress2/giantape1.netperf.freebsd.org user/pho/stress2/hydra1.netperf.freebsd.org user/pho/stress2/hydra2.netperf.freebsd.org user/pho/stress2/orangutan.netperf.freebsd.org Modified: user/pho/stress2/beaver1.sentex.ca ============================================================================== --- user/pho/stress2/beaver1.sentex.ca Fri Aug 23 08:20:39 2013 (r254682) +++ user/pho/stress2/beaver1.sentex.ca Fri Aug 23 08:26:52 2013 (r254683) @@ -8,8 +8,8 @@ TZ=Europe/Copenhagen; export TZ ###export BLASTHOST=192.168.5.105 # orangutan export BLASTHOST=127.0.0.1 # -export DISKIMAGE=/usr/tmp/diskimage # Location of 1G disk image -export MNTPOINT=/mnt # Disk image mount point -export TESTUSER=test # Name of non root test user -###export MDSTART=5 # Start of free md units +export diskimage=/usr/tmp/diskimage # Location of 1G disk image +export mntpoint=/mnt # Disk image mount point +export testuser=test # Name of non root test user +###export mdstart=5 # Start of free md units ###INCARNATIONS=125 Modified: user/pho/stress2/giantape1.netperf.freebsd.org ============================================================================== --- user/pho/stress2/giantape1.netperf.freebsd.org Fri Aug 23 08:20:39 2013 (r254682) +++ user/pho/stress2/giantape1.netperf.freebsd.org Fri Aug 23 08:26:52 2013 (r254683) @@ -4,10 +4,10 @@ export BLASTHOST=192.168.5.105 # orangutan -export DISKIMAGE=/var/tmp/diskimage # Location of 1G disk image -export MNTPOINT=/mnt # Disk image mount point -export TESTUSER=test # Name of non root test user -export MDSTART=5 # Start of free md units +export diskimage=/var/tmp/diskimage # Location of 1G disk image +export mntpoint=/mnt # Disk image mount point +export testuser=test # Name of non root test user +export mdstart=5 # Start of free md units export INCARNATIONS=20 export swapINCARNATIONS=64 export testuser=test # Name of non root test user Modified: user/pho/stress2/hydra1.netperf.freebsd.org ============================================================================== --- user/pho/stress2/hydra1.netperf.freebsd.org Fri Aug 23 08:20:39 2013 (r254682) +++ user/pho/stress2/hydra1.netperf.freebsd.org Fri Aug 23 08:26:52 2013 (r254683) @@ -6,8 +6,8 @@ export RUNDIR=/var/tmp/stressX export BLASTHOST=192.168.5.105 # orangutan -export DISKIMAGE=/var/tmp/diskimage # Location of 1G disk image -export MNTPOINT=/mnt # Disk image mount point -export TESTUSER=test # Name of non root test user -export MDSTART=5 # Start of free md units +export diskimage=/var/tmp/diskimage # Location of 1G disk image +export mntpoint=/mnt # Disk image mount point +export testuser=test # Name of non root test user +export mdstart=5 # Start of free md units INCARNATIONS=150 Modified: user/pho/stress2/hydra2.netperf.freebsd.org ============================================================================== --- user/pho/stress2/hydra2.netperf.freebsd.org Fri Aug 23 08:20:39 2013 (r254682) +++ user/pho/stress2/hydra2.netperf.freebsd.org Fri Aug 23 08:26:52 2013 (r254683) @@ -6,8 +6,8 @@ export RUNDIR=/m2/stressX export BLASTHOST=192.168.5.105 # orangutan -export DISKIMAGE=/m2/tmp/diskimage # Location of 1G disk image -export MNTPOINT=/mnt # Disk image mount point -export TESTUSER=test # Name of non root test user -export MDSTART=5 # Start of free md units +export diskimage=/m2/tmp/diskimage # Location of 1G disk image +export mntpoint=/mnt # Disk image mount point +export testuser=test # Name of non root test user +export mdstart=5 # Start of free md units INCARNATIONS=125 Modified: user/pho/stress2/orangutan.netperf.freebsd.org ============================================================================== --- user/pho/stress2/orangutan.netperf.freebsd.org Fri Aug 23 08:20:39 2013 (r254682) +++ user/pho/stress2/orangutan.netperf.freebsd.org Fri Aug 23 08:26:52 2013 (r254683) @@ -8,10 +8,10 @@ INODES=`df -ik $RUNDIR | tail -1 | awk ' BLASTHOST=127.0.0.1 -DISKIMAGE=/m2/diskimage # Location of 1G disk image -MNTPOINT=/m2 # Disk image mount point -TESTUSER=test # Name of non root test user -MDSTART=5 # Start of free md units +diskimage=/m2/diskimage # Location of 1G disk image +mntpoint=/m2 # Disk image mount point +testuser=test # Name of non root test user +mdstart=5 # Start of free md units TZ=Europe/Copenhagen; export TZ SHELL=/bin/sh From owner-svn-src-user@FreeBSD.ORG Fri Aug 23 20:37:44 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CAD603D9; Fri, 23 Aug 2013 20:37:44 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B90682270; Fri, 23 Aug 2013 20:37:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7NKbirW074520; Fri, 23 Aug 2013 20:37:44 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7NKbiDj074519; Fri, 23 Aug 2013 20:37:44 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308232037.r7NKbiDj074519@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 23 Aug 2013 20:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r254736 - user/np/cxl_tuning/sys/sys X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 20:37:44 -0000 Author: np Date: Fri Aug 23 20:37:44 2013 New Revision: 254736 URL: http://svnweb.freebsd.org/changeset/base/254736 Log: Don't leak tags when M_NOFREE | M_PKTHDR mbufs are freed. Modified: user/np/cxl_tuning/sys/sys/mbuf.h Modified: user/np/cxl_tuning/sys/sys/mbuf.h ============================================================================== --- user/np/cxl_tuning/sys/sys/mbuf.h Fri Aug 23 19:12:29 2013 (r254735) +++ user/np/cxl_tuning/sys/sys/mbuf.h Fri Aug 23 20:37:44 2013 (r254736) @@ -530,18 +530,6 @@ m_free_fast(struct mbuf *m) uma_zfree_arg(zone_mbuf, m, (void *)MB_NOTAGS); } -static __inline struct mbuf * -m_free(struct mbuf *m) -{ - struct mbuf *n = m->m_next; - - if (m->m_flags & M_EXT) - mb_free_ext(m); - else if ((m->m_flags & M_NOFREE) == 0) - uma_zfree(zone_mbuf, m); - return (n); -} - static __inline void m_clget(struct mbuf *m, int how) { @@ -1000,6 +988,20 @@ m_tag_find(struct mbuf *m, int type, str m_tag_locate(m, MTAG_ABI_COMPAT, type, start)); } +static __inline struct mbuf * +m_free(struct mbuf *m) +{ + struct mbuf *n = m->m_next; + + if ((m->m_flags & (M_PKTHDR|M_NOFREE)) == (M_PKTHDR|M_NOFREE)) + m_tag_delete_chain(m, NULL); + if (m->m_flags & M_EXT) + mb_free_ext(m); + else if ((m->m_flags & M_NOFREE) == 0) + uma_zfree(zone_mbuf, m); + return (n); +} + static int inline rt_m_getfib(struct mbuf *m) {