From owner-svn-src-user@FreeBSD.ORG Sun Mar 4 23:16:11 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9A7E106564A; Sun, 4 Mar 2012 23:16:11 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 324CC8FC0C; Sun, 4 Mar 2012 23:16:11 +0000 (UTC) Received: by ggnk4 with SMTP id k4so1606704ggn.13 for ; Sun, 04 Mar 2012 15:16:04 -0800 (PST) Received-SPF: pass (google.com: domain of ivoras@gmail.com designates 10.101.128.2 as permitted sender) client-ip=10.101.128.2; Authentication-Results: mr.google.com; spf=pass (google.com: domain of ivoras@gmail.com designates 10.101.128.2 as permitted sender) smtp.mail=ivoras@gmail.com; dkim=pass header.i=ivoras@gmail.com Received: from mr.google.com ([10.101.128.2]) by 10.101.128.2 with SMTP id f2mr7510532ann.20.1330902964248 (num_hops = 1); Sun, 04 Mar 2012 15:16:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=TopF7VMxdaMeSpUps8/6DD5vqqMHIjdo92tQMyQASOA=; b=qZiq/3YIbAtHLV6+qqa3Xpa0r0MUJ7f1jkQEUmdZwcdkGCu5w4FWJY5FJI7nCyWXsL rfeIt8UKc3B6DMwhtVBERL0u2azRnR/pD5NBXKI9M9/chyLB5h0pRM9ZkP2pnhU0WlrU poqwItD/arnKpk72DSe3BKBk4c2N074sT2IXqW6kiriRg6nzo2BLXiOyrHumEIUr78gk N1A0NxiagkVCnWu3tAFMrxQj60Ff28JIXG2c1Mj1I8xoLCtMeXbLdo2uEc6Xrt8d9jDn eHxqQ4cy/j9hpKL5i+Gv55CWQb2PAsK2xz8TSz4zdf67exavOOQGu2yqm5qpHATDdAqq IzSg== Received: by 10.101.128.2 with SMTP id f2mr5954455ann.20.1330902964165; Sun, 04 Mar 2012 15:16:04 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.101.130.23 with HTTP; Sun, 4 Mar 2012 15:15:24 -0800 (PST) In-Reply-To: <4F50E946.3090909@freebsd.org> References: <201203011618.q21GIdww086427@svn.freebsd.org> <4F4FB792.5080908@freebsd.org> <4F50E946.3090909@freebsd.org> From: Ivan Voras Date: Mon, 5 Mar 2012 00:15:24 +0100 X-Google-Sender-Auth: vAjrmnYhccawIpAsVXHsK0AKsR0 Message-ID: To: Andre Oppermann Content-Type: text/plain; charset=UTF-8 Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r232345 - user/andre/tcp_workqueue/sys/netinet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 04 Mar 2012 23:16:11 -0000 On 2 March 2012 16:37, Andre Oppermann wrote: > I'm wary on having every other Jon Doe doing his own "research" on the > most optimal icwnd from his point of view. I still think that such prohibition is useless in the light of Linux having it tunable. From owner-svn-src-user@FreeBSD.ORG Mon Mar 5 06:19:40 2012 Return-Path: Delivered-To: svn-src-user@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8ACE21065672; Mon, 5 Mar 2012 06:19:40 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id E25378FC16; Mon, 5 Mar 2012 06:19:36 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q256JZ05091233; Mon, 5 Mar 2012 10:19:35 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q256JZ3m091232; Mon, 5 Mar 2012 10:19:35 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 5 Mar 2012 10:19:35 +0400 From: Gleb Smirnoff To: Ivan Voras Message-ID: <20120305061935.GL13644@FreeBSD.org> References: <201203011618.q21GIdww086427@svn.freebsd.org> <4F4FB792.5080908@freebsd.org> <4F50E946.3090909@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.org, Andre Oppermann , svn-src-user@FreeBSD.org Subject: Re: svn commit: r232345 - user/andre/tcp_workqueue/sys/netinet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 05 Mar 2012 06:19:40 -0000 On Mon, Mar 05, 2012 at 12:15:24AM +0100, Ivan Voras wrote: I> > I'm wary on having every other Jon Doe doing his own "research" on the I> > most optimal icwnd from his point of view. I> I> I still think that such prohibition is useless in the light of Linux I> having it tunable. Agreed. We should have a reasonable default, but allow people to shoot theirselves in their foot. Some people really demand this possibility! -- Totus tuus, Glebius. From owner-svn-src-user@FreeBSD.ORG Mon Mar 5 10:56:29 2012 Return-Path: Delivered-To: svn-src-user@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A06981065675 for ; Mon, 5 Mar 2012 10:56:29 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 008508FC13 for ; Mon, 5 Mar 2012 10:56:28 +0000 (UTC) Received: (qmail 81781 invoked from network); 5 Mar 2012 09:10:27 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 5 Mar 2012 09:10:27 -0000 Message-ID: <4F549BD4.4010905@freebsd.org> Date: Mon, 05 Mar 2012 11:56:20 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Gleb Smirnoff References: <201203011618.q21GIdww086427@svn.freebsd.org> <4F4FB792.5080908@freebsd.org> <4F50E946.3090909@freebsd.org> <20120305061935.GL13644@FreeBSD.org> In-Reply-To: <20120305061935.GL13644@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, Ivan Voras , svn-src-user@FreeBSD.org Subject: Re: svn commit: r232345 - user/andre/tcp_workqueue/sys/netinet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 05 Mar 2012 10:56:29 -0000 On 05.03.2012 07:19, Gleb Smirnoff wrote: > On Mon, Mar 05, 2012 at 12:15:24AM +0100, Ivan Voras wrote: > I> > I'm wary on having every other Jon Doe doing his own "research" on the > I> > most optimal icwnd from his point of view. > I> > I> I still think that such prohibition is useless in the light of Linux > I> having it tunable. > > Agreed. We should have a reasonable default, but allow people to shoot > theirselves in their foot. Some people really demand this possibility! Thing is they don't shoot into their own foot but everybody else's foot in a non-obvious and difficult to debug manner. While it is user-changeable in Linux it not through the normal easy /proc path equaling a sysctl on our side. FreeBSD never had the option to adjust the ICWND except through enabling rfc3390. I'll hold it the same with this one and refuse to make it arbitrarily user tuneable. It really is not something a normal user/admin should touch. -- Andre From owner-svn-src-user@FreeBSD.ORG Mon Mar 5 11:46:14 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FBFF106568C; Mon, 5 Mar 2012 11:46:14 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FB348FC25; Mon, 5 Mar 2012 11:46:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25BkEPj085150; Mon, 5 Mar 2012 11:46:14 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25BkENk085148; Mon, 5 Mar 2012 11:46:14 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201203051146.q25BkENk085148@svn.freebsd.org> From: Andre Oppermann Date: Mon, 5 Mar 2012 11:46:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232544 - user/andre/tcp_workqueue/sys/sys X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 05 Mar 2012 11:46:14 -0000 Author: andre Date: Mon Mar 5 11:46:14 2012 New Revision: 232544 URL: http://svn.freebsd.org/changeset/base/232544 Log: Slight improvement in readability of macro sowriteable(). Modified: user/andre/tcp_workqueue/sys/sys/socketvar.h Modified: user/andre/tcp_workqueue/sys/sys/socketvar.h ============================================================================== --- user/andre/tcp_workqueue/sys/sys/socketvar.h Mon Mar 5 11:45:19 2012 (r232543) +++ user/andre/tcp_workqueue/sys/sys/socketvar.h Mon Mar 5 11:46:14 2012 (r232544) @@ -213,8 +213,8 @@ struct xsocket { /* can we write something to so? */ #define sowriteable(so) \ ((sbspace(&(so)->so_snd) >= (so)->so_snd.sb_lowat && \ - (((so)->so_state&SS_ISCONNECTED) || \ - ((so)->so_proto->pr_flags&PR_CONNREQUIRED)==0)) || \ + (((so)->so_state & SS_ISCONNECTED) || \ + ((so)->so_proto->pr_flags & PR_CONNREQUIRED)==0)) || \ ((so)->so_snd.sb_state & SBS_CANTSENDMORE) || \ (so)->so_error) From owner-svn-src-user@FreeBSD.ORG Mon Mar 5 11:59:26 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C3D11065676; Mon, 5 Mar 2012 11:59:26 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C2598FC16; Mon, 5 Mar 2012 11:59:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25BxQOv085551; Mon, 5 Mar 2012 11:59:26 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25BxQIQ085549; Mon, 5 Mar 2012 11:59:26 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201203051159.q25BxQIQ085549@svn.freebsd.org> From: Andre Oppermann Date: Mon, 5 Mar 2012 11:59:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232545 - user/andre/tcp_workqueue/sys/kern X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 05 Mar 2012 11:59:26 -0000 Author: andre Date: Mon Mar 5 11:59:26 2012 New Revision: 232545 URL: http://svn.freebsd.org/changeset/base/232545 Log: Improve m_cat() by being able to also merge contents from M_EXT mbuf's by doing proper testing with M_WRITABLE(). In m_collapse() replace an incomplete manual check for M_RDONLY with the M_WRITABLE() macro that also tests for shared buffers and other cases that make a particular mbuf immutable. Modified: user/andre/tcp_workqueue/sys/kern/uipc_mbuf.c Modified: user/andre/tcp_workqueue/sys/kern/uipc_mbuf.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_mbuf.c Mon Mar 5 11:46:14 2012 (r232544) +++ user/andre/tcp_workqueue/sys/kern/uipc_mbuf.c Mon Mar 5 11:59:26 2012 (r232545) @@ -911,8 +911,8 @@ m_cat(struct mbuf *m, struct mbuf *n) while (m->m_next) m = m->m_next; while (n) { - if (m->m_flags & M_EXT || - m->m_data + m->m_len + n->m_len >= &m->m_dat[MLEN]) { + if (!M_WRITABLE(m) || + M_TRAILINGSPACE(m) < n->m_len) { /* just join the two chains */ m->m_next = n; return; @@ -1584,7 +1584,7 @@ again: n = m->m_next; if (n == NULL) break; - if ((m->m_flags & M_RDONLY) == 0 && + if (!M_WRITABLE(m) && n->m_len < M_TRAILINGSPACE(m)) { bcopy(mtod(n, void *), mtod(m, char *) + m->m_len, n->m_len); From owner-svn-src-user@FreeBSD.ORG Mon Mar 5 14:07:35 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0C07106566C; Mon, 5 Mar 2012 14:07:35 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5390A8FC18; Mon, 5 Mar 2012 14:07:35 +0000 (UTC) Received: by ghrr20 with SMTP id r20so1808985ghr.13 for ; Mon, 05 Mar 2012 06:07:29 -0800 (PST) Received-SPF: pass (google.com: domain of ivoras@gmail.com designates 10.101.128.2 as permitted sender) client-ip=10.101.128.2; Authentication-Results: mr.google.com; spf=pass (google.com: domain of ivoras@gmail.com designates 10.101.128.2 as permitted sender) smtp.mail=ivoras@gmail.com; dkim=pass header.i=ivoras@gmail.com Received: from mr.google.com ([10.101.128.2]) by 10.101.128.2 with SMTP id f2mr8416354ann.20.1330956449699 (num_hops = 1); Mon, 05 Mar 2012 06:07:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=6HCUrHhkdJlhnvFIxNqbgkigyNcxTGKWguEbFgA5xms=; b=lc+d1S5WQ2q/ihKD9SIVd9J+jVg4TbHPQ+BxIKADJPVEpIAO0HyaIf+bOgq9YU/smb xRGX67d4YxwT9wB0I+B+Df/0iYtHGLbq3wWkmgAXaXPP6LHYqGF9Alvb6j3Slsyp0XcE BMOVHTzA8Ra/Sc9o8qoCD7C5B7ER8UTOPxXKo3EmQKW9934XHyMt9CIExPEQTtsdYfUb OUk1DFd2GbCcgdt4QcSGPtESE+bIicMC5mQnrQ+kN2RWgQwoPLLqUoHTtCe9Xr8NXXMc CE9ixLbt3MEVshYWs6lHAy1CYXCHdqaBA11KoST/wFThsqPjNzUYPFPP9Fsv9m/dt14a ujlA== Received: by 10.101.128.2 with SMTP id f2mr6639095ann.20.1330956449635; Mon, 05 Mar 2012 06:07:29 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.101.130.23 with HTTP; Mon, 5 Mar 2012 06:06:48 -0800 (PST) In-Reply-To: <4F549BD4.4010905@freebsd.org> References: <201203011618.q21GIdww086427@svn.freebsd.org> <4F4FB792.5080908@freebsd.org> <4F50E946.3090909@freebsd.org> <20120305061935.GL13644@FreeBSD.org> <4F549BD4.4010905@freebsd.org> From: Ivan Voras Date: Mon, 5 Mar 2012 15:06:48 +0100 X-Google-Sender-Auth: jiLw9xw6CiuhVZ3oHX-qNAXCm3s Message-ID: To: Andre Oppermann Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Gleb Smirnoff , src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r232345 - user/andre/tcp_workqueue/sys/netinet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 05 Mar 2012 14:07:36 -0000 2012/3/5 Andre Oppermann : > Thing is they don't shoot into their own foot but everybody else's foot > in a non-obvious and difficult to debug manner. =C2=A0While it is user-ch= angeable > in Linux it not through the normal easy /proc path equaling a sysctl on o= ur > side. No, judging by the document, in Linux it's a much more convenient per-route setting: " the initial congestion window is con=EF=AC=81gured using the intitcwnd option in the ip route command. " http://linux.die.net/man/8/ip And it apparently was there for a long time (at least since 2005). This whole thread is very interesting to read: http://kerneltrap.org/mailarchive/linux-netdev/2010/5/6/6276487 ... but if you don't have the time to read it, the tl;dr is: Linux had the option for years, it's more convenient that what you propose, off the shelf devices also have it and actively use it, and no apocalypse has happened. As I see it, this has stopped being a "purity of spec compliance" issue since at least 2005, and any attempts to stop the floods now are at least useless and probably harmful as it leads to "FreeBSD is slow". From owner-svn-src-user@FreeBSD.ORG Tue Mar 6 15:06:00 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53DB91065703; Tue, 6 Mar 2012 15:06:00 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F7A38FC13; Tue, 6 Mar 2012 15:06:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26F60M7045651; Tue, 6 Mar 2012 15:06:00 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26F5xNn045635; Tue, 6 Mar 2012 15:05:59 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201203061505.q26F5xNn045635@svn.freebsd.org> From: Andre Oppermann Date: Tue, 6 Mar 2012 15:05:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232611 - in user/andre/tcp_workqueue/sys: amd64/amd64 amd64/conf amd64/include arm/arm arm/mv boot/fdt/dts boot/i386/boot2 cam/ctl compat/freebsd32 compat/ndis conf dev/acpica dev/ahci... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 06 Mar 2012 15:06:00 -0000 Author: andre Date: Tue Mar 6 15:05:59 2012 New Revision: 232611 URL: http://svn.freebsd.org/changeset/base/232611 Log: Integrate from HEAD up to r232610. Added: user/andre/tcp_workqueue/sys/mips/include/tls.h - copied unchanged from r232610, head/sys/mips/include/tls.h user/andre/tcp_workqueue/sys/mips/mips/freebsd32_machdep.c - copied unchanged from r232610, head/sys/mips/mips/freebsd32_machdep.c user/andre/tcp_workqueue/sys/modules/usb/dwc_otg/ - copied from r232610, head/sys/modules/usb/dwc_otg/ user/andre/tcp_workqueue/sys/x86/include/float.h - copied unchanged from r232610, head/sys/x86/include/float.h user/andre/tcp_workqueue/sys/x86/include/ptrace.h - copied unchanged from r232610, head/sys/x86/include/ptrace.h user/andre/tcp_workqueue/sys/x86/include/trap.h - copied unchanged from r232610, head/sys/x86/include/trap.h Modified: user/andre/tcp_workqueue/sys/amd64/amd64/ptrace_machdep.c user/andre/tcp_workqueue/sys/amd64/conf/GENERIC user/andre/tcp_workqueue/sys/amd64/include/float.h user/andre/tcp_workqueue/sys/amd64/include/ptrace.h user/andre/tcp_workqueue/sys/amd64/include/trap.h user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c user/andre/tcp_workqueue/sys/arm/mv/mvreg.h user/andre/tcp_workqueue/sys/boot/fdt/dts/db78100.dts user/andre/tcp_workqueue/sys/boot/i386/boot2/boot2.c user/andre/tcp_workqueue/sys/cam/ctl/ctl.c user/andre/tcp_workqueue/sys/cam/ctl/ctl.h user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend.h user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_block.c user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_ramdisk.c user/andre/tcp_workqueue/sys/cam/ctl/ctl_error.c user/andre/tcp_workqueue/sys/cam/ctl/ctl_ioctl.h user/andre/tcp_workqueue/sys/compat/freebsd32/freebsd32.h user/andre/tcp_workqueue/sys/compat/freebsd32/freebsd32_misc.c user/andre/tcp_workqueue/sys/compat/freebsd32/freebsd32_proto.h user/andre/tcp_workqueue/sys/compat/freebsd32/freebsd32_syscall.h user/andre/tcp_workqueue/sys/compat/freebsd32/freebsd32_syscalls.c user/andre/tcp_workqueue/sys/compat/freebsd32/freebsd32_sysent.c user/andre/tcp_workqueue/sys/compat/freebsd32/freebsd32_systrace_args.c user/andre/tcp_workqueue/sys/compat/freebsd32/syscalls.master user/andre/tcp_workqueue/sys/compat/ndis/subr_hal.c user/andre/tcp_workqueue/sys/conf/files.mips user/andre/tcp_workqueue/sys/conf/kern.pre.mk user/andre/tcp_workqueue/sys/conf/options.mips user/andre/tcp_workqueue/sys/dev/acpica/acpi_pci.c user/andre/tcp_workqueue/sys/dev/ahci/ahci.c user/andre/tcp_workqueue/sys/dev/ata/ata-pci.h user/andre/tcp_workqueue/sys/dev/ata/chipsets/ata-ahci.c user/andre/tcp_workqueue/sys/dev/ata/chipsets/ata-marvell.c user/andre/tcp_workqueue/sys/dev/ath/if_ath.c user/andre/tcp_workqueue/sys/dev/cardbus/cardbus.c user/andre/tcp_workqueue/sys/dev/e1000/if_igb.c user/andre/tcp_workqueue/sys/dev/fdt/fdt_common.c user/andre/tcp_workqueue/sys/dev/fdt/fdt_common.h user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_core.c user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_intel.c user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_uncore.c user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_uncore.h user/andre/tcp_workqueue/sys/dev/hwpmc/pmc_events.h user/andre/tcp_workqueue/sys/dev/iicbus/ds1775.c user/andre/tcp_workqueue/sys/dev/iicbus/iicbb.c user/andre/tcp_workqueue/sys/dev/iicbus/iicbb_if.m user/andre/tcp_workqueue/sys/dev/mge/if_mge.c user/andre/tcp_workqueue/sys/dev/mge/if_mgevar.h user/andre/tcp_workqueue/sys/dev/mpt/mpt_pci.c user/andre/tcp_workqueue/sys/dev/oce/oce_hw.c user/andre/tcp_workqueue/sys/dev/pci/hostb_pci.c user/andre/tcp_workqueue/sys/dev/pci/pci.c user/andre/tcp_workqueue/sys/dev/pci/pci_if.m user/andre/tcp_workqueue/sys/dev/pci/pci_private.h user/andre/tcp_workqueue/sys/dev/pci/pcivar.h user/andre/tcp_workqueue/sys/dev/pci/vga_pci.c user/andre/tcp_workqueue/sys/dev/siba/siba_bwn.c user/andre/tcp_workqueue/sys/dev/tsec/if_tsec.c user/andre/tcp_workqueue/sys/dev/tsec/if_tsec.h user/andre/tcp_workqueue/sys/dev/tsec/if_tsec_fdt.c user/andre/tcp_workqueue/sys/dev/usb/controller/dwc_otg.c user/andre/tcp_workqueue/sys/dev/usb/controller/dwc_otg.h user/andre/tcp_workqueue/sys/dev/usb/controller/dwc_otg_atmelarm.c user/andre/tcp_workqueue/sys/dev/usb/controller/usb_controller.c user/andre/tcp_workqueue/sys/dev/usb/storage/umass.c user/andre/tcp_workqueue/sys/dev/virtio/pci/virtio_pci.c user/andre/tcp_workqueue/sys/fs/cd9660/cd9660_vfsops.c user/andre/tcp_workqueue/sys/fs/cd9660/cd9660_vnops.c user/andre/tcp_workqueue/sys/fs/hpfs/hpfs_vfsops.c user/andre/tcp_workqueue/sys/fs/msdosfs/msdosfs_vfsops.c user/andre/tcp_workqueue/sys/fs/nfsclient/nfs_clrpcops.c user/andre/tcp_workqueue/sys/fs/nfsclient/nfs_clvnops.c user/andre/tcp_workqueue/sys/fs/nfsserver/nfs_nfsdport.c user/andre/tcp_workqueue/sys/fs/ntfs/ntfs_vfsops.c user/andre/tcp_workqueue/sys/fs/nullfs/null_subr.c user/andre/tcp_workqueue/sys/fs/pseudofs/pseudofs_vnops.c user/andre/tcp_workqueue/sys/fs/tmpfs/tmpfs_vnops.c user/andre/tcp_workqueue/sys/i386/conf/GENERIC user/andre/tcp_workqueue/sys/i386/conf/XBOX user/andre/tcp_workqueue/sys/i386/include/float.h user/andre/tcp_workqueue/sys/i386/include/ptrace.h user/andre/tcp_workqueue/sys/i386/include/trap.h user/andre/tcp_workqueue/sys/ia64/ia64/busdma_machdep.c user/andre/tcp_workqueue/sys/kern/kern_jail.c user/andre/tcp_workqueue/sys/kern/kern_lock.c user/andre/tcp_workqueue/sys/kern/kern_malloc.c user/andre/tcp_workqueue/sys/kern/kern_proc.c user/andre/tcp_workqueue/sys/kern/kern_racct.c user/andre/tcp_workqueue/sys/kern/kern_tc.c user/andre/tcp_workqueue/sys/kern/sched_ule.c user/andre/tcp_workqueue/sys/kern/sys_generic.c user/andre/tcp_workqueue/sys/kern/sys_pipe.c user/andre/tcp_workqueue/sys/kern/vfs_bio.c user/andre/tcp_workqueue/sys/kern/vfs_cache.c user/andre/tcp_workqueue/sys/mips/cavium/octeon_machdep.c user/andre/tcp_workqueue/sys/mips/cavium/octopci_bus_space.c user/andre/tcp_workqueue/sys/mips/conf/OCTEON1 user/andre/tcp_workqueue/sys/mips/include/elf.h user/andre/tcp_workqueue/sys/mips/include/md_var.h user/andre/tcp_workqueue/sys/mips/include/param.h user/andre/tcp_workqueue/sys/mips/include/proc.h user/andre/tcp_workqueue/sys/mips/include/reg.h user/andre/tcp_workqueue/sys/mips/include/sigframe.h user/andre/tcp_workqueue/sys/mips/include/ucontext.h user/andre/tcp_workqueue/sys/mips/include/vmparam.h user/andre/tcp_workqueue/sys/mips/mips/bus_space_generic.c user/andre/tcp_workqueue/sys/mips/mips/busdma_machdep.c user/andre/tcp_workqueue/sys/mips/mips/genassym.c user/andre/tcp_workqueue/sys/mips/mips/pm_machdep.c user/andre/tcp_workqueue/sys/mips/mips/swtch.S user/andre/tcp_workqueue/sys/mips/mips/trap.c user/andre/tcp_workqueue/sys/mips/mips/vm_machdep.c user/andre/tcp_workqueue/sys/modules/dtrace/dtrace/Makefile user/andre/tcp_workqueue/sys/modules/usb/Makefile user/andre/tcp_workqueue/sys/net/bpf.c user/andre/tcp_workqueue/sys/net/if_ethersubr.c user/andre/tcp_workqueue/sys/net80211/ieee80211.h user/andre/tcp_workqueue/sys/net80211/ieee80211_action.c user/andre/tcp_workqueue/sys/net80211/ieee80211_alq.c user/andre/tcp_workqueue/sys/net80211/ieee80211_alq.h user/andre/tcp_workqueue/sys/net80211/ieee80211_hwmp.c user/andre/tcp_workqueue/sys/net80211/ieee80211_input.c user/andre/tcp_workqueue/sys/net80211/ieee80211_mesh.c user/andre/tcp_workqueue/sys/net80211/ieee80211_mesh.h user/andre/tcp_workqueue/sys/net80211/ieee80211_output.c user/andre/tcp_workqueue/sys/net80211/ieee80211_scan.c user/andre/tcp_workqueue/sys/netinet/icmp6.h user/andre/tcp_workqueue/sys/netinet/ip_mroute.c user/andre/tcp_workqueue/sys/netinet6/ip6_input.c user/andre/tcp_workqueue/sys/netinet6/nd6.c user/andre/tcp_workqueue/sys/nfsclient/nfs_vnops.c user/andre/tcp_workqueue/sys/pc98/include/float.h user/andre/tcp_workqueue/sys/pc98/include/ptrace.h user/andre/tcp_workqueue/sys/pc98/include/trap.h user/andre/tcp_workqueue/sys/powerpc/include/asm.h user/andre/tcp_workqueue/sys/powerpc/ofw/ofw_pcibus.c user/andre/tcp_workqueue/sys/powerpc/powermac/smu.c user/andre/tcp_workqueue/sys/powerpc/powerpc/busdma_machdep.c user/andre/tcp_workqueue/sys/powerpc/powerpc/iommu_if.m user/andre/tcp_workqueue/sys/powerpc/ps3/ps3bus.c user/andre/tcp_workqueue/sys/sparc64/include/bus_dma.h user/andre/tcp_workqueue/sys/sparc64/pci/ofw_pcibus.c user/andre/tcp_workqueue/sys/sparc64/sparc64/bus_machdep.c user/andre/tcp_workqueue/sys/sys/buf.h user/andre/tcp_workqueue/sys/sys/bus_dma.h user/andre/tcp_workqueue/sys/sys/cdefs.h user/andre/tcp_workqueue/sys/sys/malloc.h user/andre/tcp_workqueue/sys/sys/pmc.h user/andre/tcp_workqueue/sys/sys/racct.h user/andre/tcp_workqueue/sys/sys/sysctl.h user/andre/tcp_workqueue/sys/sys/vnode.h user/andre/tcp_workqueue/sys/ufs/ffs/ffs_extern.h user/andre/tcp_workqueue/sys/ufs/ffs/ffs_inode.c user/andre/tcp_workqueue/sys/ufs/ffs/ffs_snapshot.c user/andre/tcp_workqueue/sys/ufs/ffs/ffs_softdep.c user/andre/tcp_workqueue/sys/ufs/ffs/ffs_vnops.c user/andre/tcp_workqueue/sys/ufs/ufs/inode.h user/andre/tcp_workqueue/sys/ufs/ufs/ufs_vnops.c user/andre/tcp_workqueue/sys/vm/vm_mmap.c user/andre/tcp_workqueue/sys/x86/include/_stdint.h user/andre/tcp_workqueue/sys/x86/x86/busdma_machdep.c Directory Properties: user/andre/tcp_workqueue/sys/ (props changed) user/andre/tcp_workqueue/sys/boot/ (props changed) user/andre/tcp_workqueue/sys/conf/ (props changed) Modified: user/andre/tcp_workqueue/sys/amd64/amd64/ptrace_machdep.c ============================================================================== --- user/andre/tcp_workqueue/sys/amd64/amd64/ptrace_machdep.c Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/amd64/amd64/ptrace_machdep.c Tue Mar 6 15:05:59 2012 (r232611) @@ -126,6 +126,12 @@ cpu_ptrace(struct thread *td, int req, v return (cpu32_ptrace(td, req, addr, data)); #endif + /* Support old values of PT_GETXSTATE and PT_SETXSTATE. */ + if (req == PT_FIRSTMACH + 0) + req = PT_GETXSTATE; + if (req == PT_FIRSTMACH + 1) + req = PT_SETXSTATE; + switch (req) { case PT_GETXSTATE: case PT_SETXSTATE: Modified: user/andre/tcp_workqueue/sys/amd64/conf/GENERIC ============================================================================== --- user/andre/tcp_workqueue/sys/amd64/conf/GENERIC Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/amd64/conf/GENERIC Tue Mar 6 15:05:59 2012 (r232611) @@ -168,6 +168,7 @@ device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver +options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support @@ -302,39 +303,8 @@ device ohci # OHCI PCI->USB interface device ehci # EHCI PCI->USB interface (USB 2.0) device xhci # XHCI PCI->USB interface (USB 3.0) device usb # USB Bus (required) -#device udbp # USB Double Bulk Pipe devices (needs netgraph) -device uhid # "Human Interface Devices" device ukbd # Keyboard -device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da -device ums # Mouse -device urio # Diamond Rio 500 MP3 player -# USB Serial devices -device u3g # USB-based 3G modems (Option, Huawei, Sierra) -device uark # Technologies ARK3116 based serial adapters -device ubsa # Belkin F5U103 and compatible serial adapters -device uftdi # For FTDI usb serial adapters -device uipaq # Some WinCE based devices -device uplcom # Prolific PL-2303 serial adapters -device uslcom # SI Labs CP2101/CP2102 serial adapters -device uvisor # Visor and Palm devices -device uvscom # USB serial support for DDI pocket's PHS -# USB Ethernet, requires miibus -device aue # ADMtek USB Ethernet -device axe # ASIX Electronics USB Ethernet -device cdce # Generic USB over Ethernet -device cue # CATC USB Ethernet -device kue # Kawasaki LSI USB Ethernet -device rue # RealTek RTL8150 USB Ethernet -device udav # Davicom DM9601E USB -# USB Wireless -device rum # Ralink Technology RT2501USB wireless NICs -device run # Ralink Technology RT2700/RT2800/RT3000 NICs. -device uath # Atheros AR5523 wireless NICs -device upgt # Conexant/Intersil PrismGT wireless NICs. -device ural # Ralink Technology RT2500USB wireless NICs -device urtw # Realtek RTL8187B/L wireless NICs -device zyd # ZyDAS zd1211/zd1211b wireless NICs # FireWire support device firewire # FireWire bus code @@ -350,7 +320,6 @@ device sound # Generic sound driver (r device snd_es137x # Ensoniq AudioPCI ES137x device snd_hda # Intel High Definition Audio device snd_ich # Intel, NVidia and other ICH AC'97 Audio -device snd_uaudio # USB Audio device snd_via8233 # VIA VT8233x Audio # MMC/SD Modified: user/andre/tcp_workqueue/sys/amd64/include/float.h ============================================================================== --- user/andre/tcp_workqueue/sys/amd64/include/float.h Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/amd64/include/float.h Tue Mar 6 15:05:59 2012 (r232611) @@ -1,94 +1,6 @@ /*- - * Copyright (c) 1989 Regents of the University of California. - * 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. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * from: @(#)float.h 7.1 (Berkeley) 5/8/90 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_FLOAT_H_ -#define _MACHINE_FLOAT_H_ 1 - -#include - -__BEGIN_DECLS -extern int __flt_rounds(void); -__END_DECLS - -#define FLT_RADIX 2 /* b */ -#define FLT_ROUNDS __flt_rounds() -#if __ISO_C_VISIBLE >= 1999 -#define FLT_EVAL_METHOD 0 /* no promotions */ -#define DECIMAL_DIG 21 /* max precision in decimal digits */ -#endif - -#define FLT_MANT_DIG 24 /* p */ -#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */ -#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */ -#define FLT_MIN_EXP (-125) /* emin */ -#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */ -#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */ -#define FLT_MAX_EXP 128 /* emax */ -#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */ -#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */ -#if __ISO_C_VISIBLE >= 2011 -#define FLT_TRUE_MIN 1.40129846E-45F /* b**(emin-p) */ -#define FLT_DECIMAL_DIG 9 /* ceil(1+p*log10(b)) */ -#define FLT_HAS_SUBNORM 1 -#endif /* __ISO_C_VISIBLE >= 2011 */ - -#define DBL_MANT_DIG 53 -#define DBL_EPSILON 2.2204460492503131E-16 -#define DBL_DIG 15 -#define DBL_MIN_EXP (-1021) -#define DBL_MIN 2.2250738585072014E-308 -#define DBL_MIN_10_EXP (-307) -#define DBL_MAX_EXP 1024 -#define DBL_MAX 1.7976931348623157E+308 -#define DBL_MAX_10_EXP 308 -#if __ISO_C_VISIBLE >= 2011 -#define DBL_TRUE_MIN 4.9406564584124654E-324 -#define DBL_DECIMAL_DIG 17 -#define DBL_HAS_SUBNORM 1 -#endif /* __ISO_C_VISIBLE >= 2011 */ - -#define LDBL_MANT_DIG 64 -#define LDBL_EPSILON 1.0842021724855044340E-19L -#define LDBL_DIG 18 -#define LDBL_MIN_EXP (-16381) -#define LDBL_MIN 3.3621031431120935063E-4932L -#define LDBL_MIN_10_EXP (-4931) -#define LDBL_MAX_EXP 16384 -#define LDBL_MAX 1.1897314953572317650E+4932L -#define LDBL_MAX_10_EXP 4932 -#if __ISO_C_VISIBLE >= 2011 -#define LDBL_TRUE_MIN 3.6451995318824746025E-4951L -#define LDBL_DECIMAL_DIG 21 -#define LDBL_HAS_SUBNORM 1 -#endif /* __ISO_C_VISIBLE >= 2011 */ - -#endif /* _MACHINE_FLOAT_H_ */ +#include Modified: user/andre/tcp_workqueue/sys/amd64/include/ptrace.h ============================================================================== --- user/andre/tcp_workqueue/sys/amd64/include/ptrace.h Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/amd64/include/ptrace.h Tue Mar 6 15:05:59 2012 (r232611) @@ -1,41 +1,6 @@ /*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. 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. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * @(#)ptrace.h 8.1 (Berkeley) 6/11/93 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_PTRACE_H_ -#define _MACHINE_PTRACE_H_ - -#define __HAVE_PTRACE_MACHDEP - -#define PT_GETXSTATE (PT_FIRSTMACH + 0) -#define PT_SETXSTATE (PT_FIRSTMACH + 1) - -#endif +#include Modified: user/andre/tcp_workqueue/sys/amd64/include/trap.h ============================================================================== --- user/andre/tcp_workqueue/sys/amd64/include/trap.h Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/amd64/include/trap.h Tue Mar 6 15:05:59 2012 (r232611) @@ -1,95 +1,6 @@ /*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * 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. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * from: @(#)trap.h 5.4 (Berkeley) 5/9/91 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_TRAP_H_ -#define _MACHINE_TRAP_H_ - -/* - * Trap type values - * also known in trap.c for name strings - */ - -#define T_PRIVINFLT 1 /* privileged instruction */ -#define T_BPTFLT 3 /* breakpoint instruction */ -#define T_ARITHTRAP 6 /* arithmetic trap */ -#define T_PROTFLT 9 /* protection fault */ -#define T_TRCTRAP 10 /* debug exception (sic) */ -#define T_PAGEFLT 12 /* page fault */ -#define T_ALIGNFLT 14 /* alignment fault */ - -#define T_DIVIDE 18 /* integer divide fault */ -#define T_NMI 19 /* non-maskable trap */ -#define T_OFLOW 20 /* overflow trap */ -#define T_BOUND 21 /* bound instruction fault */ -#define T_DNA 22 /* device not available fault */ -#define T_DOUBLEFLT 23 /* double fault */ -#define T_FPOPFLT 24 /* fp coprocessor operand fetch fault */ -#define T_TSSFLT 25 /* invalid tss fault */ -#define T_SEGNPFLT 26 /* segment not present fault */ -#define T_STKFLT 27 /* stack fault */ -#define T_MCHK 28 /* machine check trap */ -#define T_XMMFLT 29 /* SIMD floating-point exception */ -#define T_RESERVED 30 /* reserved (unknown) */ -#define T_DTRACE_RET 32 /* DTrace pid return */ -#define T_DTRACE_PROBE 33 /* DTrace fasttrap probe */ - -/* XXX most of the following codes aren't used, but could be. */ - -/* definitions for */ -#define ILL_RESAD_FAULT T_RESADFLT -#define ILL_PRIVIN_FAULT T_PRIVINFLT -#define ILL_RESOP_FAULT T_RESOPFLT -#define ILL_ALIGN_FAULT T_ALIGNFLT -#define ILL_FPOP_FAULT T_FPOPFLT /* coprocessor operand fault */ - -/* old FreeBSD macros, deprecated */ -#define FPE_INTOVF_TRAP 0x1 /* integer overflow */ -#define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */ -#define FPE_FLTDIV_TRAP 0x3 /* floating/decimal divide by zero */ -#define FPE_FLTOVF_TRAP 0x4 /* floating overflow */ -#define FPE_FLTUND_TRAP 0x5 /* floating underflow */ -#define FPE_FPU_NP_TRAP 0x6 /* floating point unit not present */ -#define FPE_SUBRNG_TRAP 0x7 /* subrange out of bounds */ - -/* codes for SIGBUS */ -#define BUS_PAGE_FAULT T_PAGEFLT /* page fault protection base */ -#define BUS_SEGNP_FAULT T_SEGNPFLT /* segment not present */ -#define BUS_STK_FAULT T_STKFLT /* stack segment */ -#define BUS_SEGM_FAULT T_RESERVED /* segment protection base */ - -/* Trap's coming from user mode */ -#define T_USER 0x100 - -#endif /* !_MACHINE_TRAP_H_ */ +#include Modified: user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c ============================================================================== --- user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Tue Mar 6 15:05:59 2012 (r232611) @@ -68,7 +68,7 @@ struct bounce_zone; struct bus_dma_tag { bus_dma_tag_t parent; bus_size_t alignment; - bus_size_t boundary; + bus_addr_t boundary; bus_addr_t lowaddr; bus_addr_t highaddr; bus_dma_filter_t *filter; @@ -332,7 +332,7 @@ _busdma_free_dmamap(bus_dmamap_t map) int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, - bus_size_t boundary, bus_addr_t lowaddr, + bus_addr_t boundary, bus_addr_t lowaddr, bus_addr_t highaddr, bus_dma_filter_t *filter, void *filterarg, bus_size_t maxsize, int nsegments, bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, @@ -378,12 +378,12 @@ bus_dma_tag_create(bus_dma_tag_t parent, * Take into account any restrictions imposed by our parent tag */ if (parent != NULL) { - newtag->lowaddr = min(parent->lowaddr, newtag->lowaddr); - newtag->highaddr = max(parent->highaddr, newtag->highaddr); + newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr); + newtag->highaddr = MAX(parent->highaddr, newtag->highaddr); if (newtag->boundary == 0) newtag->boundary = parent->boundary; else if (parent->boundary != 0) - newtag->boundary = min(parent->boundary, + newtag->boundary = MIN(parent->boundary, newtag->boundary); if ((newtag->filter != NULL) || ((parent->flags & BUS_DMA_COULD_BOUNCE) != 0)) Modified: user/andre/tcp_workqueue/sys/arm/mv/mvreg.h ============================================================================== --- user/andre/tcp_workqueue/sys/arm/mv/mvreg.h Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/arm/mv/mvreg.h Tue Mar 6 15:05:59 2012 (r232611) @@ -34,132 +34,6 @@ #ifndef _MVREG_H_ #define _MVREG_H_ -/* - * Interrupt sources - */ -#if defined(SOC_MV_ORION) - -#define MV_INT_BRIDGE 0 /* AHB-MBus Bridge Interrupt */ -#define MV_INT_UART0 3 /* UART0 Interrupt */ -#define MV_INT_UART1 4 -#define MV_INT_GPIO7_0 6 /* GPIO[7:0] Interrupt */ -#define MV_INT_GPIO15_8 7 /* GPIO[15:8] Interrupt */ -#define MV_INT_GPIO23_16 8 /* GPIO[23:16] Interrupt */ -#define MV_INT_GPIO31_24 9 /* GPIO[31:24] Interrupt */ -#define MV_INT_PEX0_ERR 10 /* PCI Express Error */ -#define MV_INT_PEX0 11 /* PCI Express INTA,B,C,D Message */ -#define MV_INT_PCI_ERR 15 /* PCI Error */ -#define MV_INT_USB_BERR 16 /* USB Bridge Error */ -#define MV_INT_USB_CI 17 /* USB Controller interrupt */ -#define MV_INT_GBERX 18 /* GbE receive interrupt */ -#define MV_INT_GBETX 19 /* GbE transmit interrupt */ -#define MV_INT_GBEMISC 20 /* GbE misc. interrupt */ -#define MV_INT_GBESUM 21 /* GbE summary interrupt */ -#define MV_INT_GBEERR 22 /* GbE error interrupt */ -#define MV_INT_IDMA_ERR 23 /* DMA error interrupt */ -#define MV_INT_IDMA0 24 /* IDMA chan. 0 completion interrupt */ -#define MV_INT_IDMA1 25 /* IDMA chan. 1 completion interrupt */ -#define MV_INT_IDMA2 26 /* IDMA chan. 2 completion interrupt */ -#define MV_INT_IDMA3 27 /* IDMA chan. 3 completion interrupt */ -#define MV_INT_SATA 29 /* Serial-ATA Interrupt */ - -#elif defined(SOC_MV_KIRKWOOD) - -#define MV_INT_BRIDGE 1 /* AHB-MBus Bridge Interrupt */ -#define MV_INT_XOR0_CHAN0 5 /* XOR engine 0 channel 0 Interrupt */ -#define MV_INT_XOR0_CHAN1 6 /* XOR engine 0 channel 1 Interrupt */ -#define MV_INT_XOR1_CHAN0 7 /* XOR engine 1 channel 0 Interrupt */ -#define MV_INT_XOR1_CHAN1 8 /* XOR engine 1 channel 1 Interrupt */ -#define MV_INT_PEX0 9 /* PCI Express INTA,B,C,D Message */ -#define MV_INT_GBESUM 11 /* GbE0 summary interrupt */ -#define MV_INT_GBERX 12 /* GbE0 receive interrupt */ -#define MV_INT_GBETX 13 /* GbE0 transmit interrupt */ -#define MV_INT_GBEMISC 14 /* GbE0 misc. interrupt */ -#define MV_INT_GBE1SUM 15 /* GbE1 summary interrupt */ -#define MV_INT_GBE1RX 16 /* GbE1 receive interrupt */ -#define MV_INT_GBE1TX 17 /* GbE1 transmit interrupt */ -#define MV_INT_GBE1MISC 18 /* GbE1 misc. interrupt */ -#define MV_INT_USB_CI 19 /* USB Controller interrupt */ -#define MV_INT_SATA 21 /* Serial-ATA Interrupt */ -#define MV_INT_CESA 22 /* Security engine completion int. */ -#define MV_INT_IDMA_ERR 23 /* DMA error interrupt */ -#define MV_INT_UART0 33 /* UART0 Interrupt */ -#define MV_INT_UART1 34 -#define MV_INT_GPIO7_0 35 /* GPIO[7:0] Interrupt */ -#define MV_INT_GPIO15_8 36 /* GPIO[15:8] Interrupt */ -#define MV_INT_GPIO23_16 37 /* GPIO[23:16] Interrupt */ -#define MV_INT_GPIO31_24 38 /* GPIO[31:24] Interrupt */ -#define MV_INT_GPIOHI7_0 39 /* GPIOHI[7:0] Interrupt */ -#define MV_INT_GPIOHI15_8 40 /* GPIOHI[15:8] Interrupt */ -#define MV_INT_GPIOHI23_16 41 /* GPIOHI[23:16] Interrupt */ -#define MV_INT_XOR0_ERR 42 /* XOR engine 0 error Interrupt */ -#define MV_INT_XOR1_ERR 43 /* XOR engine 1 error Interrupt */ -#define MV_INT_PEX0_ERR 44 /* PCI Express Error */ -#define MV_INT_GBEERR 46 /* GbE0 error interrupt */ -#define MV_INT_GBE1ERR 47 /* GbE1 error interrupt */ -#define MV_INT_USB_BERR 48 /* USB Bridge Error */ - -#elif defined(SOC_MV_DISCOVERY) - -#define MV_INT_ERRSUM 0 /* Summary of error interrupts */ -#define MV_INT_SPI 1 /* SPI interrupt */ -#define MV_INT_TWSI0 2 /* TWSI0 interrupt */ -#define MV_INT_TWSI1 3 /* TWSI1 interrupt */ -#define MV_INT_IDMA0 4 /* IDMA Channel0 completion */ -#define MV_INT_IDMA1 5 /* IDMA Channel0 completion */ -#define MV_INT_IDMA2 6 /* IDMA Channel0 completion */ -#define MV_INT_IDMA3 7 /* IDMA Channel0 completion */ -#define MV_INT_TIMER0 8 /* Timer0 interrupt */ -#define MV_INT_TIMER1 9 /* Timer1 interrupt */ -#define MV_INT_TIMER2 10 /* Timer2 interrupt */ -#define MV_INT_TIMER3 11 /* Timer3 interrupt */ -#define MV_INT_UART0 12 /* UART0 interrupt */ -#define MV_INT_UART1 13 /* UART1 interrupt */ -#define MV_INT_UART2 14 /* UART2 interrupt */ -#define MV_INT_UART3 15 /* UART3 interrupt */ -#define MV_INT_USB0 16 /* USB0 interrupt */ -#define MV_INT_USB1 17 /* USB1 interrupt */ -#define MV_INT_USB2 18 /* USB2 interrupt */ -#define MV_INT_CESA 19 /* Crypto engine completion interrupt */ -#define MV_INT_XOR0 22 /* XOR engine 0 completion interrupt */ -#define MV_INT_XOR1 23 /* XOR engine 1 completion interrupt */ -#define MV_INT_SATA 26 /* SATA interrupt */ -#define MV_INT_PEX00 32 /* PCI Express port 0.0 INTA/B/C/D */ -#define MV_INT_PEX01 33 /* PCI Express port 0.1 INTA/B/C/D */ -#define MV_INT_PEX02 34 /* PCI Express port 0.2 INTA/B/C/D */ -#define MV_INT_PEX03 35 /* PCI Express port 0.3 INTA/B/C/D */ -#define MV_INT_PEX10 36 /* PCI Express port 1.0 INTA/B/C/D */ -#define MV_INT_PEX11 37 /* PCI Express port 1.1 INTA/B/C/D */ -#define MV_INT_PEX12 38 /* PCI Express port 1.2 INTA/B/C/D */ -#define MV_INT_PEX13 39 /* PCI Express port 1.3 INTA/B/C/D */ -#define MV_INT_GBESUM 40 /* Gigabit Ethernet Port 0 summary */ -#define MV_INT_GBERX 41 /* Gigabit Ethernet Port 0 Rx summary */ -#define MV_INT_GBETX 42 /* Gigabit Ethernet Port 0 Tx summary */ -#define MV_INT_GBEMISC 43 /* Gigabit Ethernet Port 0 Misc summ. */ -#define MV_INT_GBE1SUM 44 /* Gigabit Ethernet Port 1 summary */ -#define MV_INT_GBE1RX 45 /* Gigabit Ethernet Port 1 Rx summary */ -#define MV_INT_GBE1TX 46 /* Gigabit Ethernet Port 1 Tx summary */ -#define MV_INT_GBE1MISC 47 /* Gigabit Ethernet Port 1 Misc summ. */ -#define MV_INT_GPIO7_0 56 /* GPIO[7:0] Interrupt */ -#define MV_INT_GPIO15_8 57 /* GPIO[15:8] Interrupt */ -#define MV_INT_GPIO23_16 58 /* GPIO[23:16] Interrupt */ -#define MV_INT_GPIO31_24 59 /* GPIO[31:24] Interrupt */ -#define MV_INT_DB_IN 60 /* Inbound Doorbell Cause reg Summary */ -#define MV_INT_DB_OUT 61 /* Outbound Doorbell Cause reg Summ. */ -#define MV_INT_CRYPT_ERR 64 /* Crypto engine error */ -#define MV_INT_DEV_ERR 65 /* Device bus error */ -#define MV_INT_IDMA_ERR 66 /* DMA error */ -#define MV_INT_CPU_ERR 67 /* CPU error */ -#define MV_INT_PEX0_ERR 68 /* PCI-Express port0 error */ -#define MV_INT_PEX1_ERR 69 /* PCI-Express port1 error */ -#define MV_INT_GBE_ERR 70 /* Gigabit Ethernet error */ -#define MV_INT_USB_ERR 72 /* USB error */ -#define MV_INT_DRAM_ERR 73 /* DRAM ECC error */ -#define MV_INT_XOR_ERR 74 /* XOR engine error */ -#define MV_INT_WD 79 /* WD Timer interrupt */ - -#endif /* SOC_MV_ORION */ - #define BRIDGE_IRQ_CAUSE 0x10 #define BRIGDE_IRQ_MASK 0x14 Modified: user/andre/tcp_workqueue/sys/boot/fdt/dts/db78100.dts ============================================================================== --- user/andre/tcp_workqueue/sys/boot/fdt/dts/db78100.dts Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/boot/fdt/dts/db78100.dts Tue Mar 6 15:05:59 2012 (r232611) @@ -221,6 +221,9 @@ phy0: ethernet-phy@0 { reg = <0x8>; }; + phy1: ethernet-phy@1 { + reg = <0x9>; + }; }; }; @@ -234,17 +237,7 @@ local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <45 46 47 44 70>; interrupt-parent = <&PIC>; - phy-handle = <&phy0>; - - mdio@0 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "mrvl,mdio"; - - phy0: ethernet-phy@0 { - reg = <0x9>; - }; - }; + phy-handle = <&phy1>; }; serial0: serial@12000 { Modified: user/andre/tcp_workqueue/sys/boot/i386/boot2/boot2.c ============================================================================== --- user/andre/tcp_workqueue/sys/boot/i386/boot2/boot2.c Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/boot/i386/boot2/boot2.c Tue Mar 6 15:05:59 2012 (r232611) @@ -128,7 +128,7 @@ static struct dsk { unsigned start; int init; } dsk; -static char cmd[512], cmddup[512]; +static char cmd[512], cmddup[512], knamebuf[1024]; static const char *kname; static uint32_t opts; static int comspeed = SIOSPD; @@ -223,7 +223,9 @@ main(void) { uint8_t autoboot; ino_t ino; + size_t nbyte; + opts = 0; kname = NULL; dmadat = (void *)(roundup2(__base + (int32_t)&_end, 0x10000) - __base); v86.ctl = V86_FLAGS; @@ -240,8 +242,10 @@ main(void) autoboot = 1; if ((ino = lookup(PATH_CONFIG)) || - (ino = lookup(PATH_DOTCONFIG))) - fsread(ino, cmd, sizeof(cmd)); + (ino = lookup(PATH_DOTCONFIG))) { + nbyte = fsread(ino, cmd, sizeof(cmd) - 1); + cmd[nbyte] = '\0'; + } if (*cmd) { memcpy(cmddup, cmd, sizeof(cmd)); @@ -258,9 +262,9 @@ main(void) * or in case of failure, try to load a kernel directly instead. */ - if (autoboot && !kname) { + if (!kname) { kname = PATH_BOOT3; - if (!keyhit(3*SECOND)) { + if (autoboot && !keyhit(3*SECOND)) { load(); kname = PATH_KERNEL; } @@ -457,7 +461,12 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } - kname = arg; + if ((i = ep - arg)) { + if ((size_t)i >= sizeof(knamebuf)) + return -1; + memcpy(knamebuf, arg, i + 1); + kname = knamebuf; + } } arg = p; } Modified: user/andre/tcp_workqueue/sys/cam/ctl/ctl.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/ctl/ctl.c Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/cam/ctl/ctl.c Tue Mar 6 15:05:59 2012 (r232611) @@ -1,7 +1,11 @@ /*- * Copyright (c) 2003-2009 Silicon Graphics International Corp. + * Copyright (c) 2012 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Edward Tomasz Napierala + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -4797,6 +4801,25 @@ ctl_lun_power_lock(struct ctl_be_lun *be return (0); } +void +ctl_lun_capacity_changed(struct ctl_be_lun *be_lun) +{ + struct ctl_lun *lun; + struct ctl_softc *softc; + int i; + + softc = control_softc; + + mtx_lock(&softc->ctl_lock); + + lun = (struct ctl_lun *)be_lun->ctl_lun; + + for (i = 0; i < CTL_MAX_INITIATORS; i++) + lun->pending_sense[i].ua_pending |= CTL_UA_CAPACITY_CHANGED; + + mtx_unlock(&softc->ctl_lock); +} + /* * Backend "memory move is complete" callback for requests that never * make it down to say RAIDCore's configuration code. Modified: user/andre/tcp_workqueue/sys/cam/ctl/ctl.h ============================================================================== --- user/andre/tcp_workqueue/sys/cam/ctl/ctl.h Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/cam/ctl/ctl.h Tue Mar 6 15:05:59 2012 (r232611) @@ -120,7 +120,8 @@ typedef enum { CTL_UA_RES_PREEMPT = 0x0200, CTL_UA_RES_RELEASE = 0x0400, CTL_UA_REG_PREEMPT = 0x0800, - CTL_UA_ASYM_ACC_CHANGE = 0x1000 + CTL_UA_ASYM_ACC_CHANGE = 0x1000, + CTL_UA_CAPACITY_CHANGED = 0x2000 } ctl_ua_type; #ifdef _KERNEL Modified: user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend.h ============================================================================== --- user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend.h Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend.h Tue Mar 6 15:05:59 2012 (r232611) @@ -280,6 +280,11 @@ int ctl_lun_power_lock(struct ctl_be_lun int ctl_lun_offline(struct ctl_be_lun *be_lun); int ctl_lun_online(struct ctl_be_lun *be_lun); +/* + * Let the backend notify the initiator about changed capacity. + */ +void ctl_lun_capacity_changed(struct ctl_be_lun *be_lun); + #endif /* _KERNEL */ #endif /* _CTL_BACKEND_H_ */ Modified: user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_block.c Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_block.c Tue Mar 6 15:05:59 2012 (r232611) @@ -1,8 +1,12 @@ /*- * Copyright (c) 2003 Silicon Graphics International Corp. * Copyright (c) 2009-2011 Spectra Logic Corporation + * Copyright (c) 2012 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Edward Tomasz Napierala + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -250,6 +254,12 @@ static int ctl_be_block_create(struct ct struct ctl_lun_req *req); static int ctl_be_block_rm(struct ctl_be_block_softc *softc, struct ctl_lun_req *req); +static int ctl_be_block_modify_file(struct ctl_be_block_lun *be_lun, + struct ctl_lun_req *req); +static int ctl_be_block_modify_dev(struct ctl_be_block_lun *be_lun, + struct ctl_lun_req *req); +static int ctl_be_block_modify(struct ctl_be_block_softc *softc, + struct ctl_lun_req *req); static void ctl_be_block_lun_shutdown(void *be_lun); static void ctl_be_block_lun_config_status(void *be_lun, ctl_lun_config_status status); @@ -1263,6 +1273,9 @@ ctl_be_block_ioctl(struct cdev *dev, u_l case CTL_LUNREQ_RM: error = ctl_be_block_rm(softc, lun_req); break; + case CTL_LUNREQ_MODIFY: + error = ctl_be_block_modify(softc, lun_req); + break; default: lun_req->status = CTL_LUN_ERROR; snprintf(lun_req->error_str, sizeof(lun_req->error_str), @@ -1321,7 +1334,10 @@ ctl_be_block_open_file(struct ctl_be_blo file_data->cred = crhold(curthread->td_ucred); - be_lun->size_bytes = vattr.va_size; + if (params->lun_size_bytes != 0) + be_lun->size_bytes = params->lun_size_bytes; + else + be_lun->size_bytes = vattr.va_size; /* * We set the multi thread flag for file operations because all * filesystems (in theory) are capable of allowing multiple readers @@ -1446,15 +1462,27 @@ ctl_be_block_open_dev(struct ctl_be_bloc curthread); if (error) { snprintf(req->error_str, sizeof(req->error_str), - "%s: error %d returned for DIOCGMEDIASIZE ioctl " - "on %s!", __func__, error, be_lun->dev_path); + "%s: error %d returned for DIOCGMEDIASIZE " + " ioctl on %s!", __func__, error, + be_lun->dev_path); return (error); } - return (0); + if (params->lun_size_bytes != 0) { + if (params->lun_size_bytes > be_lun->size_bytes) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: requested LUN size %ju > backing device " + "size %ju", __func__, + (uintmax_t)params->lun_size_bytes, + (uintmax_t)be_lun->size_bytes); + return (EINVAL); + } -} + be_lun->size_bytes = params->lun_size_bytes; + } + return (0); +} static int ctl_be_block_close(struct ctl_be_block_lun *be_lun) @@ -1599,7 +1627,6 @@ ctl_be_block_open(struct ctl_be_block_so be_lun->size_blocks = be_lun->size_bytes >> be_lun->blocksize_shift; return (0); - } static int @@ -2007,6 +2034,155 @@ bailout_error: return (0); } +static int +ctl_be_block_modify_file(struct ctl_be_block_lun *be_lun, + struct ctl_lun_req *req) +{ + struct vattr vattr; + int error; + struct ctl_lun_modify_params *params; + + params = &req->reqdata.modify; + + if (params->lun_size_bytes != 0) { + be_lun->size_bytes = params->lun_size_bytes; + } else { + error = VOP_GETATTR(be_lun->vn, &vattr, curthread->td_ucred); + if (error != 0) { + snprintf(req->error_str, sizeof(req->error_str), + "error calling VOP_GETATTR() for file %s", + be_lun->dev_path); + return (error); + } + + be_lun->size_bytes = vattr.va_size; + } + + return (0); +} + +static int +ctl_be_block_modify_dev(struct ctl_be_block_lun *be_lun, + struct ctl_lun_req *req) +{ + struct cdev *dev; + struct cdevsw *devsw; + int error; + struct ctl_lun_modify_params *params; + uint64_t size_bytes; + + params = &req->reqdata.modify; + + dev = be_lun->vn->v_rdev; + devsw = dev->si_devsw; + if (!devsw->d_ioctl) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: no d_ioctl for device %s!", __func__, + be_lun->dev_path); + return (ENODEV); + } + + error = devsw->d_ioctl(dev, DIOCGMEDIASIZE, + (caddr_t)&size_bytes, FREAD, + curthread); + if (error) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: error %d returned for DIOCGMEDIASIZE ioctl " + "on %s!", __func__, error, be_lun->dev_path); + return (error); + } + + if (params->lun_size_bytes != 0) { + if (params->lun_size_bytes > size_bytes) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: requested LUN size %ju > backing device " + "size %ju", __func__, + (uintmax_t)params->lun_size_bytes, + (uintmax_t)size_bytes); + return (EINVAL); + } + + be_lun->size_bytes = params->lun_size_bytes; + } else { + be_lun->size_bytes = size_bytes; + } + + return (0); +} + +static int +ctl_be_block_modify(struct ctl_be_block_softc *softc, struct ctl_lun_req *req) +{ + struct ctl_lun_modify_params *params; + struct ctl_be_block_lun *be_lun; + int vfs_is_locked, error; + + params = &req->reqdata.modify; + + mtx_lock(&softc->lock); + + be_lun = NULL; + + STAILQ_FOREACH(be_lun, &softc->lun_list, links) { + if (be_lun->ctl_be_lun.lun_id == params->lun_id) + break; + } + mtx_unlock(&softc->lock); + + if (be_lun == NULL) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: LUN %u is not managed by the block backend", + __func__, params->lun_id); + goto bailout_error; + } + + if (params->lun_size_bytes != 0) { + if (params->lun_size_bytes < be_lun->blocksize) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: LUN size %ju < blocksize %u", __func__, + params->lun_size_bytes, be_lun->blocksize); + goto bailout_error; + } + } + + vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount); + vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); + + if (be_lun->vn->v_type == VREG) + error = ctl_be_block_modify_file(be_lun, req); + else + error = ctl_be_block_modify_dev(be_lun, req); + + VOP_UNLOCK(be_lun->vn, 0); + VFS_UNLOCK_GIANT(vfs_is_locked); + + if (error != 0) + goto bailout_error; + + be_lun->size_blocks = be_lun->size_bytes >> be_lun->blocksize_shift; + + /* + * The maximum LBA is the size - 1. + * + * XXX: Note that this field is being updated without locking, + * which might cause problems on 32-bit architectures. + */ + be_lun->ctl_be_lun.maxlba = be_lun->size_blocks - 1; + ctl_lun_capacity_changed(&be_lun->ctl_be_lun); + + /* Tell the user the exact size we ended up using */ + params->lun_size_bytes = be_lun->size_bytes; + + req->status = CTL_LUN_OK; + + return (0); + +bailout_error: + req->status = CTL_LUN_ERROR; + + return (0); +} + static void ctl_be_block_lun_shutdown(void *be_lun) { Modified: user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_ramdisk.c Tue Mar 6 15:02:18 2012 (r232610) +++ user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_ramdisk.c Tue Mar 6 15:05:59 2012 (r232611) @@ -1,7 +1,11 @@ /*- * Copyright (c) 2003, 2008 Silicon Graphics International Corp. + * Copyright (c) 2012 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Edward Tomasz Napierala + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -102,6 +106,8 @@ static int ctl_backend_ramdisk_rm(struct struct ctl_lun_req *req); static int ctl_backend_ramdisk_create(struct ctl_be_ramdisk_softc *softc, struct ctl_lun_req *req, int do_wait); +static int ctl_backend_ramdisk_modify(struct ctl_be_ramdisk_softc *softc, + struct ctl_lun_req *req); static void ctl_backend_ramdisk_lun_shutdown(void *be_lun); static void ctl_backend_ramdisk_lun_config_status(void *be_lun, ctl_lun_config_status status); @@ -376,6 +382,9 @@ ctl_backend_ramdisk_ioctl(struct cdev *d case CTL_LUNREQ_RM: retval = ctl_backend_ramdisk_rm(softc, lun_req); break; + case CTL_LUNREQ_MODIFY: + retval = ctl_backend_ramdisk_modify(softc, lun_req); + break; default: lun_req->status = CTL_LUN_ERROR; snprintf(lun_req->error_str, sizeof(lun_req->error_str), @@ -666,6 +675,73 @@ bailout_error: return (retval); } +static int +ctl_backend_ramdisk_modify(struct ctl_be_ramdisk_softc *softc, + struct ctl_lun_req *req) +{ + struct ctl_be_ramdisk_lun *be_lun; + struct ctl_lun_modify_params *params; + uint32_t blocksize; + + params = &req->reqdata.modify; + + be_lun = NULL; + + mtx_lock(&softc->lock); + STAILQ_FOREACH(be_lun, &softc->lun_list, links) { + if (be_lun->ctl_be_lun.lun_id == params->lun_id) + break; + } + mtx_unlock(&softc->lock); + + if (be_lun == NULL) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: LUN %u is not managed by the ramdisk backend", + __func__, params->lun_id); + goto bailout_error; + } + + if (params->lun_size_bytes == 0) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: LUN size \"auto\" not supported " + "by the ramdisk backend", __func__); + goto bailout_error; + } + + blocksize = be_lun->ctl_be_lun.blocksize; + + if (params->lun_size_bytes < blocksize) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: LUN size %ju < blocksize %u", __func__, + params->lun_size_bytes, blocksize); + goto bailout_error; + } + + be_lun->size_blocks = params->lun_size_bytes / blocksize; + be_lun->size_bytes = be_lun->size_blocks * blocksize; + + /* + * The maximum LBA is the size - 1. + * + * XXX: Note that this field is being updated without locking, + * which might cause problems on 32-bit architectures. + */ + be_lun->ctl_be_lun.maxlba = be_lun->size_blocks - 1; + ctl_lun_capacity_changed(&be_lun->ctl_be_lun); + + /* Tell the user the exact size we ended up using */ + params->lun_size_bytes = be_lun->size_bytes; + + req->status = CTL_LUN_OK; + + return (0); + +bailout_error: + req->status = CTL_LUN_ERROR; + + return (0); +} + static void *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Mar 6 19:43:27 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34A831065672; Tue, 6 Mar 2012 19:43:27 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 250528FC12; Tue, 6 Mar 2012 19:43:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26JhQUt054614; Tue, 6 Mar 2012 19:43:27 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26JhQ1H054611; Tue, 6 Mar 2012 19:43:26 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201203061943.q26JhQ1H054611@svn.freebsd.org> From: Andre Oppermann Date: Tue, 6 Mar 2012 19:43:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232617 - user/andre/tcp_workqueue/sys/kern X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 06 Mar 2012 19:43:27 -0000 Author: andre Date: Tue Mar 6 19:43:26 2012 New Revision: 232617 URL: http://svn.freebsd.org/changeset/base/232617 Log: In soreceive_stream() don't drop an already dequeued mbuf chain by overwriting the return mbuf pointer with newly received data after a loop. Instead append the new mbuf chain to the existing one. Fix up sb_lastrecord when dequeuing mbuf's so that sbappend_stream() doesn't get confused. For the remainder copy case in the mbuf delivery part deduct the copied length len instead of the whole mbuf length. Additionally don't depend on 'n' being being available which isn't true in the case of MSG_PEEK. Submitted by: trociny (slightly different version) Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_socket.c Tue Mar 6 19:19:33 2012 (r232616) +++ user/andre/tcp_workqueue/sys/kern/uipc_socket.c Tue Mar 6 19:43:26 2012 (r232617) @@ -2044,7 +2044,7 @@ deliver: if (mp0 != NULL) { /* Dequeue as many mbufs as possible. */ if (!(flags & MSG_PEEK) && len >= sb->sb_mb->m_len) { - for (*mp0 = m = sb->sb_mb; + for (m = sb->sb_mb; m != NULL && m->m_len <= len; m = m->m_next) { len -= m->m_len; @@ -2052,10 +2052,15 @@ deliver: sbfree(sb, m); n = m; } + n->m_next = NULL; sb->sb_mb = m; + sb->sb_lastrecord = sb->sb_mb; if (sb->sb_mb == NULL) SB_EMPTY_FIXUP(sb); - n->m_next = NULL; + if (*mp0 != NULL) + m_cat(*mp0, m); + else + *mp0 = m; } /* Copy the remainder. */ if (len > 0) { @@ -2066,9 +2071,9 @@ deliver: if (m == NULL) len = 0; /* Don't flush data from sockbuf. */ else - uio->uio_resid -= m->m_len; + uio->uio_resid -= len; if (*mp0 != NULL) - n->m_next = m; + m_cat(*mp0, m); else *mp0 = m; if (*mp0 == NULL) { From owner-svn-src-user@FreeBSD.ORG Tue Mar 6 19:46:57 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E6EA41065741; Tue, 6 Mar 2012 19:46:57 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D727A8FC08; Tue, 6 Mar 2012 19:46:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26Jkv4J054763; Tue, 6 Mar 2012 19:46:57 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26JkvpL054761; Tue, 6 Mar 2012 19:46:57 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201203061946.q26JkvpL054761@svn.freebsd.org> From: Andre Oppermann Date: Tue, 6 Mar 2012 19:46:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232618 - user/andre/tcp_workqueue/sys/kern X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 06 Mar 2012 19:46:58 -0000 Author: andre Date: Tue Mar 6 19:46:57 2012 New Revision: 232618 URL: http://svn.freebsd.org/changeset/base/232618 Log: Fix the MSG_WAITALL case by comparing against sb_hiwat. Before it was looping for every receive as sb_lowat normally is zero. Add comment about issue with (MSG_WAITALL | MSG_PEEK) which isn't properly handled. Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_socket.c Tue Mar 6 19:43:26 2012 (r232617) +++ user/andre/tcp_workqueue/sys/kern/uipc_socket.c Tue Mar 6 19:46:57 2012 (r232618) @@ -1930,6 +1930,7 @@ release: /* * Optimized version of soreceive() for stream (TCP) sockets. + * XXXAO: (MSG_WAITALL | MSG_PEEK) isn't properly handled. */ int soreceive_stream(struct socket *so, struct sockaddr **psa, struct uio *uio, @@ -2018,7 +2019,7 @@ restart: /* On MSG_WAITALL we must wait until all data or error arrives. */ if ((flags & MSG_WAITALL) && - (sb->sb_cc >= uio->uio_resid || sb->sb_cc >= sb->sb_lowat)) + (sb->sb_cc >= uio->uio_resid || sb->sb_cc >= sb->sb_hiwat)) goto deliver; /* From owner-svn-src-user@FreeBSD.ORG Tue Mar 6 23:37:54 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FDF2106566B; Tue, 6 Mar 2012 23:37:54 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F9AD8FC17; Tue, 6 Mar 2012 23:37:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26Nbsex062557; Tue, 6 Mar 2012 23:37:54 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26NbsPM062555; Tue, 6 Mar 2012 23:37:54 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201203062337.q26NbsPM062555@svn.freebsd.org> From: Attilio Rao Date: Tue, 6 Mar 2012 23:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232631 - user/attilio/vmcontention/sys/vm X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 06 Mar 2012 23:37:54 -0000 Author: attilio Date: Tue Mar 6 23:37:53 2012 New Revision: 232631 URL: http://svn.freebsd.org/changeset/base/232631 Log: Fix a compile time bug by adding a check just after the struct definition Modified: user/attilio/vmcontention/sys/vm/vm_radix.c Modified: user/attilio/vmcontention/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmcontention/sys/vm/vm_radix.c Tue Mar 6 23:08:02 2012 (r232630) +++ user/attilio/vmcontention/sys/vm/vm_radix.c Tue Mar 6 23:37:53 2012 (r232631) @@ -72,7 +72,6 @@ (((vm_pindex_t)1 << ((h) * VM_RADIX_WIDTH)) - 1)) CTASSERT(VM_RADIX_HEIGHT >= VM_RADIX_LIMIT); -CTASSERT(sizeof(struct vm_radix_node) < PAGE_SIZE); CTASSERT((sizeof(u_int) * NBBY) >= VM_RADIX_LIMIT); struct vm_radix_node { @@ -80,6 +79,8 @@ struct vm_radix_node { volatile uint32_t rn_count; /* Valid children. */ }; +CTASSERT(sizeof(struct vm_radix_node) < PAGE_SIZE); + static uma_zone_t vm_radix_node_zone; #ifndef UMA_MD_SMALL_ALLOC From owner-svn-src-user@FreeBSD.ORG Wed Mar 7 11:13:18 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 785811065674; Wed, 7 Mar 2012 11:13:18 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 622B88FC0A; Wed, 7 Mar 2012 11:13:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27BDIns090274; Wed, 7 Mar 2012 11:13:18 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27BDI2m090271; Wed, 7 Mar 2012 11:13:18 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201203071113.q27BDI2m090271@svn.freebsd.org> From: Attilio Rao Date: Wed, 7 Mar 2012 11:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232652 - in user/attilio/vmcontention/sys/i386: i386 include X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 07 Mar 2012 11:13:18 -0000 Author: attilio Date: Wed Mar 7 11:13:18 2012 New Revision: 232652 URL: http://svn.freebsd.org/changeset/base/232652 Log: Port r226920,226941 from amd64. Modified: user/attilio/vmcontention/sys/i386/i386/pmap.c user/attilio/vmcontention/sys/i386/include/pmap.h Modified: user/attilio/vmcontention/sys/i386/i386/pmap.c ============================================================================== --- user/attilio/vmcontention/sys/i386/i386/pmap.c Wed Mar 7 09:42:19 2012 (r232651) +++ user/attilio/vmcontention/sys/i386/i386/pmap.c Wed Mar 7 11:13:18 2012 (r232652) @@ -327,6 +327,7 @@ static boolean_t pmap_try_insert_pv_entr static void pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde); static void pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde); +static vm_page_t pmap_vmpage_splay(vm_pindex_t pindex, vm_page_t root); static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); @@ -1554,7 +1555,8 @@ pmap_free_zero_pages(vm_page_t free) while (free != NULL) { m = free; - free = m->right; + free = (void *)m->object; + m->object = NULL; /* Preserve the page's PG_ZERO setting. */ vm_page_free_toq(m); } @@ -1573,7 +1575,7 @@ pmap_add_delayed_free_list(vm_page_t m, m->flags |= PG_ZERO; else m->flags &= ~PG_ZERO; - m->right = *free; + m->object = (void *)*free; *free = m; } @@ -1591,20 +1593,20 @@ pmap_insert_pt_page(pmap_t pmap, vm_page PMAP_LOCK_ASSERT(pmap, MA_OWNED); root = pmap->pm_root; if (root == NULL) { - mpte->left = NULL; - mpte->right = NULL; + mpte->md.pv_left = NULL; + mpte->md.pv_right = NULL; } else { - root = vm_page_splay(mpte->pindex, root); + root = pmap_vmpage_splay(mpte->pindex, root); if (mpte->pindex < root->pindex) { - mpte->left = root->left; - mpte->right = root; - root->left = NULL; + mpte->md.pv_left = root->md.pv_left; + mpte->md.pv_right = root; + root->md.pv_left = NULL; } else if (mpte->pindex == root->pindex) panic("pmap_insert_pt_page: pindex already inserted"); else { - mpte->right = root->right; - mpte->left = root; - root->right = NULL; + mpte->md.pv_right = root->md.pv_right; + mpte->md.pv_left = root; + root->md.pv_right = NULL; } } pmap->pm_root = mpte; @@ -1623,7 +1625,7 @@ pmap_lookup_pt_page(pmap_t pmap, vm_offs PMAP_LOCK_ASSERT(pmap, MA_OWNED); if ((mpte = pmap->pm_root) != NULL && mpte->pindex != pindex) { - mpte = vm_page_splay(pindex, mpte); + mpte = pmap_vmpage_splay(pindex, mpte); if ((pmap->pm_root = mpte)->pindex != pindex) mpte = NULL; } @@ -1642,14 +1644,20 @@ pmap_remove_pt_page(pmap_t pmap, vm_page PMAP_LOCK_ASSERT(pmap, MA_OWNED); if (mpte != pmap->pm_root) - vm_page_splay(mpte->pindex, pmap->pm_root); - if (mpte->left == NULL) - root = mpte->right; + pmap_vmpage_splay(mpte->pindex, pmap->pm_root); + if (mpte->md.pv_left == NULL) + root = mpte->md.pv_right; else { - root = vm_page_splay(mpte->pindex, mpte->left); - root->right = mpte->right; + root = pmap_vmpage_splay(mpte->pindex, mpte->md.pv_left); + root->md.pv_right = mpte->md.pv_right; } pmap->pm_root = root; + + /* + * Reinitialize the pv_list which could be dirty now because of the + * splay tree work. + */ + TAILQ_INIT(&mpte->md.pv_list); } /* @@ -1702,6 +1710,61 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_pa } /* + * Implements Sleator and Tarjan's top-down splay algorithm. Returns + * the vm_page containing the given pindex. If, however, that + * pindex is not found in the pmap, returns a vm_page that is + * adjacent to the pindex, coming before or after it. + */ +static vm_page_t +pmap_vmpage_splay(vm_pindex_t pindex, vm_page_t root) +{ + struct vm_page dummy; + vm_page_t lefttreemax, righttreemin, y; + + if (root == NULL) + return (root); + lefttreemax = righttreemin = &dummy; + for (;; root = y) { + if (pindex < root->pindex) { + if ((y = root->md.pv_left) == NULL) + break; + if (pindex < y->pindex) { + /* Rotate right. */ + root->md.pv_left = y->md.pv_right; + y->md.pv_right = root; + root = y; + if ((y = root->md.pv_left) == NULL) + break; + } + /* Link into the new root's right tree. */ + righttreemin->md.pv_left = root; + righttreemin = root; + } else if (pindex > root->pindex) { + if ((y = root->md.pv_right) == NULL) + break; + if (pindex > y->pindex) { + /* Rotate left. */ + root->md.pv_right = y->md.pv_left; + y->md.pv_left = root; + root = y; + if ((y = root->md.pv_right) == NULL) + break; + } + /* Link into the new root's left tree. */ + lefttreemax->md.pv_right = root; + lefttreemax = root; + } else + break; + } + /* Assemble the new root. */ + lefttreemax->md.pv_right = root->md.pv_left; + righttreemin->md.pv_left = root->md.pv_right; + root->md.pv_left = dummy.md.pv_right; + root->md.pv_right = dummy.md.pv_left; + return (root); +} + +/* * After removing a page table entry, this routine is used to * conditionally free the page, and manage the hold/wire counts. */ @@ -2217,7 +2280,7 @@ pmap_collect(pmap_t locked_pmap, struct TAILQ_FOREACH(m, &vpq->pl, pageq) { if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy) continue; - TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) { + TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_next, next_pv) { va = pv->pv_va; pmap = PV_PMAP(pv); /* Avoid deadlock and lock recursion. */ @@ -2241,7 +2304,7 @@ pmap_collect(pmap_t locked_pmap, struct pmap_unuse_pt(pmap, va, &free); pmap_invalidate_page(pmap, va); pmap_free_zero_pages(free); - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_next); free_pv_entry(pmap, pv); if (pmap != locked_pmap) PMAP_UNLOCK(pmap); @@ -2390,9 +2453,9 @@ pmap_pvh_remove(struct md_page *pvh, pma pv_entry_t pv; mtx_assert(&vm_page_queue_mtx, MA_OWNED); - TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { + TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { if (pmap == PV_PMAP(pv) && va == pv->pv_va) { - TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); + TAILQ_REMOVE(&pvh->pv_list, pv, pv_next); break; } } @@ -2420,7 +2483,7 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse pv = pmap_pvh_remove(pvh, pmap, va); KASSERT(pv != NULL, ("pmap_pv_demote_pde: pv not found")); m = PHYS_TO_VM_PAGE(pa); - TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); + TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_next); /* Instantiate the remaining NPTEPG - 1 pv entries. */ va_last = va + NBPDR - PAGE_SIZE; do { @@ -2456,7 +2519,7 @@ pmap_pv_promote_pde(pmap_t pmap, vm_offs pv = pmap_pvh_remove(&m->md, pmap, va); KASSERT(pv != NULL, ("pmap_pv_promote_pde: pv not found")); pvh = pa_to_pvh(pa); - TAILQ_INSERT_TAIL(&pvh->pv_list, pv, pv_list); + TAILQ_INSERT_TAIL(&pvh->pv_list, pv, pv_next); /* Free the remaining NPTEPG - 1 pv entries. */ va_last = va + NBPDR - PAGE_SIZE; do { @@ -2503,7 +2566,7 @@ pmap_insert_entry(pmap_t pmap, vm_offset mtx_assert(&vm_page_queue_mtx, MA_OWNED); pv = get_pv_entry(pmap, FALSE); pv->pv_va = va; - TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); + TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_next); } /* @@ -2519,7 +2582,7 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm if (pv_entry_count < pv_entry_high_water && (pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; - TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); + TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_next); return (TRUE); } else return (FALSE); @@ -2539,7 +2602,7 @@ pmap_pv_insert_pde(pmap_t pmap, vm_offse (pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; pvh = pa_to_pvh(pa); - TAILQ_INSERT_TAIL(&pvh->pv_list, pv, pv_list); + TAILQ_INSERT_TAIL(&pvh->pv_list, pv, pv_next); return (TRUE); } else return (FALSE); @@ -2987,7 +3050,7 @@ pmap_remove_all(vm_page_t m) vm_page_dirty(m); pmap_unuse_pt(pmap, pv->pv_va, &free); pmap_invalidate_page(pmap, pv->pv_va); - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_next); free_pv_entry(pmap, pv); PMAP_UNLOCK(pmap); } @@ -3419,7 +3482,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, if (pv == NULL) pv = get_pv_entry(pmap, FALSE); pv->pv_va = va; - TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); + TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_next); pa |= PG_MANAGED; } else if (pv != NULL) free_pv_entry(pmap, pv); @@ -4125,7 +4188,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p ("pmap_page_exists_quick: page %p is not managed", m)); rv = FALSE; vm_page_lock_queues(); - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { if (PV_PMAP(pv) == pmap) { rv = TRUE; break; @@ -4136,7 +4199,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p } if (!rv && loops < 16) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); - TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { + TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { if (PV_PMAP(pv) == pmap) { rv = TRUE; break; @@ -4185,7 +4248,7 @@ pmap_pvh_wired_mappings(struct md_page * mtx_assert(&vm_page_queue_mtx, MA_OWNED); sched_pin(); - TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { + TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte_quick(pmap, pv->pv_va); @@ -4308,7 +4371,7 @@ pmap_remove_pages(pmap_t pmap) if ((tpte & PG_PS) != 0) { pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; pvh = pa_to_pvh(tpte & PG_PS_FRAME); - TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); + TAILQ_REMOVE(&pvh->pv_list, pv, pv_next); if (TAILQ_EMPTY(&pvh->pv_list)) { for (mt = m; mt < &m[NBPDR / PAGE_SIZE]; mt++) if (TAILQ_EMPTY(&mt->md.pv_list)) @@ -4326,7 +4389,7 @@ pmap_remove_pages(pmap_t pmap) } } else { pmap->pm_stats.resident_count--; - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_next); if (TAILQ_EMPTY(&m->md.pv_list)) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); if (TAILQ_EMPTY(&pvh->pv_list)) @@ -4401,7 +4464,7 @@ pmap_is_modified_pvh(struct md_page *pvh mtx_assert(&vm_page_queue_mtx, MA_OWNED); rv = FALSE; sched_pin(); - TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { + TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte_quick(pmap, pv->pv_va); @@ -4473,7 +4536,7 @@ pmap_is_referenced_pvh(struct md_page *p mtx_assert(&vm_page_queue_mtx, MA_OWNED); rv = FALSE; sched_pin(); - TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { + TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte_quick(pmap, pv->pv_va); @@ -4514,7 +4577,7 @@ pmap_remove_write(vm_page_t m) vm_page_lock_queues(); sched_pin(); pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); - TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) { + TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { va = pv->pv_va; pmap = PV_PMAP(pv); PMAP_LOCK(pmap); @@ -4523,7 +4586,7 @@ pmap_remove_write(vm_page_t m) (void)pmap_demote_pde(pmap, pde, va); PMAP_UNLOCK(pmap); } - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pde = pmap_pde(pmap, pv->pv_va); @@ -4580,7 +4643,7 @@ pmap_ts_referenced(vm_page_t m) pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); vm_page_lock_queues(); sched_pin(); - TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, pvn) { + TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, pvn) { va = pv->pv_va; pmap = PV_PMAP(pv); PMAP_LOCK(pmap); @@ -4613,9 +4676,9 @@ pmap_ts_referenced(vm_page_t m) if ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pvf = pv; do { - pvn = TAILQ_NEXT(pv, pv_list); - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); + pvn = TAILQ_NEXT(pv, pv_next); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_next); + TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_next); pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pde = pmap_pde(pmap, pv->pv_va); @@ -4667,7 +4730,7 @@ pmap_clear_modify(vm_page_t m) vm_page_lock_queues(); sched_pin(); pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); - TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) { + TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { va = pv->pv_va; pmap = PV_PMAP(pv); PMAP_LOCK(pmap); @@ -4703,7 +4766,7 @@ pmap_clear_modify(vm_page_t m) } PMAP_UNLOCK(pmap); } - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pde = pmap_pde(pmap, pv->pv_va); @@ -4745,7 +4808,7 @@ pmap_clear_reference(vm_page_t m) vm_page_lock_queues(); sched_pin(); pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); - TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) { + TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { va = pv->pv_va; pmap = PV_PMAP(pv); PMAP_LOCK(pmap); @@ -4767,7 +4830,7 @@ pmap_clear_reference(vm_page_t m) } PMAP_UNLOCK(pmap); } - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pde = pmap_pde(pmap, pv->pv_va); @@ -5281,7 +5344,7 @@ pmap_pvdump(vm_paddr_t pa) printf("pa %x", pa); m = PHYS_TO_VM_PAGE(pa); - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { pmap = PV_PMAP(pv); printf(" -> pmap %p, va %x", (void *)pmap, pv->pv_va); pads(pmap); Modified: user/attilio/vmcontention/sys/i386/include/pmap.h ============================================================================== --- user/attilio/vmcontention/sys/i386/include/pmap.h Wed Mar 7 09:42:19 2012 (r232651) +++ user/attilio/vmcontention/sys/i386/include/pmap.h Wed Mar 7 11:13:18 2012 (r232652) @@ -426,10 +426,20 @@ struct pv_entry; struct pv_chunk; struct md_page { - TAILQ_HEAD(,pv_entry) pv_list; - int pat_mode; + union { + TAILQ_HEAD(,pv_entry) pvi_list; + struct { + vm_page_t pii_left; + vm_page_t pii_right; + } pvi_siters; + } pv_structs; + int pat_mode; }; +#define pv_list pv_structs.pvi_list +#define pv_left pv_structs.pvi_siters.pii_left +#define pv_right pv_structs.pvi_siters.pii_right + struct pmap { struct mtx pm_mtx; pd_entry_t *pm_pdir; /* KVA of page directory */ @@ -468,7 +478,7 @@ extern struct pmap kernel_pmap_store; */ typedef struct pv_entry { vm_offset_t pv_va; /* virtual address for mapping */ - TAILQ_ENTRY(pv_entry) pv_list; + TAILQ_ENTRY(pv_entry) pv_next; } *pv_entry_t; /* From owner-svn-src-user@FreeBSD.ORG Wed Mar 7 11:18:40 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FFB3106566B; Wed, 7 Mar 2012 11:18:40 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA9098FC08; Wed, 7 Mar 2012 11:18:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27BIdub090527; Wed, 7 Mar 2012 11:18:39 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27BIdF9090498; Wed, 7 Mar 2012 11:18:39 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201203071118.q27BIdF9090498@svn.freebsd.org> From: Attilio Rao Date: Wed, 7 Mar 2012 11:18:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232653 - in user/attilio/vmcontention: . bin/df etc/mtree etc/rc.d include include/xlocale lib/csu/mips lib/libc/arm lib/libc/gen lib/libc/locale lib/libc/mips/gen lib/libc/regex lib/l... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 07 Mar 2012 11:18:40 -0000 Author: attilio Date: Wed Mar 7 11:18:38 2012 New Revision: 232653 URL: http://svn.freebsd.org/changeset/base/232653 Log: MFC Added: user/attilio/vmcontention/include/xlocale/ - copied from r232652, head/include/xlocale/ user/attilio/vmcontention/lib/libpmc/pmc.sandybridge.3 - copied unchanged from r232652, head/lib/libpmc/pmc.sandybridge.3 user/attilio/vmcontention/lib/libpmc/pmc.sandybridgeuc.3 - copied unchanged from r232652, head/lib/libpmc/pmc.sandybridgeuc.3 user/attilio/vmcontention/share/man/man4/snd_hdspe.4 - copied unchanged from r232652, head/share/man/man4/snd_hdspe.4 user/attilio/vmcontention/share/man/man4/wbwd.4 - copied unchanged from r232652, head/share/man/man4/wbwd.4 user/attilio/vmcontention/sys/dev/sound/pci/hdspe-pcm.c - copied unchanged from r232652, head/sys/dev/sound/pci/hdspe-pcm.c user/attilio/vmcontention/sys/dev/sound/pci/hdspe.c - copied unchanged from r232652, head/sys/dev/sound/pci/hdspe.c user/attilio/vmcontention/sys/dev/sound/pci/hdspe.h - copied unchanged from r232652, head/sys/dev/sound/pci/hdspe.h user/attilio/vmcontention/sys/dev/wbwd/ - copied from r232652, head/sys/dev/wbwd/ user/attilio/vmcontention/sys/mips/include/tls.h - copied unchanged from r232652, head/sys/mips/include/tls.h user/attilio/vmcontention/sys/mips/mips/freebsd32_machdep.c - copied unchanged from r232652, head/sys/mips/mips/freebsd32_machdep.c user/attilio/vmcontention/sys/modules/sound/driver/hdspe/ - copied from r232652, head/sys/modules/sound/driver/hdspe/ user/attilio/vmcontention/sys/modules/usb/dwc_otg/ - copied from r232652, head/sys/modules/usb/dwc_otg/ user/attilio/vmcontention/sys/modules/wbwd/ - copied from r232652, head/sys/modules/wbwd/ user/attilio/vmcontention/sys/x86/include/float.h - copied unchanged from r232652, head/sys/x86/include/float.h user/attilio/vmcontention/sys/x86/include/ptrace.h - copied unchanged from r232652, head/sys/x86/include/ptrace.h user/attilio/vmcontention/sys/x86/include/trap.h - copied unchanged from r232652, head/sys/x86/include/trap.h user/attilio/vmcontention/tools/regression/usb/ - copied from r232652, head/tools/regression/usb/ Deleted: user/attilio/vmcontention/include/_xlocale_ctype.h user/attilio/vmcontention/sys/mips/mips/elf64_machdep.c Modified: user/attilio/vmcontention/Makefile.inc1 user/attilio/vmcontention/UPDATING user/attilio/vmcontention/bin/df/df.1 user/attilio/vmcontention/etc/mtree/BSD.include.dist user/attilio/vmcontention/etc/rc.d/routing user/attilio/vmcontention/include/Makefile user/attilio/vmcontention/include/ctype.h user/attilio/vmcontention/include/langinfo.h user/attilio/vmcontention/include/locale.h user/attilio/vmcontention/include/runetype.h user/attilio/vmcontention/include/string.h user/attilio/vmcontention/include/time.h user/attilio/vmcontention/include/wchar.h user/attilio/vmcontention/include/wctype.h user/attilio/vmcontention/include/xlocale.h user/attilio/vmcontention/lib/csu/mips/crt1.c user/attilio/vmcontention/lib/libc/arm/Symbol.map user/attilio/vmcontention/lib/libc/gen/Makefile.inc user/attilio/vmcontention/lib/libc/gen/closedir.c user/attilio/vmcontention/lib/libc/gen/opendir.c user/attilio/vmcontention/lib/libc/gen/tls.c user/attilio/vmcontention/lib/libc/locale/Symbol.map user/attilio/vmcontention/lib/libc/locale/collate.c user/attilio/vmcontention/lib/libc/locale/nomacros.c user/attilio/vmcontention/lib/libc/locale/setrunelocale.c user/attilio/vmcontention/lib/libc/locale/table.c user/attilio/vmcontention/lib/libc/locale/xlocale.c user/attilio/vmcontention/lib/libc/locale/xlocale_private.h user/attilio/vmcontention/lib/libc/mips/gen/_set_tp.c user/attilio/vmcontention/lib/libc/regex/regcomp.c user/attilio/vmcontention/lib/libc/stdio/mktemp.3 user/attilio/vmcontention/lib/libc/string/swab.3 user/attilio/vmcontention/lib/libc/string/swab.c user/attilio/vmcontention/lib/libc/sys/Makefile.inc user/attilio/vmcontention/lib/libc/uuid/uuid.3 user/attilio/vmcontention/lib/libcam/camlib.c user/attilio/vmcontention/lib/libjail/jail.c user/attilio/vmcontention/lib/libpmc/Makefile user/attilio/vmcontention/lib/libpmc/libpmc.c user/attilio/vmcontention/lib/libthr/arch/mips/include/pthread_md.h user/attilio/vmcontention/libexec/rtld-elf/libmap.c user/attilio/vmcontention/libexec/rtld-elf/mips/reloc.c user/attilio/vmcontention/libexec/rtld-elf/mips/rtld_machdep.h user/attilio/vmcontention/release/doc/en_US.ISO8859-1/hardware/article.sgml user/attilio/vmcontention/release/doc/share/misc/dev.archlist.txt user/attilio/vmcontention/sbin/geom/class/eli/geli.8 user/attilio/vmcontention/sbin/growfs/debug.c user/attilio/vmcontention/sbin/growfs/growfs.c user/attilio/vmcontention/sbin/ifconfig/ifconfig.8 user/attilio/vmcontention/sbin/ifconfig/iflagg.c user/attilio/vmcontention/sbin/ipfw/dummynet.c user/attilio/vmcontention/share/man/man4/Makefile user/attilio/vmcontention/share/man/man4/ahci.4 user/attilio/vmcontention/share/man/man4/ata.4 user/attilio/vmcontention/share/man/man4/ehci.4 user/attilio/vmcontention/share/man/man4/jme.4 user/attilio/vmcontention/share/man/man4/ng_patch.4 user/attilio/vmcontention/share/man/man4/pcm.4 user/attilio/vmcontention/share/man/man9/Makefile user/attilio/vmcontention/share/man/man9/bus_dma.9 user/attilio/vmcontention/share/man/man9/contigmalloc.9 user/attilio/vmcontention/share/man/man9/ifnet.9 user/attilio/vmcontention/share/man/man9/namei.9 user/attilio/vmcontention/share/man/man9/pci.9 user/attilio/vmcontention/share/misc/committers-ports.dot user/attilio/vmcontention/sys/amd64/amd64/ptrace_machdep.c user/attilio/vmcontention/sys/amd64/conf/DEFAULTS user/attilio/vmcontention/sys/amd64/conf/GENERIC user/attilio/vmcontention/sys/amd64/conf/GENERIC.hints user/attilio/vmcontention/sys/amd64/conf/NOTES user/attilio/vmcontention/sys/amd64/include/float.h user/attilio/vmcontention/sys/amd64/include/ptrace.h user/attilio/vmcontention/sys/amd64/include/trap.h user/attilio/vmcontention/sys/arm/arm/busdma_machdep.c user/attilio/vmcontention/sys/arm/conf/DEFAULTS user/attilio/vmcontention/sys/arm/mv/mvreg.h user/attilio/vmcontention/sys/boot/fdt/dts/db78100.dts user/attilio/vmcontention/sys/boot/forth/loader.conf user/attilio/vmcontention/sys/boot/i386/boot2/boot1.S user/attilio/vmcontention/sys/boot/i386/boot2/boot2.c user/attilio/vmcontention/sys/cam/ctl/ctl.c user/attilio/vmcontention/sys/cam/ctl/ctl.h user/attilio/vmcontention/sys/cam/ctl/ctl_backend.h user/attilio/vmcontention/sys/cam/ctl/ctl_backend_block.c user/attilio/vmcontention/sys/cam/ctl/ctl_backend_ramdisk.c user/attilio/vmcontention/sys/cam/ctl/ctl_error.c user/attilio/vmcontention/sys/cam/ctl/ctl_ioctl.h user/attilio/vmcontention/sys/compat/freebsd32/freebsd32.h user/attilio/vmcontention/sys/compat/freebsd32/freebsd32_misc.c user/attilio/vmcontention/sys/compat/freebsd32/freebsd32_proto.h user/attilio/vmcontention/sys/compat/freebsd32/freebsd32_syscall.h user/attilio/vmcontention/sys/compat/freebsd32/freebsd32_syscalls.c user/attilio/vmcontention/sys/compat/freebsd32/freebsd32_sysent.c user/attilio/vmcontention/sys/compat/freebsd32/freebsd32_systrace_args.c user/attilio/vmcontention/sys/compat/freebsd32/syscalls.master user/attilio/vmcontention/sys/compat/ndis/subr_hal.c user/attilio/vmcontention/sys/conf/NOTES user/attilio/vmcontention/sys/conf/files user/attilio/vmcontention/sys/conf/files.amd64 user/attilio/vmcontention/sys/conf/files.i386 user/attilio/vmcontention/sys/conf/files.mips user/attilio/vmcontention/sys/conf/kern.pre.mk user/attilio/vmcontention/sys/conf/options.mips user/attilio/vmcontention/sys/dev/acpica/acpi_pci.c user/attilio/vmcontention/sys/dev/ahci/ahci.c user/attilio/vmcontention/sys/dev/ata/ata-pci.h user/attilio/vmcontention/sys/dev/ata/chipsets/ata-ahci.c user/attilio/vmcontention/sys/dev/ata/chipsets/ata-marvell.c user/attilio/vmcontention/sys/dev/ath/if_ath.c user/attilio/vmcontention/sys/dev/cardbus/cardbus.c user/attilio/vmcontention/sys/dev/e1000/if_igb.c user/attilio/vmcontention/sys/dev/fdt/fdt_common.c user/attilio/vmcontention/sys/dev/fdt/fdt_common.h user/attilio/vmcontention/sys/dev/hwpmc/hwpmc_core.c user/attilio/vmcontention/sys/dev/hwpmc/hwpmc_intel.c user/attilio/vmcontention/sys/dev/hwpmc/hwpmc_uncore.c user/attilio/vmcontention/sys/dev/hwpmc/hwpmc_uncore.h user/attilio/vmcontention/sys/dev/hwpmc/pmc_events.h user/attilio/vmcontention/sys/dev/iicbus/ds1775.c user/attilio/vmcontention/sys/dev/iicbus/iicbb.c user/attilio/vmcontention/sys/dev/iicbus/iicbb_if.m user/attilio/vmcontention/sys/dev/mge/if_mge.c user/attilio/vmcontention/sys/dev/mge/if_mgevar.h user/attilio/vmcontention/sys/dev/mpt/mpt_pci.c user/attilio/vmcontention/sys/dev/oce/oce_hw.c user/attilio/vmcontention/sys/dev/pci/hostb_pci.c user/attilio/vmcontention/sys/dev/pci/pci.c user/attilio/vmcontention/sys/dev/pci/pci_if.m user/attilio/vmcontention/sys/dev/pci/pci_private.h user/attilio/vmcontention/sys/dev/pci/pcivar.h user/attilio/vmcontention/sys/dev/pci/vga_pci.c user/attilio/vmcontention/sys/dev/siba/siba_bwn.c user/attilio/vmcontention/sys/dev/tsec/if_tsec.c user/attilio/vmcontention/sys/dev/tsec/if_tsec.h user/attilio/vmcontention/sys/dev/tsec/if_tsec_fdt.c user/attilio/vmcontention/sys/dev/uart/uart_bus_pci.c user/attilio/vmcontention/sys/dev/usb/controller/dwc_otg.c user/attilio/vmcontention/sys/dev/usb/controller/dwc_otg.h user/attilio/vmcontention/sys/dev/usb/controller/dwc_otg_atmelarm.c user/attilio/vmcontention/sys/dev/usb/controller/usb_controller.c user/attilio/vmcontention/sys/dev/usb/storage/umass.c user/attilio/vmcontention/sys/dev/virtio/pci/virtio_pci.c user/attilio/vmcontention/sys/fs/cd9660/cd9660_vfsops.c user/attilio/vmcontention/sys/fs/cd9660/cd9660_vnops.c user/attilio/vmcontention/sys/fs/fifofs/fifo.h user/attilio/vmcontention/sys/fs/fifofs/fifo_vnops.c user/attilio/vmcontention/sys/fs/hpfs/hpfs_vfsops.c user/attilio/vmcontention/sys/fs/msdosfs/msdosfs_vfsops.c user/attilio/vmcontention/sys/fs/nfsclient/nfs_clbio.c user/attilio/vmcontention/sys/fs/nfsclient/nfs_clrpcops.c user/attilio/vmcontention/sys/fs/nfsclient/nfs_clvnops.c user/attilio/vmcontention/sys/fs/nfsserver/nfs_nfsdport.c user/attilio/vmcontention/sys/fs/ntfs/ntfs_vfsops.c user/attilio/vmcontention/sys/fs/nullfs/null_subr.c user/attilio/vmcontention/sys/fs/pseudofs/pseudofs_vnops.c user/attilio/vmcontention/sys/fs/tmpfs/tmpfs_vnops.c user/attilio/vmcontention/sys/i386/conf/DEFAULTS user/attilio/vmcontention/sys/i386/conf/GENERIC user/attilio/vmcontention/sys/i386/conf/GENERIC.hints user/attilio/vmcontention/sys/i386/conf/NOTES user/attilio/vmcontention/sys/i386/conf/XBOX user/attilio/vmcontention/sys/i386/include/float.h user/attilio/vmcontention/sys/i386/include/ptrace.h user/attilio/vmcontention/sys/i386/include/trap.h user/attilio/vmcontention/sys/ia64/conf/DEFAULTS user/attilio/vmcontention/sys/ia64/ia64/busdma_machdep.c user/attilio/vmcontention/sys/kern/kern_jail.c user/attilio/vmcontention/sys/kern/kern_lock.c user/attilio/vmcontention/sys/kern/kern_malloc.c user/attilio/vmcontention/sys/kern/kern_proc.c user/attilio/vmcontention/sys/kern/kern_racct.c user/attilio/vmcontention/sys/kern/kern_tc.c user/attilio/vmcontention/sys/kern/sched_ule.c user/attilio/vmcontention/sys/kern/sys_generic.c user/attilio/vmcontention/sys/kern/sys_pipe.c user/attilio/vmcontention/sys/kern/vfs_bio.c user/attilio/vmcontention/sys/kern/vfs_cache.c user/attilio/vmcontention/sys/mips/atheros/if_arge.c user/attilio/vmcontention/sys/mips/cavium/octeon_machdep.c user/attilio/vmcontention/sys/mips/cavium/octopci_bus_space.c user/attilio/vmcontention/sys/mips/conf/DEFAULTS user/attilio/vmcontention/sys/mips/conf/OCTEON1 user/attilio/vmcontention/sys/mips/include/asm.h user/attilio/vmcontention/sys/mips/include/cpu.h user/attilio/vmcontention/sys/mips/include/cpuregs.h user/attilio/vmcontention/sys/mips/include/elf.h user/attilio/vmcontention/sys/mips/include/locore.h user/attilio/vmcontention/sys/mips/include/md_var.h user/attilio/vmcontention/sys/mips/include/param.h user/attilio/vmcontention/sys/mips/include/proc.h user/attilio/vmcontention/sys/mips/include/reg.h user/attilio/vmcontention/sys/mips/include/sigframe.h user/attilio/vmcontention/sys/mips/include/ucontext.h user/attilio/vmcontention/sys/mips/include/vmparam.h user/attilio/vmcontention/sys/mips/mips/bus_space_generic.c user/attilio/vmcontention/sys/mips/mips/busdma_machdep.c user/attilio/vmcontention/sys/mips/mips/cpu.c user/attilio/vmcontention/sys/mips/mips/exception.S user/attilio/vmcontention/sys/mips/mips/genassym.c user/attilio/vmcontention/sys/mips/mips/locore.S user/attilio/vmcontention/sys/mips/mips/machdep.c user/attilio/vmcontention/sys/mips/mips/mpboot.S user/attilio/vmcontention/sys/mips/mips/pm_machdep.c user/attilio/vmcontention/sys/mips/mips/support.S user/attilio/vmcontention/sys/mips/mips/swtch.S user/attilio/vmcontention/sys/mips/mips/trap.c user/attilio/vmcontention/sys/mips/mips/vm_machdep.c user/attilio/vmcontention/sys/mips/sibyte/sb_machdep.c user/attilio/vmcontention/sys/modules/Makefile user/attilio/vmcontention/sys/modules/dtrace/dtrace/Makefile user/attilio/vmcontention/sys/modules/sound/driver/Makefile user/attilio/vmcontention/sys/modules/usb/Makefile user/attilio/vmcontention/sys/net/bpf.c user/attilio/vmcontention/sys/net/ieee8023ad_lacp.c user/attilio/vmcontention/sys/net/if_ethersubr.c user/attilio/vmcontention/sys/net/if_lagg.c user/attilio/vmcontention/sys/net/if_lagg.h user/attilio/vmcontention/sys/net80211/ieee80211.h user/attilio/vmcontention/sys/net80211/ieee80211_action.c user/attilio/vmcontention/sys/net80211/ieee80211_alq.c user/attilio/vmcontention/sys/net80211/ieee80211_alq.h user/attilio/vmcontention/sys/net80211/ieee80211_hwmp.c user/attilio/vmcontention/sys/net80211/ieee80211_input.c user/attilio/vmcontention/sys/net80211/ieee80211_mesh.c user/attilio/vmcontention/sys/net80211/ieee80211_mesh.h user/attilio/vmcontention/sys/net80211/ieee80211_output.c user/attilio/vmcontention/sys/net80211/ieee80211_scan.c user/attilio/vmcontention/sys/netinet/icmp6.h user/attilio/vmcontention/sys/netinet/ip_mroute.c user/attilio/vmcontention/sys/netinet6/ip6_input.c user/attilio/vmcontention/sys/netinet6/nd6.c user/attilio/vmcontention/sys/nfsclient/nfs_bio.c user/attilio/vmcontention/sys/nfsclient/nfs_vnops.c user/attilio/vmcontention/sys/pc98/conf/DEFAULTS user/attilio/vmcontention/sys/pc98/include/float.h user/attilio/vmcontention/sys/pc98/include/ptrace.h user/attilio/vmcontention/sys/pc98/include/trap.h user/attilio/vmcontention/sys/powerpc/conf/DEFAULTS user/attilio/vmcontention/sys/powerpc/include/asm.h user/attilio/vmcontention/sys/powerpc/ofw/ofw_pcibus.c user/attilio/vmcontention/sys/powerpc/powermac/smu.c user/attilio/vmcontention/sys/powerpc/powerpc/busdma_machdep.c user/attilio/vmcontention/sys/powerpc/powerpc/iommu_if.m user/attilio/vmcontention/sys/powerpc/ps3/ps3bus.c user/attilio/vmcontention/sys/sparc64/conf/DEFAULTS user/attilio/vmcontention/sys/sparc64/include/bus_dma.h user/attilio/vmcontention/sys/sparc64/pci/ofw_pcibus.c user/attilio/vmcontention/sys/sparc64/sparc64/bus_machdep.c user/attilio/vmcontention/sys/sys/buf.h user/attilio/vmcontention/sys/sys/bus_dma.h user/attilio/vmcontention/sys/sys/cdefs.h user/attilio/vmcontention/sys/sys/malloc.h user/attilio/vmcontention/sys/sys/pipe.h user/attilio/vmcontention/sys/sys/pmc.h user/attilio/vmcontention/sys/sys/racct.h user/attilio/vmcontention/sys/sys/sysctl.h user/attilio/vmcontention/sys/sys/vnode.h user/attilio/vmcontention/sys/ufs/ffs/ffs_extern.h user/attilio/vmcontention/sys/ufs/ffs/ffs_inode.c user/attilio/vmcontention/sys/ufs/ffs/ffs_snapshot.c user/attilio/vmcontention/sys/ufs/ffs/ffs_softdep.c user/attilio/vmcontention/sys/ufs/ffs/ffs_vnops.c user/attilio/vmcontention/sys/ufs/ufs/inode.h user/attilio/vmcontention/sys/ufs/ufs/ufs_vnops.c user/attilio/vmcontention/sys/vm/vm_mmap.c user/attilio/vmcontention/sys/x86/include/_stdint.h user/attilio/vmcontention/sys/x86/x86/busdma_machdep.c user/attilio/vmcontention/tools/test/netfibs/initiator.sh user/attilio/vmcontention/usr.bin/calendar/calendars/calendar.freebsd user/attilio/vmcontention/usr.bin/indent/indent.1 user/attilio/vmcontention/usr.bin/rctl/rctl.8 user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/auto user/attilio/vmcontention/usr.sbin/ctladm/Makefile user/attilio/vmcontention/usr.sbin/ctladm/ctladm.8 user/attilio/vmcontention/usr.sbin/ctladm/ctladm.c user/attilio/vmcontention/usr.sbin/jls/jls.c user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh user/attilio/vmcontention/usr.sbin/pkg_install/add/main.c Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/sbin/ (props changed) user/attilio/vmcontention/sbin/ipfw/ (props changed) user/attilio/vmcontention/share/man/man4/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/boot/ (props changed) user/attilio/vmcontention/sys/conf/ (props changed) user/attilio/vmcontention/usr.bin/calendar/ (props changed) Modified: user/attilio/vmcontention/Makefile.inc1 ============================================================================== --- user/attilio/vmcontention/Makefile.inc1 Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/Makefile.inc1 Wed Mar 7 11:18:38 2012 (r232653) @@ -1108,7 +1108,7 @@ _aicasm= sys/modules/aic7xxx/aicasm _share= share/syscons/scrnmaps .endif -.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") +.if ${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no" _gcc_tools= gnu/usr.bin/cc/cc_tools .endif @@ -1175,7 +1175,7 @@ _clang= usr.bin/clang _clang_libs= lib/clang .endif -.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") +.if ${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no" _cc= gnu/usr.bin/cc .endif Modified: user/attilio/vmcontention/UPDATING ============================================================================== --- user/attilio/vmcontention/UPDATING Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/UPDATING Wed Mar 7 11:18:38 2012 (r232653) @@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20120306: + Disable by default the option VFS_ALLOW_NONMPSAFE for all supported + platforms. + 20120229: Now unix domain sockets behave "as expected" on nullfs(5). Previously nullfs(5) did not pass through all behaviours to the underlying layer, Modified: user/attilio/vmcontention/bin/df/df.1 ============================================================================== --- user/attilio/vmcontention/bin/df/df.1 Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/bin/df/df.1 Wed Mar 7 11:18:38 2012 (r232653) @@ -29,7 +29,7 @@ .\" @(#)df.1 8.3 (Berkeley) 5/8/95 .\" $FreeBSD$ .\" -.Dd October 18, 2011 +.Dd March 3, 2012 .Dt DF 1 .Os .Sh NAME @@ -158,7 +158,9 @@ is set, the block counts will be display .El .Sh SEE ALSO .Xr lsvfs 1 , +.Xr pstat 1 , .Xr quota 1 , +.Xr swapinfo 1 , .Xr fstatfs 2 , .Xr getfsstat 2 , .Xr statfs 2 , Modified: user/attilio/vmcontention/etc/mtree/BSD.include.dist ============================================================================== --- user/attilio/vmcontention/etc/mtree/BSD.include.dist Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/etc/mtree/BSD.include.dist Wed Mar 7 11:18:38 2012 (r232653) @@ -329,4 +329,6 @@ .. vm .. + xlocale + .. .. Modified: user/attilio/vmcontention/etc/rc.d/routing ============================================================================== --- user/attilio/vmcontention/etc/rc.d/routing Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/etc/rc.d/routing Wed Mar 7 11:18:38 2012 (r232653) @@ -147,14 +147,21 @@ static_inet6() : ${fibs:=1} # disallow "internal" addresses to appear on the wire - i=0 - while test ${i} -lt ${fibs}; do - setfib -F ${i} route ${_action} \ - -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject - setfib -F ${i} route ${_action} \ - -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject - i=$((i + 1)) - done + route ${_action} -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject + route ${_action} -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject + i=1 + if test ${i} -lt ${fibs}; then + printf "Also installing reject routes for FIBs" + while test ${i} -lt ${fibs}; do + setfib -F ${i} route -q ${_action} \ + -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject + setfib -F ${i} route -q ${_action} \ + -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject + printf " %d" ${i} + i=$((i + 1)) + done + printf "\n" + fi case ${ipv6_defaultrouter} in [Nn][Oo] | '') @@ -226,14 +233,21 @@ static_inet6() # for the host case, you will allow to omit the identifiers. # Under this configuration, the packets will go to the default # interface. - i=0 - while test ${i} -lt ${fibs}; do - setfib -F ${i} route ${_action} \ - -inet6 fe80:: -prefixlen 10 ::1 -reject - setfib -F ${i} route ${_action} \ - -inet6 ff02:: -prefixlen 16 ::1 -reject - i=$((i + 1)) - done + route ${_action} -inet6 fe80:: -prefixlen 10 ::1 -reject + route ${_action} -inet6 ff02:: -prefixlen 16 ::1 -reject + i=1 + if test ${i} -lt ${fibs}; then + printf "Also installing reject routes for FIBs" + while test ${i} -lt ${fibs}; do + setfib -F ${i} route -q ${_action} \ + -inet6 fe80:: -prefixlen 10 ::1 -reject + setfib -F ${i} route -q ${_action} \ + -inet6 ff02:: -prefixlen 16 ::1 -reject + printf " %d" ${i} + i=$((i + 1)) + done + printf "\n" + fi case ${ipv6_default_interface} in '') Modified: user/attilio/vmcontention/include/Makefile ============================================================================== --- user/attilio/vmcontention/include/Makefile Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/include/Makefile Wed Mar 7 11:18:38 2012 (r232653) @@ -6,7 +6,7 @@ .include CLEANFILES= osreldate.h version vers.c -SUBDIR= arpa gssapi protocols rpcsvc rpc +SUBDIR= arpa gssapi protocols rpcsvc rpc xlocale INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ db.h \ dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \ @@ -24,7 +24,7 @@ INCS= a.out.h ar.h assert.h bitstring.h strings.h sysexits.h tar.h termios.h tgmath.h \ time.h timeconv.h timers.h ttyent.h \ ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h vis.h \ - wchar.h wctype.h wordexp.h xlocale.h _xlocale_ctype.h + wchar.h wctype.h wordexp.h xlocale.h MHDRS= float.h floatingpoint.h stdarg.h Modified: user/attilio/vmcontention/include/ctype.h ============================================================================== --- user/attilio/vmcontention/include/ctype.h Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/include/ctype.h Wed Mar 7 11:18:38 2012 (r232653) @@ -78,6 +78,10 @@ int isphonogram(int); int isrune(int); int isspecial(int); #endif + +#if __POSIX_VISIBLE >= 200809 +#include +#endif __END_DECLS #ifndef __cplusplus Modified: user/attilio/vmcontention/include/langinfo.h ============================================================================== --- user/attilio/vmcontention/include/langinfo.h Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/include/langinfo.h Wed Mar 7 11:18:38 2012 (r232653) @@ -130,6 +130,10 @@ typedef __nl_item nl_item; __BEGIN_DECLS char *nl_langinfo(nl_item); + +#if __POSIX_VISIBLE >= 200809 +#include +#endif __END_DECLS #endif /* !_LANGINFO_H_ */ Modified: user/attilio/vmcontention/include/locale.h ============================================================================== --- user/attilio/vmcontention/include/locale.h Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/include/locale.h Wed Mar 7 11:18:38 2012 (r232653) @@ -77,54 +77,11 @@ struct lconv { __BEGIN_DECLS struct lconv *localeconv(void); char *setlocale(int, const char *); -__END_DECLS #if __POSIX_VISIBLE >= 200809 - -#define LC_COLLATE_MASK (1<<0) -#define LC_CTYPE_MASK (1<<1) -#define LC_MESSAGES_MASK (1<<2) -#define LC_MONETARY_MASK (1<<3) -#define LC_NUMERIC_MASK (1<<4) -#define LC_TIME_MASK (1<<5) -#define LC_ALL_MASK (LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | \ - LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK) - -#define LC_GLOBAL_LOCALE ((locale_t)-1) - -__BEGIN_DECLS - -typedef struct _xlocale *locale_t; -/** - * Creates a new locale. - */ -locale_t newlocale(int mask, const char *locale, locale_t base); - -/** - * Returns an identical duplicate of the passed locale. The returned locale - * must be freed with freelocale(). The returned locale will share components - * with the original. - */ -locale_t duplocale(locale_t base); -/* - * Free a locale_t. This is quite a poorly named function. It actually - * disclaims a reference to a locale_t, rather than freeing it. - */ -int freelocale(locale_t loc); - -/* - * Returns the name of the locale for a particular component of a locale_t. - */ -const char *querylocale(int mask, locale_t loc); - -/* - * Installs the specified locale_t as this thread's locale. - */ -locale_t uselocale(locale_t loc); - +#include +#endif __END_DECLS -#endif /* __POSIX_VISIBLE >= 200809 */ - #endif /* _LOCALE_H_ */ Modified: user/attilio/vmcontention/include/runetype.h ============================================================================== --- user/attilio/vmcontention/include/runetype.h Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/include/runetype.h Wed Mar 7 11:18:38 2012 (r232653) @@ -85,11 +85,21 @@ typedef struct { #define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */ __BEGIN_DECLS extern const _RuneLocale _DefaultRuneLocale; -__attribute__((deprecated)) -extern _RuneLocale *_CurrentRuneLocale; -/* TODO: This is called quite a lot, so we should use a __thread variable when - * it's available. */ -extern _RuneLocale *__getCurrentRuneLocale(void); +extern const _RuneLocale *_CurrentRuneLocale; +#if defined(__NO_TLS) || defined(__RUNETYPE_INTERNAL) +extern const _RuneLocale *__getCurrentRuneLocale(void); +#else +extern _Thread_local const _RuneLocale *_ThreadRuneLocale; +static __inline const _RuneLocale *__getCurrentRuneLocale(void) +{ + + if (_ThreadRuneLocale) + return _ThreadRuneLocale; + if (_CurrentRuneLocale) + return _CurrentRuneLocale; + return &_DefaultRuneLocale; +} +#endif /* __NO_TLS || __RUNETYPE_INTERNAL */ #define _CurrentRuneLocale (__getCurrentRuneLocale()) __END_DECLS Modified: user/attilio/vmcontention/include/string.h ============================================================================== --- user/attilio/vmcontention/include/string.h Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/include/string.h Wed Mar 7 11:18:38 2012 (r232653) @@ -132,6 +132,10 @@ void swab(const void * __restrict, void #endif /* _SWAB_DECLARED */ #endif /* __BSD_VISIBLE */ + +#if __POSIX_VISIBLE >= 200809 +#include +#endif __END_DECLS #endif /* _STRING_H_ */ Modified: user/attilio/vmcontention/include/time.h ============================================================================== --- user/attilio/vmcontention/include/time.h Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/include/time.h Wed Mar 7 11:18:38 2012 (r232653) @@ -183,6 +183,10 @@ void tzsetwall(void); time_t timelocal(struct tm * const); time_t timegm(struct tm * const); #endif /* __BSD_VISIBLE */ + +#if __POSIX_VISIBLE >= 200809 +#include +#endif __END_DECLS #endif /* !_TIME_H_ */ Modified: user/attilio/vmcontention/include/wchar.h ============================================================================== --- user/attilio/vmcontention/include/wchar.h Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/include/wchar.h Wed Mar 7 11:18:38 2012 (r232653) @@ -224,6 +224,10 @@ wchar_t *fgetwln(FILE * __restrict, size size_t wcslcat(wchar_t *, const wchar_t *, size_t); size_t wcslcpy(wchar_t *, const wchar_t *, size_t); #endif + +#if __POSIX_VISIBLE >= 200809 +#include +#endif __END_DECLS #endif /* !_WCHAR_H_ */ Modified: user/attilio/vmcontention/include/wctype.h ============================================================================== --- user/attilio/vmcontention/include/wctype.h Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/include/wctype.h Wed Mar 7 11:18:38 2012 (r232653) @@ -87,6 +87,11 @@ wint_t iswrune(wint_t); wint_t iswspecial(wint_t); wint_t nextwctype(wint_t, wctype_t); #endif + +#if __POSIX_VISIBLE >= 200809 +#define _XLOCALE_WCTYPES 1 +#include +#endif /* __POSIX_VISIBLE >= 200809 */ __END_DECLS #ifndef __cplusplus Modified: user/attilio/vmcontention/include/xlocale.h ============================================================================== --- user/attilio/vmcontention/include/xlocale.h Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/include/xlocale.h Wed Mar 7 11:18:38 2012 (r232653) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 The FreeBSD Foundation + * Copyright (c) 2011, 2012 The FreeBSD Foundation * All rights reserved. * * This software was developed by David Chisnall under sponsorship from @@ -8,16 +8,16 @@ * 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. + * 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 + * 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) @@ -33,225 +33,52 @@ #define _XLOCALE_H_ #include - __BEGIN_DECLS +#include -/* - * Extended locale versions of the locale-aware functions from string.h. - * - * Include before to expose these. - */ #ifdef _STRING_H_ -int strcoll_l(const char *, const char *, locale_t); -size_t strxfrm_l(char *, const char *, size_t, locale_t); -int strcasecmp_l(const char *, const char *, locale_t); -char *strcasestr_l(const char *, const char *, locale_t); -int strncasecmp_l(const char *, const char *, size_t, locale_t); +#include #endif -/* - * Extended locale versions of the locale-aware functions from inttypes.h. - * - * Include before to expose these. - */ + #ifdef _INTTYPES_H_ -intmax_t -strtoimax_l(const char * __restrict, char ** __restrict, int, locale_t); -uintmax_t -strtoumax_l(const char * __restrict, char ** __restrict, int, locale_t); -intmax_t -wcstoimax_l(const wchar_t * __restrict, wchar_t ** __restrict, int , locale_t); -uintmax_t -wcstoumax_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); +#include #endif -/* - * Extended locale versions of the locale-aware functions from monetary.h. - * - * Include before to expose these. - */ + #ifdef _MONETARY_H_ -ssize_t strfmon_l(char *, size_t, locale_t, const char *, ...) -# if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7 - __attribute__((__format__ (__strfmon__, 4, 5))) -# endif - ; +#include #endif -/* - * Extended locale versions of the locale-aware functions from stdlib.h. - * - * Include before to expose these. - */ #ifdef _STDLIB_H_ -double atof_l(const char *, locale_t); -int atoi_l(const char *, locale_t); -long atol_l(const char *, locale_t); -long long atoll_l(const char *, locale_t); -int mblen_l(const char *, size_t, locale_t); -size_t -mbstowcs_l(wchar_t * __restrict, const char * __restrict, size_t, locale_t); -int -mbtowc_l(wchar_t * __restrict, const char * __restrict, size_t, locale_t); -double strtod_l(const char *, char **, locale_t); -float strtof_l(const char *, char **, locale_t); -long strtol_l(const char *, char **, int, locale_t); -long double strtold_l(const char *, char **, locale_t); -long long strtoll_l(const char *, char **, int, locale_t); -unsigned long strtoul_l(const char *, char **, int, locale_t); -unsigned long long strtoull_l(const char *, char **, int, locale_t); -size_t -wcstombs_l(char * __restrict, const wchar_t * __restrict, size_t, locale_t); -int wctomb_l(char *, wchar_t, locale_t); - -int ___mb_cur_max_l(locale_t); -#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) - +#include #endif -/* - * Extended locale versions of the locale-aware functions from time.h. - * - * Include before to expose these. - */ + #ifdef _TIME_H_ -size_t -strftime_l(char * __restrict, size_t, const char * __restrict, const - struct tm * __restrict, locale_t) -# if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7 - __attribute__((__format__ (__strftime__, 3, 0))) -# endif - ; -char * -strptime_l(const char * __restrict, const char * __restrict, - struct tm * __restrict, locale_t); +#include #endif + #ifdef _LANGINFO_H_ -char *nl_langinfo_l(nl_item, locale_t); +#include #endif + #ifdef _CTYPE_H_ -#include <_xlocale_ctype.h> +#include #endif + #ifdef _WCTYPE_H_ -#define XLOCALE_WCTYPES 1 -#include <_xlocale_ctype.h> +#define _XLOCALE_WCTYPES 1 +#include #endif #ifdef _STDIO_H_ -int fprintf_l(FILE * __restrict, locale_t, const char * __restrict, ...) - __printflike(3, 4); -int fscanf_l(FILE * __restrict, locale_t, const char * __restrict, ...) - __scanflike(3, 4); -int printf_l(locale_t, const char * __restrict, ...) __printflike(2, 3); -int scanf_l(locale_t, const char * __restrict, ...) __scanflike(2, 3); -int sprintf_l(char * __restrict, locale_t, const char * __restrict, ...) - __printflike(3, 4); -int sscanf_l(const char * __restrict, locale_t, const char * __restrict, ...) - __scanflike(3, 4); -int vfprintf_l(FILE * __restrict, locale_t, const char * __restrict, __va_list) - __printflike(3, 0); -int vprintf_l(locale_t, const char * __restrict, __va_list) __printflike(2, 0); -int vsprintf_l(char * __restrict, locale_t, const char * __restrict, __va_list) - __printflike(3, 0); - -int snprintf_l(char * __restrict, size_t, locale_t, const char * __restrict, - ...) __printflike(4, 5); -int vfscanf_l(FILE * __restrict, locale_t, const char * __restrict, __va_list) - __scanflike(3, 0); -int vscanf_l(locale_t, const char * __restrict, __va_list) __scanflike(2, 0); -int vsnprintf_l(char * __restrict, size_t, locale_t, const char * __restrict, - __va_list) __printflike(4, 0); -int vsscanf_l(const char * __restrict, locale_t, const char * __restrict, - __va_list) __scanflike(3, 0); -int dprintf_l(int, locale_t, const char * __restrict, ...) __printflike(3, 4); -int vdprintf_l(int, locale_t, const char * __restrict, __va_list) - __printflike(3, 0); -int asprintf_l(char **, locale_t, const char *, ...) __printflike(3, 4); -int vasprintf_l(char **, locale_t, const char *, __va_list) __printflike(3, 0); +#include #endif -#ifdef _WCHAR_H_ -wint_t btowc_l(int, locale_t); -wint_t fgetwc_l(FILE *, locale_t); -wchar_t * -fgetws_l(wchar_t * __restrict, int, FILE * __restrict, locale_t); -wint_t fputwc_l(wchar_t, FILE *, locale_t); -int -fputws_l(const wchar_t * __restrict, FILE * __restrict, locale_t); -int -fwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, - ...); -int -fwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, ...); -wint_t getwc_l(FILE *, locale_t); -wint_t getwchar_l(locale_t); -size_t -mbrlen_l(const char * __restrict, size_t, mbstate_t * __restrict, locale_t); -size_t -mbrtowc_l(wchar_t * __restrict, const char * __restrict, size_t, - mbstate_t * __restrict, locale_t); -int mbsinit_l(const mbstate_t *, locale_t); -size_t -mbsrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t, - mbstate_t * __restrict, locale_t); -wint_t putwc_l(wchar_t, FILE *, locale_t); -wint_t putwchar_l(wchar_t, locale_t); -int -swprintf_l(wchar_t * __restrict, size_t n, locale_t, - const wchar_t * __restrict, ...); -int -swscanf_l(const wchar_t * __restrict, locale_t, const wchar_t * __restrict, - ...); -wint_t ungetwc_l(wint_t, FILE *, locale_t); -int -vfwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, - __va_list); -int -vswprintf_l(wchar_t * __restrict, size_t n, locale_t, - const wchar_t * __restrict, __va_list); -int vwprintf_l(locale_t, const wchar_t * __restrict, __va_list); -size_t -wcrtomb_l(char * __restrict, wchar_t, mbstate_t * __restrict, locale_t); -int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); -size_t -wcsftime_l(wchar_t * __restrict, size_t, const wchar_t * __restrict, - const struct tm * __restrict, locale_t); -size_t -wcsrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t, - mbstate_t * __restrict, locale_t); -double wcstod_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); -long -wcstol_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); -unsigned long -wcstoul_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); -int wcswidth_l(const wchar_t *, size_t, locale_t); -size_t -wcsxfrm_l(wchar_t * __restrict, const wchar_t * __restrict, size_t, locale_t); -int wctob_l(wint_t, locale_t); -int wcwidth_l(wchar_t, locale_t); -int wprintf_l(locale_t, const wchar_t * __restrict, ...); -int wscanf_l(locale_t, const wchar_t * __restrict, ...); - -int -vfwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, - __va_list); -int vswscanf_l(const wchar_t * __restrict, locale_t, -const wchar_t *__restrict, __va_list); -int vwscanf_l(locale_t, const wchar_t * __restrict, __va_list); -float wcstof_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); -long double -wcstold_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); -long long -wcstoll_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); -unsigned long long -wcstoull_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); -size_t -mbsnrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t, size_t, - mbstate_t * __restrict, locale_t); -int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t); -int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, locale_t); -size_t -wcsnrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t, size_t, - mbstate_t * __restrict, locale_t); +#ifdef _WCHAR_H_ +#include #endif + + struct lconv *localeconv_l(locale_t); __END_DECLS Modified: user/attilio/vmcontention/lib/csu/mips/crt1.c ============================================================================== --- user/attilio/vmcontention/lib/csu/mips/crt1.c Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/lib/csu/mips/crt1.c Wed Mar 7 11:18:38 2012 (r232653) @@ -47,10 +47,8 @@ __FBSDID("$FreeBSD$"); struct Struct_Obj_Entry; struct ps_strings; -#ifndef NOSHARED extern int _DYNAMIC; #pragma weak _DYNAMIC -#endif extern void _init(void); extern void _fini(void); @@ -91,10 +89,11 @@ __start(char **ap, __progname = s + 1; } -#ifndef NOSHARED if (&_DYNAMIC != NULL) atexit(cleanup); -#endif + else + _init_tls(); + #ifdef GCRT atexit(_mcleanup); #endif @@ -102,9 +101,7 @@ __start(char **ap, #ifdef GCRT monstartup(&eprol, &etext); #endif -#ifndef NOGPREL _init(); -#endif exit( main(argc, argv, env) ); } Modified: user/attilio/vmcontention/lib/libc/arm/Symbol.map ============================================================================== --- user/attilio/vmcontention/lib/libc/arm/Symbol.map Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/lib/libc/arm/Symbol.map Wed Mar 7 11:18:38 2012 (r232653) @@ -40,6 +40,7 @@ FBSDprivate_1.0 { __sys_exit; _set_tp; + __aeabi_read_tp; ___longjmp; __umodsi3; __modsi3; Modified: user/attilio/vmcontention/lib/libc/gen/Makefile.inc ============================================================================== --- user/attilio/vmcontention/lib/libc/gen/Makefile.inc Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/lib/libc/gen/Makefile.inc Wed Mar 7 11:18:38 2012 (r232653) @@ -54,7 +54,7 @@ SYM_MAPS+=${.CURDIR}/gen/Symbol.map MAN+= alarm.3 arc4random.3 \ basename.3 check_utility_compat.3 clock.3 \ confstr.3 ctermid.3 daemon.3 devname.3 directory.3 dirname.3 \ - dladdr.3 dlinfo.3 dllockinit.3 dlopen.3 \ + dl_iterate_phdr.3 dladdr.3 dlinfo.3 dllockinit.3 dlopen.3 \ err.3 exec.3 \ feature_present.3 fmtcheck.3 fmtmsg.3 fnmatch.3 fpclassify.3 frexp.3 \ ftok.3 fts.3 ftw.3 \ Modified: user/attilio/vmcontention/lib/libc/gen/closedir.c ============================================================================== --- user/attilio/vmcontention/lib/libc/gen/closedir.c Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/lib/libc/gen/closedir.c Wed Mar 7 11:18:38 2012 (r232653) @@ -48,14 +48,12 @@ __FBSDID("$FreeBSD$"); * close a directory. */ int -closedir(dirp) - DIR *dirp; +closedir(DIR *dirp) { int fd; if (__isthreaded) _pthread_mutex_lock(&dirp->dd_lock); - _seekdir(dirp, dirp->dd_rewind); /* free seekdir storage */ fd = dirp->dd_fd; dirp->dd_fd = -1; dirp->dd_loc = 0; Modified: user/attilio/vmcontention/lib/libc/gen/opendir.c ============================================================================== --- user/attilio/vmcontention/lib/libc/gen/opendir.c Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/lib/libc/gen/opendir.c Wed Mar 7 11:18:38 2012 (r232653) @@ -66,7 +66,17 @@ opendir(const char *name) DIR * fdopendir(int fd) { + struct stat statb; + /* Check that fd is associated with a directory. */ + if (_fstat(fd, &statb) != 0) + return (NULL); + if (!S_ISDIR(statb.st_mode)) { + errno = ENOTDIR; + return (NULL); + } + if (_fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) + return (NULL); return (__opendir_common(fd, NULL, DTF_HIDEW|DTF_NODUP)); } @@ -74,21 +84,11 @@ DIR * __opendir2(const char *name, int flags) { int fd; - struct stat statb; DIR *dir; int saved_errno; - /* - * stat() before _open() because opening of special files may be - * harmful. - */ - if (stat(name, &statb) != 0) - return (NULL); - if (!S_ISDIR(statb.st_mode)) { - errno = ENOTDIR; - return (NULL); - } - if ((fd = _open(name, O_RDONLY | O_NONBLOCK | O_DIRECTORY)) == -1) + if ((fd = _open(name, + O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC)) == -1) return (NULL); dir = __opendir_common(fd, name, flags); @@ -119,19 +119,9 @@ __opendir_common(int fd, const char *nam int saved_errno; int unionstack; int fd2; - struct stat statb; - dirp = NULL; - /* _fstat() the open handler because the file may have changed. */ - if (_fstat(fd, &statb) != 0) - goto fail; - if (!S_ISDIR(statb.st_mode)) { - errno = ENOTDIR; - goto fail; - } - if (_fcntl(fd, F_SETFD, FD_CLOEXEC) == -1 || - (dirp = malloc(sizeof(DIR) + sizeof(struct _telldir))) == NULL) - goto fail; + if ((dirp = malloc(sizeof(DIR) + sizeof(struct _telldir))) == NULL) + return (NULL); dirp->dd_td = (struct _telldir *)((char *)dirp + sizeof(DIR)); LIST_INIT(&dirp->dd_td->td_locq); Modified: user/attilio/vmcontention/lib/libc/gen/tls.c ============================================================================== --- user/attilio/vmcontention/lib/libc/gen/tls.c Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/lib/libc/gen/tls.c Wed Mar 7 11:18:38 2012 (r232653) @@ -66,11 +66,11 @@ void __libc_free_tls(void *tls, size_t t #error TLS_TCB_ALIGN undefined for target architecture #endif -#if defined(__ia64__) || defined(__powerpc__) +#if defined(__arm__) || defined(__ia64__) || defined(__mips__) || \ + defined(__powerpc__) #define TLS_VARIANT_I #endif -#if defined(__i386__) || defined(__amd64__) || defined(__sparc64__) || \ - defined(__arm__) || defined(__mips__) +#if defined(__i386__) || defined(__amd64__) || defined(__sparc64__) #define TLS_VARIANT_II #endif @@ -308,6 +308,13 @@ _init_tls() } } +#ifdef TLS_VARIANT_I + /* + * tls_static_space should include space for TLS structure + */ + tls_static_space += TLS_TCB_SIZE; +#endif + tls = _rtld_allocate_tls(NULL, TLS_TCB_SIZE, TLS_TCB_ALIGN); _set_tp(tls); Modified: user/attilio/vmcontention/lib/libc/locale/Symbol.map ============================================================================== --- user/attilio/vmcontention/lib/libc/locale/Symbol.map Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/lib/libc/locale/Symbol.map Wed Mar 7 11:18:38 2012 (r232653) @@ -194,6 +194,7 @@ FBSD_1.3 { wcstoull_l; wcstoumax_l; __runes_for_locale; + _ThreadRuneLocale; }; FBSDprivate_1.0 { Modified: user/attilio/vmcontention/lib/libc/locale/collate.c ============================================================================== --- user/attilio/vmcontention/lib/libc/locale/collate.c Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/lib/libc/locale/collate.c Wed Mar 7 11:18:38 2012 (r232653) @@ -8,11 +8,6 @@ * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * - * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. - * Portions of this software were developed by David Chisnall - * under sponsorship from the FreeBSD Foundation. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: user/attilio/vmcontention/lib/libc/locale/nomacros.c ============================================================================== --- user/attilio/vmcontention/lib/libc/locale/nomacros.c Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/lib/libc/locale/nomacros.c Wed Mar 7 11:18:38 2012 (r232653) @@ -9,4 +9,10 @@ __FBSDID("$FreeBSD$"); */ #define _EXTERNALIZE_CTYPE_INLINES_ +/* + * Also make sure does not generate an inline definition + * of __getCurrentRuneLocale(). + */ +#define __RUNETYPE_INTERNAL + #include Modified: user/attilio/vmcontention/lib/libc/locale/setrunelocale.c ============================================================================== --- user/attilio/vmcontention/lib/libc/locale/setrunelocale.c Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/lib/libc/locale/setrunelocale.c Wed Mar 7 11:18:38 2012 (r232653) @@ -38,6 +38,8 @@ #include __FBSDID("$FreeBSD$"); +#define __RUNETYPE_INTERNAL 1 + #include #include #include @@ -50,6 +52,15 @@ __FBSDID("$FreeBSD$"); #include "mblocal.h" #include "setlocale.h" +#undef _CurrentRuneLocale +extern _RuneLocale const *_CurrentRuneLocale; +#ifndef __NO_TLS +/* + * A cached version of the runes for this thread. Used by ctype.h + */ +_Thread_local const _RuneLocale *_ThreadRuneLocale; +#endif + extern int __mb_sb_limit; extern _RuneLocale *_Read_RuneMagi(FILE *); @@ -72,7 +83,8 @@ static void destruct_ctype(void *v) free(l->runes); free(l); } -_RuneLocale *__getCurrentRuneLocale(void) + +const _RuneLocale *__getCurrentRuneLocale(void) { return XLOCALE_CTYPE(__get_locale())->runes; } @@ -168,9 +180,24 @@ __wrap_setrunelocale(const char *locale) } __mb_cur_max = __xlocale_global_ctype.__mb_cur_max; __mb_sb_limit = __xlocale_global_ctype.__mb_sb_limit; + _CurrentRuneLocale = __xlocale_global_ctype.runes; return (_LDP_LOADED); } -void *__ctype_load(const char *locale, locale_t unused) + +#ifndef __NO_TLS +void +__set_thread_rune_locale(locale_t loc) { + + if (loc == NULL) { + _ThreadRuneLocale = &_DefaultRuneLocale; + } else { + _ThreadRuneLocale = XLOCALE_CTYPE(loc)->runes; + } +} +#endif + +void * +__ctype_load(const char *locale, locale_t unused) { struct xlocale_ctype *l = calloc(sizeof(struct xlocale_ctype), 1); l->header.header.destructor = destruct_ctype; Modified: user/attilio/vmcontention/lib/libc/locale/table.c ============================================================================== --- user/attilio/vmcontention/lib/libc/locale/table.c Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/lib/libc/locale/table.c Wed Mar 7 11:18:38 2012 (r232653) @@ -251,7 +251,7 @@ const _RuneLocale _DefaultRuneLocale = { }; #undef _CurrentRuneLocale -_RuneLocale *_CurrentRuneLocale = (_RuneLocale*)&_DefaultRuneLocale; +const _RuneLocale *_CurrentRuneLocale = &_DefaultRuneLocale; _RuneLocale * __runes_for_locale(locale_t locale, int *mb_sb_limit) Modified: user/attilio/vmcontention/lib/libc/locale/xlocale.c ============================================================================== --- user/attilio/vmcontention/lib/libc/locale/xlocale.c Wed Mar 7 11:13:18 2012 (r232652) +++ user/attilio/vmcontention/lib/libc/locale/xlocale.c Wed Mar 7 11:18:38 2012 (r232653) @@ -6,17 +6,18 @@ * the FreeBSD Foundation. * * 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. + * 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 + * 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) @@ -31,6 +32,7 @@ #include #include #include +#include #include "libc_private.h" #include "xlocale_private.h" @@ -50,6 +52,17 @@ extern struct xlocale_component __xlocal */ extern struct xlocale_component __xlocale_C_collate; extern struct xlocale_component __xlocale_C_ctype; + +#ifndef __NO_TLS +/* + * The locale for this thread. + */ +_Thread_local locale_t __thread_locale; +#endif +/* + * Flag indicating that one or more per-thread locales exist. + */ +int __has_thread_locale; /* * Private functions in setlocale.c. */ @@ -103,6 +116,7 @@ static locale_t thread_local_locale; static void init_key(void) { + pthread_key_create(&locale_info_key, xlocale_release); pthread_setspecific(locale_info_key, (void*)42); if (pthread_getspecific(locale_info_key) == (void*)42) { @@ -110,6 +124,8 @@ static void init_key(void) } else { fake_tls = 1; } + /* At least one per-thread locale has now been set. */ + __has_thread_locale = 1; __detect_path_locale(); } @@ -118,12 +134,14 @@ static pthread_once_t once_control = PTH static locale_t get_thread_locale(void) { + _once(&once_control, init_key); return (fake_tls ? thread_local_locale : pthread_getspecific(locale_info_key)); } +#ifdef __NO_TLS locale_t __get_locale(void) { @@ -131,11 +149,13 @@ __get_locale(void) return (l ? l : &__xlocale_global_locale); } +#endif static void set_thread_locale(locale_t loc) { - pthread_once(&once_control, init_key); + + _once(&once_control, init_key); if (NULL != loc) { xlocale_retain((struct xlocale_refcounted*)loc); @@ -149,6 +169,10 @@ set_thread_locale(locale_t loc) } else { pthread_setspecific(locale_info_key, loc); } +#ifndef __NO_TLS + __thread_locale = loc; + __set_thread_rune_locale(loc); +#endif } /** @@ -159,6 +183,7 @@ static void destruct_locale(void *l) { locale_t loc = l; + for (int type=0 ; typecomponents[type]) { xlocale_release(loc->components[type]); @@ -177,6 +202,7 @@ static locale_t alloc_locale(void) { locale_t new = calloc(sizeof(struct _xlocale), 1); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Sat Mar 10 20:15:41 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 89E24106566B; Sat, 10 Mar 2012 20:15:41 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C60C8FC0A; Sat, 10 Mar 2012 20:15:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AKFfAk076524; Sat, 10 Mar 2012 20:15:41 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AKFf0J076523; Sat, 10 Mar 2012 20:15:41 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203102015.q2AKFf0J076523@svn.freebsd.org> From: Juli Mallett Date: Sat, 10 Mar 2012 20:15:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232796 - user/jmallett/octeon X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 10 Mar 2012 20:15:41 -0000 Author: jmallett Date: Sat Mar 10 20:15:40 2012 New Revision: 232796 URL: http://svn.freebsd.org/changeset/base/232796 Log: Remove my personal Octeon branch, which is on the order of a year and a half without update. Deleted: user/jmallett/octeon/