svn commit: r228730 - head/lib/libradius

2011-12-20 Thread Alexander V. Chernikov
Author: melifaro
Date: Tue Dec 20 11:13:44 2011
New Revision: 228730
URL: http://svn.freebsd.org/changeset/base/228730

Log:
  Add binding support to libradius(3).
  
  Submitted by:Sergey Matveychuk se...@yandex-team.ru
  Approved by: ae (mentor)
  MFC after:   2 weeks

Modified:
  head/lib/libradius/Makefile
  head/lib/libradius/libradius.3
  head/lib/libradius/radlib.c
  head/lib/libradius/radlib.h
  head/lib/libradius/radlib_private.h

Modified: head/lib/libradius/Makefile
==
--- head/lib/libradius/Makefile Tue Dec 20 03:25:11 2011(r228729)
+++ head/lib/libradius/Makefile Tue Dec 20 11:13:44 2011(r228730)
@@ -36,6 +36,7 @@ MAN=  libradius.3 radius.conf.5
 MLINKS+=libradius.3 rad_acct_open.3 \
libradius.3 rad_add_server.3 \
libradius.3 rad_auth_open.3 \
+   libradius.3 rad_bind_to.3 \
libradius.3 rad_close.3 \
libradius.3 rad_config.3 \
libradius.3 rad_continue_send_request.3 \

Modified: head/lib/libradius/libradius.3
==
--- head/lib/libradius/libradius.3  Tue Dec 20 03:25:11 2011
(r228729)
+++ head/lib/libradius/libradius.3  Tue Dec 20 11:13:44 2011
(r228730)
@@ -91,6 +91,8 @@
 .Fn rad_server_open int fd
 .Ft const char *
 .Fn rad_server_secret struct rad_handle *h
+.Ft void
+.Fn rad_bind_to struct rad_handle *h in_addr_t addr
 .Ft u_char *
 .Fn rad_demangle struct rad_handle *h const void *mangled size_t mlen
 .Ft u_char *
@@ -431,6 +433,10 @@ returns the secret shared with the curre
 supplied rad_handle.
 .Pp
 The
+.Fn rad_bind_to
+assigns a source address for all requests to the current RADIUS server.
+.Pp
+The
 .Fn rad_demangle
 function demangles attributes containing passwords and MS-CHAPv1 MPPE-Keys.
 The return value is

Modified: head/lib/libradius/radlib.c
==
--- head/lib/libradius/radlib.c Tue Dec 20 03:25:11 2011(r228729)
+++ head/lib/libradius/radlib.c Tue Dec 20 11:13:44 2011(r228730)
@@ -756,9 +756,16 @@ rad_create_request(struct rad_handle *h,
clear_password(h);
h-authentic_pos = 0;
h-out_created = 1;
+   h-bindto = INADDR_ANY;
return 0;
 }
 
+void
+rad_bind_to(struct rad_handle *h, in_addr_t addr)
+{
+h-bindto = addr;
+}
+
 int
 rad_create_response(struct rad_handle *h, int code)
 {
@@ -857,7 +864,7 @@ rad_init_send_request(struct rad_handle 
memset(sin, 0, sizeof sin);
sin.sin_len = sizeof sin;
sin.sin_family = AF_INET;
-   sin.sin_addr.s_addr = INADDR_ANY;
+   sin.sin_addr.s_addr = h-bindto;
sin.sin_port = htons(0);
if (bind(h-fd, (const struct sockaddr *)sin,
sizeof sin) == -1) {

Modified: head/lib/libradius/radlib.h
==
--- head/lib/libradius/radlib.h Tue Dec 20 03:25:11 2011(r228729)
+++ head/lib/libradius/radlib.h Tue Dec 20 11:13:44 2011(r228730)
@@ -195,6 +195,7 @@ struct rad_handle   *rad_acct_open(void);
 int rad_add_server(struct rad_handle *,
const char *, int, const char *, int, int);
 struct rad_handle  *rad_auth_open(void);
+voidrad_bind_to(struct rad_handle *, in_addr_t);
 voidrad_close(struct rad_handle *);
 int rad_config(struct rad_handle *, const char *);
 int rad_continue_send_request(struct rad_handle *, int,

Modified: head/lib/libradius/radlib_private.h
==
--- head/lib/libradius/radlib_private.h Tue Dec 20 03:25:11 2011
(r228729)
+++ head/lib/libradius/radlib_private.h Tue Dec 20 11:13:44 2011
(r228730)
@@ -92,6 +92,7 @@ struct rad_handle {
int  try;   /* How many requests we've sent */
int  srv;   /* Server number we did last */
int  type;  /* Handle type */
+   in_addr_tbindto;/* Bind to address */
 };
 
 struct vendor_attribute {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228731 - in head/share/man: man4 man9

2011-12-20 Thread Alexander Motin
Author: mav
Date: Tue Dec 20 11:40:22 2011
New Revision: 228731
URL: http://svn.freebsd.org/changeset/base/228731

Log:
  Add eventtimers(9) man page, describing related KPIs.
  
  Sponsored by: iXsystems, Inc.
  MFC after:1 month

Added:
  head/share/man/man9/eventtimers.9   (contents, props changed)
Modified:
  head/share/man/man4/eventtimers.4
  head/share/man/man9/Makefile

Modified: head/share/man/man4/eventtimers.4
==
--- head/share/man/man4/eventtimers.4   Tue Dec 20 11:13:44 2011
(r228730)
+++ head/share/man/man4/eventtimers.4   Tue Dec 20 11:40:22 2011
(r228731)
@@ -147,4 +147,5 @@ always generating.
 .Sh SEE ALSO
 .Xr atrtc 4 ,
 .Xr attimer 4 ,
-.Xr hpet 4
+.Xr hpet 4 ,
+.Xr eventtimers 9

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileTue Dec 20 11:13:44 2011
(r228730)
+++ head/share/man/man9/MakefileTue Dec 20 11:40:22 2011
(r228731)
@@ -102,6 +102,7 @@ MAN=accept_filter.9 \
driver.9 \
DRIVER_MODULE.9 \
EVENTHANDLER.9 \
+   eventtimers.9 \
extattr.9 \
fail.9 \
fetch.9 \
@@ -614,6 +615,16 @@ MLINKS+=EVENTHANDLER.9 EVENTHANDLER_DECL
EVENTHANDLER.9 eventhandler_prune_list.9 \
EVENTHANDLER.9 EVENTHANDLER_REGISTER.9 \
EVENTHANDLER.9 eventhandler_register.9
+MLINKS+=eventtimers.9 et_register.9 \
+   eventtimers.9 et_deregister.9 \
+   eventtimers.9 et_ban.9 \
+   eventtimers.9 et_find.9 \
+   eventtimers.9 et_free.9 \
+   eventtimers.9 et_init.9 \
+   eventtimers.9 ET_LOCK.9 \
+   eventtimers.9 ET_UNLOCK.9 \
+   eventtimers.9 et_start.9 \
+   eventtimers.9 et_stop.9
 MLINKS+=fetch.9 fubyte.9 \
fetch.9 fuswintr.9 \
fetch.9 fuword.9 \

Added: head/share/man/man9/eventtimers.9
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man9/eventtimers.9   Tue Dec 20 11:40:22 2011
(r228731)
@@ -0,0 +1,236 @@
+.\
+.\ Copyright (c) 2011 Alexander Motin m...@freebsd.org
+.\ All rights reserved.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\
+.\ $FreeBSD$
+.\
+.Dd December 14, 2011
+.Dt EVENTTIMERS 9
+.Os
+.Sh NAME
+.Nm eventtimers
+.Nd kernel event timers subsystem
+.Sh SYNOPSIS
+.In sys/timeet.h
+.Bd -literal
+struct eventtimer;
+
+typedef int et_start_t(struct eventtimer *et,
+struct bintime *first, struct bintime *period);
+typedef int et_stop_t(struct eventtimer *et);
+typedef void et_event_cb_t(struct eventtimer *et, void *arg);
+typedef int et_deregister_cb_t(struct eventtimer *et, void *arg);
+
+struct eventtimer {
+   SLIST_ENTRY(eventtimer) et_all;
+   char*et_name;
+   int et_flags;
+#define ET_FLAGS_PERIODIC  1
+#define ET_FLAGS_ONESHOT   2
+#define ET_FLAGS_PERCPU4
+#define ET_FLAGS_C3STOP8
+#define ET_FLAGS_POW2DIV   16
+   int et_quality;
+   int et_active;
+   u_int64_t   et_frequency;
+   struct bintime  et_min_period;
+   struct bintime  et_max_period;
+   et_start_t  *et_start;
+   et_stop_t   *et_stop;
+   et_event_cb_t   *et_event_cb;
+   et_deregister_cb_t  *et_deregister_cb;
+   void*et_arg;
+   void*et_priv;
+   struct sysctl_oid   *et_sysctl;
+};
+.Ed
+.Ft int
+.Fn et_register struct eventtimer *et
+.Ft int

svn commit: r228732 - head/sys/contrib/pf/net

2011-12-20 Thread Gleb Smirnoff
Author: glebius
Date: Tue Dec 20 12:34:16 2011
New Revision: 228732
URL: http://svn.freebsd.org/changeset/base/228732

Log:
  - Cover pfsync callouts deletion with PF_LOCK().
  - Cover setting up interface between pf and pfsync with PF_LOCK().

Modified:
  head/sys/contrib/pf/net/if_pfsync.c

Modified: head/sys/contrib/pf/net/if_pfsync.c
==
--- head/sys/contrib/pf/net/if_pfsync.c Tue Dec 20 11:40:22 2011
(r228731)
+++ head/sys/contrib/pf/net/if_pfsync.c Tue Dec 20 12:34:16 2011
(r228732)
@@ -539,9 +539,13 @@ pfsync_clone_destroy(struct ifnet *ifp)
 
 #ifdef __FreeBSD__
EVENTHANDLER_DEREGISTER(ifnet_departure_event, sc-sc_detachtag);
+   PF_LOCK();
 #endif
-   timeout_del(sc-sc_bulk_tmo);  /* XXX: need PF_LOCK() before */
+   timeout_del(sc-sc_bulk_tmo);
timeout_del(sc-sc_tmo);
+#ifdef __FreeBSD__
+   PF_UNLOCK();
+#endif
 #if NCARP  0
 #ifdef notyet
 #ifdef __FreeBSD__
@@ -3392,6 +3396,7 @@ vnet_pfsync_init(const void *unused)
if (error)
panic(%s: swi_add %d, __func__, error);
 
+   PF_LOCK();
pfsync_state_import_ptr = pfsync_state_import;
pfsync_up_ptr = pfsync_up;
pfsync_insert_state_ptr = pfsync_insert_state;
@@ -3400,6 +3405,7 @@ vnet_pfsync_init(const void *unused)
pfsync_clear_states_ptr = pfsync_clear_states;
pfsync_state_in_use_ptr = pfsync_state_in_use;
pfsync_defer_ptr = pfsync_defer;
+   PF_UNLOCK();
 
return (0);
 }
@@ -3410,6 +3416,7 @@ vnet_pfsync_uninit(const void *unused)
 
swi_remove(pfsync_swi.pfsync_swi_cookie);
 
+   PF_LOCK();
pfsync_state_import_ptr = NULL;
pfsync_up_ptr = NULL;
pfsync_insert_state_ptr = NULL;
@@ -3418,6 +3425,7 @@ vnet_pfsync_uninit(const void *unused)
pfsync_clear_states_ptr = NULL;
pfsync_state_in_use_ptr = NULL;
pfsync_defer_ptr = NULL;
+   PF_UNLOCK();
 
if_clone_detach(pfsync_cloner);
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228733 - head/usr.sbin/makefs/ffs

2011-12-20 Thread Ed Schouten
Author: ed
Date: Tue Dec 20 12:34:17 2011
New Revision: 228733
URL: http://svn.freebsd.org/changeset/base/228733

Log:
  Small cleanups to panic() prototype.
  
  - Let panic() use _Noreturn and __printflike() instead of GCC-specific
attributes.
  - Remove prototype from ffs_subr.c and let it include ffs_extern.h.
  - Forward declare struct inode to make ffs_extern.h not depend on it.

Modified:
  head/usr.sbin/makefs/ffs/ffs_extern.h
  head/usr.sbin/makefs/ffs/ffs_subr.c

Modified: head/usr.sbin/makefs/ffs/ffs_extern.h
==
--- head/usr.sbin/makefs/ffs/ffs_extern.h   Tue Dec 20 12:34:16 2011
(r228732)
+++ head/usr.sbin/makefs/ffs/ffs_extern.h   Tue Dec 20 12:34:17 2011
(r228733)
@@ -35,6 +35,8 @@
 
 #include ffs/buf.h
 
+struct inode;
+
 /*
  * Structure used to pass around logical block paths generated by
  * ufs_getlbns and used by truncate and bmap code.
@@ -46,8 +48,7 @@ struct indir {
 };
 
/* ffs.c */
-void panic(const char *, ...)
-__attribute__((__noreturn__,__format__(__printf__,1,2)));  
+_Noreturn void panic(const char *, ...) __printflike(1, 2);
 
/* ffs_alloc.c */
 int ffs_alloc(struct inode *, daddr_t, daddr_t, int, daddr_t *);

Modified: head/usr.sbin/makefs/ffs/ffs_subr.c
==
--- head/usr.sbin/makefs/ffs/ffs_subr.c Tue Dec 20 12:34:16 2011
(r228732)
+++ head/usr.sbin/makefs/ffs/ffs_subr.c Tue Dec 20 12:34:17 2011
(r228733)
@@ -38,11 +38,9 @@ __FBSDID($FreeBSD$);
 
 #include ufs/ufs/dinode.h
 #include ufs/ffs/fs.h
+#include ffs/ffs_extern.h
 #include ffs/ufs_bswap.h
 
-voidpanic __P((const char *, ...))
-__attribute__((__noreturn__,__format__(__printf__,1,2)));
-
 /*
  * Update the frsum fields to reflect addition or deletion 
  * of some frags.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228734 - head/contrib/pf/man

2011-12-20 Thread Gleb Smirnoff
Author: glebius
Date: Tue Dec 20 13:32:56 2011
New Revision: 228734
URL: http://svn.freebsd.org/changeset/base/228734

Log:
  - Fix examples to show new CARP style.
  - Remove OpenBSDisms, add FreeBSDisms.

Modified:
  head/contrib/pf/man/pfsync.4

Modified: head/contrib/pf/man/pfsync.4
==
--- head/contrib/pf/man/pfsync.4Tue Dec 20 12:34:17 2011
(r228733)
+++ head/contrib/pf/man/pfsync.4Tue Dec 20 13:32:56 2011
(r228734)
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd February 17 2009
+.Dd December 20 2011
 .Dt PFSYNC 4
 .Os
 .Sh NAME
@@ -141,12 +141,11 @@ Interfaces configuration in
 .Pa /etc/rc.conf :
 .Bd -literal -offset indent
 network_interfaces=lo0 sis0 sis1 sis2
-cloned_interfaces=carp0 carp1
 ifconfig_sis0=10.0.0.254/24
+ifconfig_sis0_alias0=inet 10.0.0.1/24 vhid 1 pass foo
 ifconfig_sis1=192.168.0.254/24
+ifconfig_sis1_alias0=inet 192.168.0.1/24 vhid 2 pass bar
 ifconfig_sis2=192.168.254.254/24
-ifconfig_carp0=vhid 1 pass foo 10.0.0.1/24
-ifconfig_carp1=vhid 2 pass bar 192.168.0.1/24
 pfsync_enable=YES
 pfsync_syncdev=sis2
 .Ed
@@ -169,13 +168,13 @@ therefore the
 .Ar advskew
 on the backup firewall's
 .Xr carp 4
-interfaces should be set to something higher than
+vhids should be set to something higher than
 the primary's.
 For example, if firewall B is the backup, its
 carp1 configuration would look like this:
 would look like this:
 .Bd -literal -offset indent
-ifconfig_carp1=vhid 2 pass bar advskew 100 192.168.0.1/24
+ifconfig_sis1_alias0=inet 192.168.0.1/24 vhid 2 pass bar advskew 100
 .Ed
 .Pp
 The following must also be added to
@@ -196,18 +195,18 @@ net.inet.carp.preempt=1
 .Xr protocols 5 ,
 .Xr rc.conf 5 ,
 .Xr ifconfig 8 ,
-.Xr ifstated 8 ,
 .Xr tcpdump 1
 .Sh HISTORY
 The
 .Nm
 device first appeared in
 .Ox 3.3 .
+It was first imported to
+.Fx 5.3 .
 .Pp
 The
 .Nm
-protocol and kernel implementation were significantly modified between
-.Ox 4.4
-and
-.Ox 4.5 .
-The two protocols are incompatible and will not interoperate.
+protocol and kernel implementation were significantly modified in
+.Fx 9.0 .
+The newer protocol is not compatible with older one and will not interoperate
+with it.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228735 - head/share/man/man4

2011-12-20 Thread Alexander Motin
Author: mav
Date: Tue Dec 20 13:49:52 2011
New Revision: 228735
URL: http://svn.freebsd.org/changeset/base/228735

Log:
  Add apic(4) man page, now mostly to cover its event timer functionality.

Added:
  head/share/man/man4/apic.4   (contents, props changed)
Modified:
  head/share/man/man4/Makefile
  head/share/man/man4/atrtc.4
  head/share/man/man4/attimer.4
  head/share/man/man4/eventtimers.4
  head/share/man/man4/hpet.4

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileTue Dec 20 13:32:56 2011
(r228734)
+++ head/share/man/man4/MakefileTue Dec 20 13:49:52 2011
(r228735)
@@ -38,6 +38,7 @@ MAN=  aac.4 \
${_amdtemp.4} \
amr.4 \
an.4 \
+   ${_apic.4} \
arcmsr.4 \
${_asmc.4} \
asr.4 \
@@ -673,6 +674,7 @@ _acpi_sony.4=   acpi_sony.4
 _acpi_toshiba.4=acpi_toshiba.4
 _acpi_wmi.4=   acpi_wmi.4
 _aesni.4=  aesni.4
+_apic.4=   apic.4
 _atrtc.4=  atrtc.4
 _attimer.4=attimer.4
 _aibs.4=   aibs.4

Added: head/share/man/man4/apic.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/apic.4  Tue Dec 20 13:49:52 2011(r228735)
@@ -0,0 +1,78 @@
+.\ Copyright (c) 2011 Alexander Motin m...@freebsd.org
+.\ All rights reserved.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\ ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\ SUCH DAMAGE.
+.\
+.\ $FreeBSD$
+.\
+.Dd December 20, 2011
+.Dt APIC 4
+.Os
+.Sh NAME
+.Nm apic
+.Nd Advanced Programmable Interrupt Controller (APIC) driver
+.Sh SYNOPSIS
+This driver is a mandatory part of amd64 kernel.
+To compile this driver into i386 or pc98 kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd device apic
+.Ed
+.Pp
+The following tunable is settable from the
+.Xr loader 8 :
+.Bl -ohang
+.It Va hint.apic. Ns Ar X Ns Va .clock
+controls event timers functionality support. Setting to 0, disables it.
+Default value is 1.
+.It Va hint.apic. Ns Ar X Ns Va .disabled
+Set this to 1 to disable APIC support, falling back to the legacy PIC.
+.El
+.Sh DESCRIPTION
+There are two components in the Intel APIC system, the local APIC (LAPIC)
+and the I/O APIC.
+There is one LAPIC in each CPU in the system.
+There is typically one I/O APIC for each peripheral bus in the system.
+.Pp
+LAPICs manage all external and interrupts for specific processor in an
+SMP system.
+In addition, they are able to accept and generate inter-processor interrupts
+(IPIs).
+.Pp
+I/O APICs contain a redirection table, which is used to route the interrupts
+they receive from peripheral buses to one or more local APICs.
+.Pp
+Each LAPIC includes one 32-bit programable timer.
+This driver uses them to supply kernel with one event timer named LAPIC.
+Event timer provided by the driver supports both one-shot an periodic modes.
+Because of LAPIC nature it is per-CPU.
+The timer frequency is not reported by the platform and so automatically
+measured by the driver on the first use.
+Depending on CPU model this timer may stop in C3 and deeper CPU sleep states.
+Driver automatically adjusts event timer priority and reports it to prevent
+entering dangerous sleep states when it is used.
+.Sh SEE ALSO
+.Xr atrtc 4 ,
+.Xr attimer 4 ,
+.Xr eventtimers 4 ,
+.Xr hpet 4

Modified: head/share/man/man4/atrtc.4
==
--- head/share/man/man4/atrtc.4 Tue Dec 20 13:32:56 2011(r228734)
+++ head/share/man/man4/atrtc.4 Tue Dec 20 13:49:52 2011(r228735)
@@ -51,6 +51,7 @@ divisors.
 .Pp
 Event timer provided by 

svn commit: r228736 - in head: contrib/pf/man share/man/man4 sys/contrib/pf/net sys/net sys/netinet

2011-12-20 Thread Gleb Smirnoff
Author: glebius
Date: Tue Dec 20 13:53:31 2011
New Revision: 228736
URL: http://svn.freebsd.org/changeset/base/228736

Log:
  Restore a feature that was present in 5.x and 6.x, and was cleared in
  7.x, 8.x and 9.x with pf(4) imports: pfsync(4) should suppress CARP
  preemption, while it is running its bulk update.
  
  However, reimplement the feature in more elegant manner, that is
  partially inspired by newer OpenBSD:
  
  - Rename term suppression to demotion, to match with OpenBSD.
  - Keep a global demotion factor, that can be raised by several
conditions, for now these are:
- interface goes down
- carp(4) has problems with ip_output() or ip6_output()
- pfsync performs bulk update
  - Unlike in OpenBSD the demotion factor isn't a counter, but
is actual value added to advskew. The adjustment values for
particular error conditions are also configurable, and their
defaults are maximum advskew value, so a single failure bumps
demotion to maximum. This is for POLA compatibility, and should
satisfy most users.
  - Demotion factor is a writable sysctl, so user can do
foot shooting, if he desires to.

Modified:
  head/contrib/pf/man/pfsync.4
  head/share/man/man4/carp.4
  head/sys/contrib/pf/net/if_pfsync.c
  head/sys/net/if.c
  head/sys/netinet/ip_carp.c
  head/sys/netinet/ip_carp.h

Modified: head/contrib/pf/man/pfsync.4
==
--- head/contrib/pf/man/pfsync.4Tue Dec 20 13:49:52 2011
(r228735)
+++ head/contrib/pf/man/pfsync.4Tue Dec 20 13:53:31 2011
(r228736)
@@ -114,6 +114,23 @@ Either run the pfsync protocol on a trus
 dedicated to pfsync messages such as a crossover cable between two firewalls,
 or specify a peer address and protect the traffic with
 .Xr ipsec 4 .
+.Pp
+.Nm
+has the following
+.Xr sysctl 8
+tunables:
+.Bl -tag -width .Va net.pfsync
+.It Va net.pfsync.carp_demotion_factor
+Value added to
+.Va net.inet.carp.demotion
+while
+.Nm
+tries to perform its bulk update.
+See
+.Xr carp 4
+for more information.
+Default value is 240.
+.El
 .Sh EXAMPLES
 .Nm
 and

Modified: head/share/man/man4/carp.4
==
--- head/share/man/man4/carp.4  Tue Dec 20 13:49:52 2011(r228735)
+++ head/share/man/man4/carp.4  Tue Dec 20 13:53:31 2011(r228736)
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd December 16, 2011
+.Dd December 20, 2011
 .Dt CARP 4
 .Os
 .Sh NAME
@@ -121,15 +121,38 @@ Values above 1 enable logging of bad
 .Nm
 packets.
 Default value is 1.
-.It Va net.inet.carp.suppress_preempt
-A read only value showing the status of preemption suppression.
-Preemption can be suppressed if link on an interface is down
-or when
+.It Va net.inet.carp.demotion
+This value shows current level of CARP demotion.
+The value is added to the actual advskew sent in announcements for
+all vhids.
+At normal system operation the demotion factor is zero.
+However, problematic conditions raise its level: when
+.Nm
+experiences problem with sending announcements, when an interface
+running a vhid goes down, or while the
 .Xr pfsync 4
 interface is not synchronized.
-Value of 0 means that preemption is not suppressed, since no
-problems are detected.
-Every problem increments suppression counter.
+The demotion value is writable, so that user may alter it
+depending on some external conditions, for example on status of some
+daemon utility.
+However, altering the value should be performed with care, do
+not conflict with subsystems that adjust demotion factor
+automatically:
+.Nm
+and
+.Xr pfsync 4 .
+.It Va net.inet.carp.ifdown_demotion_factor
+Value added to
+.Va net.inet.carp.demotion
+when interface running a vhid goes down.
+Default value is 240 (maximum advskew value).
+.It Va net.inet.carp.senderr_demotion_factor
+Value added to
+.Va net.inet.carp.demotion
+when
+.Nm
+experiences errors sending its announcements.
+Default value is 240 (maximum advskew value).
 .El
 .\.Sh ARP level load balancing
 .\The

Modified: head/sys/contrib/pf/net/if_pfsync.c
==
--- head/sys/contrib/pf/net/if_pfsync.c Tue Dec 20 13:49:52 2011
(r228735)
+++ head/sys/contrib/pf/net/if_pfsync.c Tue Dec 20 13:53:31 2011
(r228736)
@@ -62,12 +62,6 @@ __FBSDID($FreeBSD$);
 #else
 #defineNPFSYNC 0
 #endif
-
-#ifdef DEV_CARP
-#defineNCARP   DEV_CARP
-#else
-#defineNCARP   0
-#endif
 #endif /* __FreeBSD__ */
 
 #include sys/param.h
@@ -127,12 +121,14 @@ __FBSDID($FreeBSD$);
 #include netinet6/nd6.h
 #endif /* INET6 */
 
-#ifndef __FreeBSD__
+#ifdef __FreeBSD__
+#include netinet/ip_carp.h
+#else
 #include carp.h
-#endif
 #if NCARP  0
 #include netinet/ip_carp.h
 #endif
+#endif
 
 #include net/pfvar.h
 #include net/if_pfsync.h
@@ -308,11 +304,15 @@ static VNET_DEFINE(struct pfsync_softc*
 
 

svn commit: r228737 - head/share/man/man4

2011-12-20 Thread Alexander Motin
Author: mav
Date: Tue Dec 20 14:12:50 2011
New Revision: 228737
URL: http://svn.freebsd.org/changeset/base/228737

Log:
  Remove extra and left from earlier version.

Modified:
  head/share/man/man4/apic.4

Modified: head/share/man/man4/apic.4
==
--- head/share/man/man4/apic.4  Tue Dec 20 13:53:31 2011(r228736)
+++ head/share/man/man4/apic.4  Tue Dec 20 14:12:50 2011(r228737)
@@ -54,8 +54,7 @@ and the I/O APIC.
 There is one LAPIC in each CPU in the system.
 There is typically one I/O APIC for each peripheral bus in the system.
 .Pp
-LAPICs manage all external and interrupts for specific processor in an
-SMP system.
+LAPICs manage all external interrupts for specific processor in an SMP system.
 In addition, they are able to accept and generate inter-processor interrupts
 (IPIs).
 .Pp
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228737 - head/share/man/man4

2011-12-20 Thread John Baldwin
On Tuesday, December 20, 2011 9:12:51 am Alexander Motin wrote:
 Author: mav
 Date: Tue Dec 20 14:12:50 2011
 New Revision: 228737
 URL: http://svn.freebsd.org/changeset/base/228737
 
 Log:
   Remove extra and left from earlier version.
 
 Modified:
   head/share/man/man4/apic.4
 
 Modified: head/share/man/man4/apic.4
 
==
 --- head/share/man/man4/apic.4Tue Dec 20 13:53:31 2011
 (r228736)
 +++ head/share/man/man4/apic.4Tue Dec 20 14:12:50 2011
 (r228737)
 @@ -54,8 +54,7 @@ and the I/O APIC.
  There is one LAPIC in each CPU in the system.
  There is typically one I/O APIC for each peripheral bus in the system.
  .Pp
 -LAPICs manage all external and interrupts for specific processor in an
 -SMP system.
 +LAPICs manage all external interrupts for specific processor in an SMP 
system.
  In addition, they are able to accept and generate inter-processor 
interrupts
  (IPIs).
  .Pp

Hmm, can you call it a local APIC rather than LAPIC?  The Intel manuals
all use the longer form.  Also, 'for a specific processor' reads better.  Note 
that some UP systems have CPUs with local APICs as well, so they are not 
specific to SMP systems.

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228738 - in head: sys/boot/i386/boot0 usr.sbin/boot0cfg

2011-12-20 Thread John Baldwin
Author: jhb
Date: Tue Dec 20 15:19:29 2011
New Revision: 228738
URL: http://svn.freebsd.org/changeset/base/228738

Log:
  Allow boot0cfg to force a PXE boot via boot0 on the next boot.
  - Fix boot0 to check for PXE when using the pre-set setting for the
preferred slice.
  - Update boot0cfg to use slice 6 to select PXE.  Accept a 'pxe' argument
instead of a number for the 's' option as a way to select PXE as well.
  
  Submitted by: Andrew Boyer  aboyer averesystems
  MFC after:2 weeks

Modified:
  head/sys/boot/i386/boot0/boot0.S
  head/usr.sbin/boot0cfg/boot0cfg.8
  head/usr.sbin/boot0cfg/boot0cfg.c

Modified: head/sys/boot/i386/boot0/boot0.S
==
--- head/sys/boot/i386/boot0/boot0.STue Dec 20 14:12:50 2011
(r228737)
+++ head/sys/boot/i386/boot0/boot0.STue Dec 20 15:19:29 2011
(r228738)
@@ -413,6 +413,7 @@ got_key:
3:
 #endif /* ONLY_F_KEYS */
 #endif /* SIO */
+check_selection:
cmpb $0x5,%al   # F1..F6 or 1..6 ?
 #ifdef PXE /* enable PXE/INT18 using F6 */
jne 1f;
@@ -421,7 +422,6 @@ got_key:
 #endif /* PXE */
jae beep# Not in F1..F5, beep
 
-check_selection:
/*
 * We have a selection.  If it's a bad selection go back to complain.
 * The bits in MNUOPT were set when the options were printed.

Modified: head/usr.sbin/boot0cfg/boot0cfg.8
==
--- head/usr.sbin/boot0cfg/boot0cfg.8   Tue Dec 20 14:12:50 2011
(r228737)
+++ head/usr.sbin/boot0cfg/boot0cfg.8   Tue Dec 20 15:19:29 2011
(r228738)
@@ -146,6 +146,9 @@ Set the default boot selection to
 .Ar slice .
 Values between 1 and 4 refer to slices; a value of 5 refers to the
 option of booting from a second disk.
+The special string
+.Dq PXE
+or a value of 6 can be used to boot via PXE.
 .It Fl t Ar ticks
 Set the timeout value to
 .Ar ticks .

Modified: head/usr.sbin/boot0cfg/boot0cfg.c
==
--- head/usr.sbin/boot0cfg/boot0cfg.c   Tue Dec 20 14:12:50 2011
(r228737)
+++ head/usr.sbin/boot0cfg/boot0cfg.c   Tue Dec 20 15:19:29 2011
(r228738)
@@ -169,7 +169,10 @@ main(int argc, char *argv[])
 o_flag = 1;
 break;
 case 's':
-s_arg = argtoi(optarg, 1, 5, 's');
+   if (strcasecmp(optarg, pxe) == 0)
+   s_arg = 6;
+   else
+   s_arg = argtoi(optarg, 1, 6, 's');
 break;
 case 't':
 t_arg = argtoi(optarg, 1, 0x, 't');
@@ -472,8 +475,10 @@ display_mbr(u_int8_t *mbr)
 printf(default_selection=F%d (, mbr[OFF_OPT] + 1);
 if (mbr[OFF_OPT]  4)
printf(Slice %d, mbr[OFF_OPT] + 1);
-else
+else if (mbr[OFF_OPT] == 4)
printf(Drive 1);
+else
+   printf(PXE);
 printf()\n);
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228739 - head/share/man/man4

2011-12-20 Thread Alexander Motin
Author: mav
Date: Tue Dec 20 15:19:33 2011
New Revision: 228739
URL: http://svn.freebsd.org/changeset/base/228739

Log:
  s/LAPIC/local APIC/ to closer follow Intel documents.
  
  Submitted by: jhb

Modified:
  head/share/man/man4/apic.4

Modified: head/share/man/man4/apic.4
==
--- head/share/man/man4/apic.4  Tue Dec 20 15:19:29 2011(r228738)
+++ head/share/man/man4/apic.4  Tue Dec 20 15:19:33 2011(r228739)
@@ -51,20 +51,20 @@ Set this to 1 to disable APIC support, f
 .Sh DESCRIPTION
 There are two components in the Intel APIC system, the local APIC (LAPIC)
 and the I/O APIC.
-There is one LAPIC in each CPU in the system.
+There is one local APIC in each CPU in the system.
 There is typically one I/O APIC for each peripheral bus in the system.
 .Pp
-LAPICs manage all external interrupts for specific processor in an SMP system.
+Local APICs manage all external interrupts for a specific processor.
 In addition, they are able to accept and generate inter-processor interrupts
 (IPIs).
 .Pp
 I/O APICs contain a redirection table, which is used to route the interrupts
 they receive from peripheral buses to one or more local APICs.
 .Pp
-Each LAPIC includes one 32-bit programable timer.
+Each local APIC includes one 32-bit programable timer.
 This driver uses them to supply kernel with one event timer named LAPIC.
 Event timer provided by the driver supports both one-shot an periodic modes.
-Because of LAPIC nature it is per-CPU.
+Because of local APIC nature it is per-CPU.
 The timer frequency is not reported by the platform and so automatically
 measured by the driver on the first use.
 Depending on CPU model this timer may stop in C3 and deeper CPU sleep states.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228740 - head/sbin/newfs_msdos

2011-12-20 Thread Pedro F. Giffuni
Author: pfg
Date: Tue Dec 20 15:50:54 2011
New Revision: 228740
URL: http://svn.freebsd.org/changeset/base/228740

Log:
  Many style fixes.
  Remove C99 initializers: they don't help in this case.
  Set errno to 0 before strtoll() (from NetBSD).
  
  PR:   151850
  Suggested by: bde
  Approved by:  jhb (Mentor)
  MFC after:2 weeks

Modified:
  head/sbin/newfs_msdos/newfs_msdos.8
  head/sbin/newfs_msdos/newfs_msdos.c

Modified: head/sbin/newfs_msdos/newfs_msdos.8
==
--- head/sbin/newfs_msdos/newfs_msdos.8 Tue Dec 20 15:19:33 2011
(r228739)
+++ head/sbin/newfs_msdos/newfs_msdos.8 Tue Dec 20 15:50:54 2011
(r228740)
@@ -180,27 +180,27 @@ For reference purposes, this structure i
 below.
 .Bd -literal
 struct bsbpb {
-u_int16_t  bps;/* [-S] bytes per sector */
-u_int8_t   spc;/* [-c] sectors per cluster */
-u_int16_t  res;/* [-r] reserved sectors */
-u_int8_t   nft;/* [-n] number of FATs */
-u_int16_t  rde;/* [-e] root directory entries */
-u_int16_t  sec;/* [-s] total sectors */
-u_int8_t   mid;/* [-m] media descriptor */
-u_int16_t  spf;/* [-a] sectors per FAT */
-u_int16_t  spt;/* [-u] sectors per track */
-u_int16_t  hds;/* [-h] drive heads */
-u_int32_t  hid;/* [-o] hidden sectors */
-u_int32_t  bsec;   /* [-s] big total sectors */
+u_int16_t  bpbBytesPerSec; /* [-S] bytes per sector */
+u_int8_t   bpbSecPerClust; /* [-c] sectors per cluster */
+u_int16_t  bpbResSectors;  /* [-r] reserved sectors */
+u_int8_t   bpbFATs;/* [-n] number of FATs */
+u_int16_t  bpbRootDirEnts; /* [-e] root directory entries */
+u_int16_t  bpbSectors; /* [-s] total sectors */
+u_int8_t   bpbMedia;   /* [-m] media descriptor */
+u_int16_t  bpbFATsecs; /* [-a] sectors per FAT */
+u_int16_t  bpbSecPerTrack; /* [-u] sectors per track */
+u_int16_t  bpbHeads;   /* [-h] drive heads */
+u_int32_t  bpbHiddenSecs;  /* [-o] hidden sectors */
+u_int32_t  bpbHugeSectors; /* [-s] big total sectors */
 };
 /* FAT32 extensions */
 struct bsxbpb {
-u_int32_t  bspf;   /* [-a] big sectors per FAT */
-u_int16_t  xflg;   /* control flags */
-u_int16_t  vers;   /* file system version */
-u_int32_t  rdcl;   /* root directory start cluster */
-u_int16_t  infs;   /* [-i] file system info sector */
-u_int16_t  bkbs;   /* [-k] backup boot sector */
+u_int32_t  bpbBigFATsecs;  /* [-a] big sectors per FAT */
+u_int16_t  bpbExtFlags;/* control flags */
+u_int16_t  bpbFSVers;  /* file system version */
+u_int32_t  bpbRootClust;   /* root directory start cluster */
+u_int16_t  bpbFSInfo;  /* [-i] file system info sector */
+u_int16_t  bpbBackup;  /* [-k] backup boot sector */
 };
 .Ed
 .Sh LIMITATION

Modified: head/sbin/newfs_msdos/newfs_msdos.c
==
--- head/sbin/newfs_msdos/newfs_msdos.c Tue Dec 20 15:19:33 2011
(r228739)
+++ head/sbin/newfs_msdos/newfs_msdos.c Tue Dec 20 15:50:54 2011
(r228740)
@@ -66,7 +66,7 @@ static const char rcsid[] =
 #define MINCLS12  1U   /* minimum FAT12 clusters */
 #define MINCLS16  0x1000U  /* minimum FAT16 clusters */
 #define MINCLS32  2U   /* minimum FAT32 clusters */
-#define MAXCLS12  0xfedU   /* maximum FAT12 clusters */
+#define MAXCLS12  0xfedU   /* maximum FAT12 clusters */
 #define MAXCLS16  0xfff5U  /* maximum FAT16 clusters */
 #define MAXCLS32  0xff5U   /* maximum FAT32 clusters */
 
@@ -97,7 +97,7 @@ static const char rcsid[] =
 #define argtox(arg, lo, msg)  argtou(arg, lo, UINT_MAX, msg)
 
 struct bs {
-u_int8_t bsJump[3];/* bootstrap entry point */
+u_int8_t bsJump[3];/* bootstrap entry point */
 u_int8_t bsOemName[8]; /* OEM name and version */
 } __packed;
 
@@ -123,7 +123,7 @@ struct bsxbpb {
 u_int8_t bpbRootClust[4];  /* root directory start cluster */
 u_int8_t bpbFSInfo[2]; /* file system info sector */
 u_int8_t bpbBackup[2]; /* backup boot sector */
-u_int8_t bpbReserved[12];  /* reserved */
+u_int8_t bpbReserved[12];  /* reserved */
 } __packed;
 
 struct bsx {
@@ -136,13 +136,13 @@ struct bsx {
 } __packed;
 
 struct de {
-u_int8_t deName[11];   /* name and extension */
-u_int8_t deAttributes; /* attributes */
-u_int8_t rsvd[10]; /* reserved */
-u_int8_t deMTime[2];   /* creation time */
-

Re: svn commit: r228143 - in head: . share/mk tools/build/options

2011-12-20 Thread John Baldwin
On Tuesday, December 20, 2011 5:05:49 am David Chisnall wrote:
 On 20 Dec 2011, at 06:20, Bruce Evans wrote:
 
  Don't be silly.  Building profiled libraries takes as much as 1 minute.
  Many would not want to wait that long (if they noticed how long it takes).
  This is not 1994 when building of profiling libraries was left in because
  it only took an extra hour or or so.
 
 One of the platforms I use has an 800MHz ARM processor.  Building LLVM (even 
a release build with asserts disabled and with all of the cross-compile 
targets disabled) is an overnight job.  On my main laptop, a release build of 
LLVM takes about 5 minutes.
 
 Please don't assume that just because fast computers exist that they are the 
only things people are using.  A lot of the more interesting platforms these 
days are significantly slower.

And I doubt you do a build with a stock /etc/src.conf on such hardware either.
The defaults for src.conf should be for the common case, and in the common 
case profiled library builds are in the noise.  I do add WITHOUT_PROFILE to 
many of my machines in /etc/src.conf, but I still think they should be enabled 
by default.

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228143 - in head: . share/mk tools/build/options

2011-12-20 Thread Garrett Cooper
On Tue, Dec 20, 2011 at 2:18 AM, Andriy Gapon a...@freebsd.org wrote:
 on 20/12/2011 12:05 David Chisnall said the following:
 On 20 Dec 2011, at 06:20, Bruce Evans wrote:

 Don't be silly.  Building profiled libraries takes as much as 1 minute.
 Many would not want to wait that long (if they noticed how long it takes).
 This is not 1994 when building of profiling libraries was left in because
 it only took an extra hour or or so.

 One of the platforms I use has an 800MHz ARM processor.  Building LLVM (even 
 a release build with asserts disabled and with all of the cross-compile 
 targets disabled) is an overnight job.  On my main laptop, a release build 
 of LLVM takes about 5 minutes.

 Please don't assume that just because fast computers exist that they are the 
 only things people are using.  A lot of the more interesting platforms these 
 days are significantly slower.

 I wonder if all the software that runs on the embedded stuff or mobile phones 
 is
 built on the said hardware.

world doesn't need to be built on the hardware, but ports still do.
Thanks,
-Garrett
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228741 - head/share/man/man4

2011-12-20 Thread Alexander Motin
Author: mav
Date: Tue Dec 20 17:10:34 2011
New Revision: 228741
URL: http://svn.freebsd.org/changeset/base/228741

Log:
  Add timecounters(4) man page alike to eventtimers(4).

Added:
  head/share/man/man4/timecounters.4   (contents, props changed)
Modified:
  head/share/man/man4/Makefile
  head/share/man/man4/attimer.4
  head/share/man/man4/eventtimers.4
  head/share/man/man4/hpet.4

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileTue Dec 20 15:50:54 2011
(r228740)
+++ head/share/man/man4/MakefileTue Dec 20 17:10:34 2011
(r228741)
@@ -445,6 +445,7 @@ MAN=aac.4 \
termios.4 \
textdump.4 \
ti.4 \
+   timecounters.4 \
tl.4 \
tnt4882.4 \
${_tpm.4} \

Modified: head/share/man/man4/attimer.4
==
--- head/share/man/man4/attimer.4   Tue Dec 20 15:50:54 2011
(r228740)
+++ head/share/man/man4/attimer.4   Tue Dec 20 17:10:34 2011
(r228741)
@@ -73,4 +73,5 @@ Event timer provided by the driver is ir
 .Xr apic 4 ,
 .Xr atrtc 4 ,
 .Xr eventtimers 4 ,
-.Xr hpet 4
+.Xr hpet 4 ,
+.Xr timecounters 4

Modified: head/share/man/man4/eventtimers.4
==
--- head/share/man/man4/eventtimers.4   Tue Dec 20 15:50:54 2011
(r228740)
+++ head/share/man/man4/eventtimers.4   Tue Dec 20 17:10:34 2011
(r228741)
@@ -149,4 +149,5 @@ always generating.
 .Xr atrtc 4 ,
 .Xr attimer 4 ,
 .Xr hpet 4 ,
+.Xr timecounters 4 ,
 .Xr eventtimers 9

Modified: head/share/man/man4/hpet.4
==
--- head/share/man/man4/hpet.4  Tue Dec 20 15:50:54 2011(r228740)
+++ head/share/man/man4/hpet.4  Tue Dec 20 17:10:34 2011(r228741)
@@ -97,7 +97,8 @@ of these comparators has own unsharable 
 .Xr apic 4 ,
 .Xr atrtc 4 ,
 .Xr attimer 4 ,
-.Xr eventtimers 4
+.Xr eventtimers 4 ,
+.Xr timecounters 4
 .Sh HISTORY
 The
 .Nm

Added: head/share/man/man4/timecounters.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/timecounters.4  Tue Dec 20 17:10:34 2011
(r228741)
@@ -0,0 +1,105 @@
+.\ Copyright (c) 2011 Alexander Motin m...@freebsd.org
+.\ All rights reserved.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\ ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\ SUCH DAMAGE.
+.\
+.\ $FreeBSD$
+.\
+.Dd December 20, 2011
+.Dt TIMECOUNTERS 4
+.Os
+.Sh NAME
+.Nm timecounters
+.Nd kernel time counters subsystem
+.Sh SYNOPSIS
+Kernel uses several types of time-related devices, such as: real time clocks,
+time counters and event timers.
+Real time clocks responsible for tracking real world time, mostly when system
+is down.
+Time counters are responsible for tracking purposes, when system is running.
+Event timers are responsible for generating interrupts at specified time or
+periodically, to run different time-based events.
+This page is about the second.
+.Sh DESCRIPTION
+Time counters are the lowest level of time tracking in kernel.
+They provide monotonically increasing timestamps with known width and
+update frequency.
+They can overflow, drift, etc and so in raw form used only in very limited
+performance-critical places like process scheduler.
+.Pp
+More usable time is created by scaling the values read from the selected
+time counter and combining it with some offset, regularly updated by
+.Fn tc_windup
+on
+.Fn hardclock
+invocation.
+.Pp
+Different platforms provide different kinds of timer hardware.
+The 

svn commit: r228743 - in head/share/man/man4: . man4.i386

2011-12-20 Thread Alexander Motin
Author: mav
Date: Tue Dec 20 17:44:25 2011
New Revision: 228743
URL: http://svn.freebsd.org/changeset/base/228743

Log:
  Add some more cross-references.

Modified:
  head/share/man/man4/cpufreq.4
  head/share/man/man4/ffclock.4
  head/share/man/man4/man4.i386/CPU_ELAN.4
  head/share/man/man4/timecounters.4

Modified: head/share/man/man4/cpufreq.4
==
--- head/share/man/man4/cpufreq.4   Tue Dec 20 17:32:13 2011
(r228742)
+++ head/share/man/man4/cpufreq.4   Tue Dec 20 17:44:25 2011
(r228743)
@@ -286,6 +286,7 @@ then it should set all elements to
 .Dv CPUFREQ_VAL_UNKNOWN .
 .Sh SEE ALSO
 .Xr acpi 4 ,
+.Xr timecounters 4 ,
 .Xr powerd 8 ,
 .Xr sysctl 8
 .Sh AUTHORS

Modified: head/share/man/man4/ffclock.4
==
--- head/share/man/man4/ffclock.4   Tue Dec 20 17:32:13 2011
(r228742)
+++ head/share/man/man4/ffclock.4   Tue Dec 20 17:44:25 2011
(r228743)
@@ -110,6 +110,7 @@ but currently does nothing.
 .Xr clock_gettime 2 ,
 .Xr ffclock 2 ,
 .Xr bpf 4 ,
+.Xr timecounters 4 ,
 .Xr sysctl 8
 .Sh HISTORY
 Feed-forward clock support first appeared in

Modified: head/share/man/man4/man4.i386/CPU_ELAN.4
==
--- head/share/man/man4/man4.i386/CPU_ELAN.4Tue Dec 20 17:32:13 2011
(r228742)
+++ head/share/man/man4/man4.i386/CPU_ELAN.4Tue Dec 20 17:44:25 2011
(r228743)
@@ -148,6 +148,7 @@ and the GPIO pins which are not
 available will be disabled.
 .Sh SEE ALSO
 .Xr led 4 ,
+.Xr timecounters 4 ,
 .Xr sysctl 8
 .Sh HISTORY
 The

Modified: head/share/man/man4/timecounters.4
==
--- head/share/man/man4/timecounters.4  Tue Dec 20 17:32:13 2011
(r228742)
+++ head/share/man/man4/timecounters.4  Tue Dec 20 17:44:25 2011
(r228743)
@@ -102,4 +102,5 @@ tunable/sysctl.
 .Sh SEE ALSO
 .Xr attimer 4 ,
 .Xr eventtimers 4 ,
+.Xr ffclock 4 ,
 .Xr hpet 4
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228143 - in head: . share/mk tools/build/options

2011-12-20 Thread Warner Losh

On Dec 20, 2011, at 2:21 AM, Garrett Cooper wrote:
 
The assumption (that isn't clearly stated) is that I am building
 things on suped up x86 hardware, not arm CPUs, Intel Atoms, etc. On
 those platforms building superfluous things still do matter (in
 particular because cross-building some things still isn't doable 100%
 of the time, but also because flash, some platter media, etc is slow).
 But I suppose I digress...

When is cross building not doable?  Please, give examples, not fud.

Warner


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228143 - in head: . share/mk tools/build/options

2011-12-20 Thread John Baldwin
On Tuesday, December 20, 2011 11:26:11 am Garrett Cooper wrote:
 On Tue, Dec 20, 2011 at 2:18 AM, Andriy Gapon a...@freebsd.org wrote:
  on 20/12/2011 12:05 David Chisnall said the following:
  On 20 Dec 2011, at 06:20, Bruce Evans wrote:
 
  Don't be silly.  Building profiled libraries takes as much as 1 minute.
  Many would not want to wait that long (if they noticed how long it takes).
  This is not 1994 when building of profiling libraries was left in because
  it only took an extra hour or or so.
 
  One of the platforms I use has an 800MHz ARM processor.  Building LLVM 
  (even a release build with asserts disabled and with all of the cross-
compile targets disabled) is an overnight job.  On my main laptop, a release 
build of LLVM takes about 5 minutes.
 
  Please don't assume that just because fast computers exist that they are 
  the only things people are using.  A lot of the more interesting 
platforms these days are significantly slower.
 
  I wonder if all the software that runs on the embedded stuff or mobile 
  phones is
  built on the said hardware.
 
 world doesn't need to be built on the hardware, but ports still do.

And the discussion here is about profiled libraries built as part of world,
not about ports. :)

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228143 - in head: . share/mk tools/build/options

2011-12-20 Thread Garrett Cooper
On Tue, Dec 20, 2011 at 9:40 AM, Warner Losh i...@bsdimp.com wrote:

 On Dec 20, 2011, at 2:21 AM, Garrett Cooper wrote:


    The assumption (that isn't clearly stated) is that I am building
 things on suped up x86 hardware, not arm CPUs, Intel Atoms, etc. On
 those platforms building superfluous things still do matter (in
 particular because cross-building some things still isn't doable 100%
 of the time, but also because flash, some platter media, etc is slow).
 But I suppose I digress...


 When is cross building not doable?  Please, give examples, not fud.

ports.
-Garrett
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228143 - in head: . share/mk tools/build/options

2011-12-20 Thread Garrett Cooper
On Tue, Dec 20, 2011 at 11:21 AM, Garrett Cooper yaneg...@gmail.com wrote:
 On Tue, Dec 20, 2011 at 9:40 AM, Warner Losh i...@bsdimp.com wrote:

 On Dec 20, 2011, at 2:21 AM, Garrett Cooper wrote:


    The assumption (that isn't clearly stated) is that I am building
 things on suped up x86 hardware, not arm CPUs, Intel Atoms, etc. On
 those platforms building superfluous things still do matter (in
 particular because cross-building some things still isn't doable 100%
 of the time, but also because flash, some platter media, etc is slow).
 But I suppose I digress...


 When is cross building not doable?  Please, give examples, not fud.

 ports.

Of course, now that I mention it, that's less relevant to this
particular discussion. Please ignore above fud if you have access to
fast Intel hardware.
-Garrett
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228143 - in head: . share/mk tools/build/options

2011-12-20 Thread Warner Losh

On Dec 20, 2011, at 12:21 PM, Garrett Cooper wrote:

 On Tue, Dec 20, 2011 at 9:40 AM, Warner Losh i...@bsdimp.com wrote:
 
 On Dec 20, 2011, at 2:21 AM, Garrett Cooper wrote:
 
 
The assumption (that isn't clearly stated) is that I am building
 things on suped up x86 hardware, not arm CPUs, Intel Atoms, etc. On
 those platforms building superfluous things still do matter (in
 particular because cross-building some things still isn't doable 100%
 of the time, but also because flash, some platter media, etc is slow).
 But I suppose I digress...
 
 
 When is cross building not doable?  Please, give examples, not fud.
 
 ports.

Which affects profiled libraries how?

Warner


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228744 - head/lib/libarchive

2011-12-20 Thread Martin Matuska
Author: mm
Date: Tue Dec 20 20:02:07 2011
New Revision: 228744
URL: http://svn.freebsd.org/changeset/base/228744

Log:
  Merge vendor revision 3723:
  Fixes extraction of Zip entries that use length-at-end without specifying
  either the compressed or uncompressed length.  In particular, fixes bsdtar
  extraction of such files.
  
  Obtained from:http://code.google.com/p/libarchive
  Reported by:  Patrick Lamaiziere patf...@davenulle.org (freebsd-stable@)
  MFC after:1 week

Modified:
  head/lib/libarchive/archive_read_extract.c

Modified: head/lib/libarchive/archive_read_extract.c
==
--- head/lib/libarchive/archive_read_extract.c  Tue Dec 20 17:44:25 2011
(r228743)
+++ head/lib/libarchive/archive_read_extract.c  Tue Dec 20 20:02:07 2011
(r228744)
@@ -108,7 +108,7 @@ archive_read_extract2(struct archive *_a
if (r != ARCHIVE_OK)
/* If _write_header failed, copy the error. */
archive_copy_error(a-archive, ad);
-   else if (archive_entry_size(entry)  0)
+   else if (!archive_entry_size_is_set(entry) || archive_entry_size(entry) 
 0)
/* Otherwise, pour data into the entry. */
r = copy_data(_a, ad);
r2 = archive_write_finish_entry(ad);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228745 - in head: lib/libarchive lib/libarchive/test usr.bin/cpio usr.bin/tar

2011-12-20 Thread Martin Matuska
Author: mm
Date: Tue Dec 20 20:06:33 2011
New Revision: 228745
URL: http://svn.freebsd.org/changeset/base/228745

Log:
  Update libarchive, tar and cpio to version 2.8.5
  
  The following additional vendor revisions are applied:
  
  Revision 3740:
  Use archive_clear_error() to clear the error markers.
  
  Obtained from:http://code.google.com/p/libarchive
  MFC after:2 weeks

Added:
  head/lib/libarchive/test/test_read_format_iso_Z.c
 - copied, changed from r228740, 
head/lib/libarchive/test/test_read_format_iso_gz.c
Deleted:
  head/lib/libarchive/test/test_read_format_iso_gz.c
Modified:
  head/lib/libarchive/archive.h
  head/lib/libarchive/archive_read.c
  head/lib/libarchive/archive_read_support_compression_bzip2.c
  head/lib/libarchive/archive_read_support_compression_uu.c
  head/lib/libarchive/archive_read_support_format_cpio.c
  head/lib/libarchive/archive_read_support_format_iso9660.c
  head/lib/libarchive/archive_read_support_format_tar.c
  head/lib/libarchive/archive_read_support_format_zip.c
  head/lib/libarchive/archive_string.h
  head/lib/libarchive/archive_write_disk.c
  head/lib/libarchive/archive_write_set_compression_xz.c
  head/lib/libarchive/archive_write_set_format_ar.c
  head/lib/libarchive/archive_write_set_format_shar.c
  head/lib/libarchive/archive_write_set_format_ustar.c
  head/lib/libarchive/config_freebsd.h
  head/lib/libarchive/libarchive-formats.5
  head/lib/libarchive/libarchive.3
  head/lib/libarchive/test/Makefile
  head/lib/libarchive/test/test_compat_zip.c
  head/usr.bin/cpio/Makefile
  head/usr.bin/tar/Makefile
  head/usr.bin/tar/tree.c

Modified: head/lib/libarchive/archive.h
==
--- head/lib/libarchive/archive.h   Tue Dec 20 20:02:07 2011
(r228744)
+++ head/lib/libarchive/archive.h   Tue Dec 20 20:06:33 2011
(r228745)
@@ -52,7 +52,7 @@
 /* These should match the types used in 'struct stat' */
 #if defined(_WIN32)  !defined(__CYGWIN__)
 #define__LA_INT64_T__int64
-# if defined(_SSIZE_T_DEFINED)
+# if defined(_SSIZE_T_DEFINED) || defined(_SSIZE_T_)
 #  define  __LA_SSIZE_Tssize_t
 # elif defined(_WIN64)
 #  define  __LA_SSIZE_T__int64
@@ -98,6 +98,13 @@
 # define __LA_DECL
 #endif
 
+#if defined(__GNUC__)  __GNUC__ = 3
+#define__LA_PRINTF(fmtarg, firstvararg) \
+   __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
+#else
+#define__LA_PRINTF(fmtarg, firstvararg)/* nothing */
+#endif
+
 #ifdef __cplusplus
 extern C {
 #endif
@@ -129,13 +136,13 @@ extern C {
  * (ARCHIVE_API_VERSION * 100 + ARCHIVE_API_FEATURE * 1000)
  * #endif
  */
-#defineARCHIVE_VERSION_NUMBER 2008004
+#defineARCHIVE_VERSION_NUMBER 2008005
 __LA_DECL int  archive_version_number(void);
 
 /*
  * Textual name/version of the library, useful for version displays.
  */
-#defineARCHIVE_VERSION_STRING libarchive 2.8.4
+#defineARCHIVE_VERSION_STRING libarchive 2.8.5
 __LA_DECL const char * archive_version_string(void);
 
 #if ARCHIVE_VERSION_NUMBER  300
@@ -717,7 +724,7 @@ __LA_DECL const char*archive_format_nam
 __LA_DECL int   archive_format(struct archive *);
 __LA_DECL void  archive_clear_error(struct archive *);
 __LA_DECL void  archive_set_error(struct archive *, int _err,
-   const char *fmt, ...);
+   const char *fmt, ...) __LA_PRINTF(3, 4);
 __LA_DECL void  archive_copy_error(struct archive *dest,
struct archive *src);
 __LA_DECL int   archive_file_count(struct archive *);

Modified: head/lib/libarchive/archive_read.c
==
--- head/lib/libarchive/archive_read.c  Tue Dec 20 20:02:07 2011
(r228744)
+++ head/lib/libarchive/archive_read.c  Tue Dec 20 20:06:33 2011
(r228745)
@@ -715,7 +715,7 @@ archive_read_data_block(struct archive *
 /*
  * Close the file and release most resources.
  *
- * Be careful: client might just call read_new and then read_finish.
+ * Be careful: client might just call read_new and then read_free.
  * Don't assume we actually read anything or performed any non-trivial
  * initialization.
  */

Modified: head/lib/libarchive/archive_read_support_compression_bzip2.c
==
--- head/lib/libarchive/archive_read_support_compression_bzip2.cTue Dec 
20 20:02:07 2011(r228744)
+++ head/lib/libarchive/archive_read_support_compression_bzip2.cTue Dec 
20 20:06:33 2011(r228745)
@@ -350,4 +350,4 @@ bzip2_filter_close(struct archive_read_f
return (ret);
 }
 
-#endif /* HAVE_BZLIB_H */
+#endif /* HAVE_BZLIB_H  BZ_CONFIG_ERROR */

Modified: head/lib/libarchive/archive_read_support_compression_uu.c

svn commit: r228746 - head/sys/i386/xen

2011-12-20 Thread Alan Cox
Author: alc
Date: Tue Dec 20 20:16:12 2011
New Revision: 228746
URL: http://svn.freebsd.org/changeset/base/228746

Log:
  The Xen pmap doesn't support superpages.  So, there is no point in it
  initializing structures, like the pv table, that are only used to
  implement superpages.  In fact, some of the unnecessary code in
  pmap_init() was actually doing harm.  It was preventing the kernel from
  booting on virtual machines with more than 768 MB of memory.
  
  Tested by:sbruno

Modified:
  head/sys/i386/xen/pmap.c

Modified: head/sys/i386/xen/pmap.c
==
--- head/sys/i386/xen/pmap.cTue Dec 20 20:06:33 2011(r228745)
+++ head/sys/i386/xen/pmap.cTue Dec 20 20:16:12 2011(r228746)
@@ -184,9 +184,6 @@ __FBSDID($FreeBSD$);
 #define PV_STAT(x) do { } while (0)
 #endif
 
-#definepa_index(pa)((pa)  PDRSHIFT)
-#definepa_to_pvh(pa)   (pv_table[pa_index(pa)])
-
 /*
  * Get PDEs and PTEs for user/kernel address space
  */
@@ -230,7 +227,6 @@ static int pat_works;   /* Is page attri
  * Data for the pv entry allocation mechanism
  */
 static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0;
-static struct md_page *pv_table;
 static int shpgperproc = PMAP_SHPGPERPROC;
 
 struct pv_chunk *pv_chunkbase; /* KVA block for pv_chunks */
@@ -278,9 +274,6 @@ SYSCTL_INT(_debug, OID_AUTO, PMAP1unchan
 static struct mtx PMAP2mutex;
 
 static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, VM/pmap parameters);
-static int pg_ps_enabled;
-SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN, pg_ps_enabled, 0,
-Are large page mappings enabled?);
 
 SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_max, CTLFLAG_RD, pv_entry_max, 0,
Max number of PV entries);
@@ -636,24 +629,8 @@ pmap_ptelist_init(vm_offset_t *head, voi
 void
 pmap_init(void)
 {
-   vm_page_t mpte;
-   vm_size_t s;
-   int i, pv_npg;
 
/*
-* Initialize the vm page array entries for the kernel pmap's
-* page table pages.
-*/ 
-   for (i = 0; i  nkpt; i++) {
-   mpte = PHYS_TO_VM_PAGE(xpmap_mtop(PTD[i + KPTDI]  PG_FRAME));
-   KASSERT(mpte = vm_page_array 
-   mpte  vm_page_array[vm_page_array_size],
-   (pmap_init: page table page is out of range));
-   mpte-pindex = i + KPTDI;
-   mpte-phys_addr = xpmap_mtop(PTD[i + KPTDI]  PG_FRAME);
-   }
-
-/*
 * Initialize the address space (zone) for the pv entries.  Set a
 * high water mark so that the system can recover from excessive
 * numbers of pv entries.
@@ -664,26 +641,6 @@ pmap_init(void)
pv_entry_max = roundup(pv_entry_max, _NPCPV);
pv_entry_high_water = 9 * (pv_entry_max / 10);
 
-   /*
-* Are large page mappings enabled?
-*/
-   TUNABLE_INT_FETCH(vm.pmap.pg_ps_enabled, pg_ps_enabled);
-
-   /*
-* Calculate the size of the pv head table for superpages.
-*/
-   for (i = 0; phys_avail[i + 1]; i += 2);
-   pv_npg = round_4mpage(phys_avail[(i - 2) + 1]) / NBPDR;
-
-   /*
-* Allocate memory for the pv head table for superpages.
-*/
-   s = (vm_size_t)(pv_npg * sizeof(struct md_page));
-   s = round_page(s);
-   pv_table = (struct md_page *)kmem_alloc(kernel_map, s);
-   for (i = 0; i  pv_npg; i++)
-   TAILQ_INIT(pv_table[i].pv_list);
-
pv_maxchunks = MAX(pv_entry_max / _NPCPV, maxproc);
pv_chunkbase = (struct pv_chunk *)kmem_alloc_nofault(kernel_map,
PAGE_SIZE * pv_maxchunks);
@@ -3448,21 +3405,15 @@ pmap_page_wired_mappings(vm_page_t m)
 }
 
 /*
- * Returns TRUE if the given page is mapped individually or as part of
- * a 4mpage.  Otherwise, returns FALSE.
+ * Returns TRUE if the given page is mapped.  Otherwise, returns FALSE.
  */
 boolean_t
 pmap_page_is_mapped(vm_page_t m)
 {
-   boolean_t rv;
 
if ((m-oflags  VPO_UNMANAGED) != 0)
return (FALSE);
-   vm_page_lock_queues();
-   rv = !TAILQ_EMPTY(m-md.pv_list) ||
-   !TAILQ_EMPTY(pa_to_pvh(VM_PAGE_TO_PHYS(m))-pv_list);
-   vm_page_unlock_queues();
-   return (rv);
+   return (!TAILQ_EMPTY(m-md.pv_list));
 }
 
 /*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228143 - in head: . share/mk tools/build/options

2011-12-20 Thread Garrett Cooper
On Tue, Dec 20, 2011 at 11:36 AM, Warner Losh i...@bsdimp.com wrote:

 On Dec 20, 2011, at 12:21 PM, Garrett Cooper wrote:

 On Tue, Dec 20, 2011 at 9:40 AM, Warner Losh i...@bsdimp.com wrote:

 On Dec 20, 2011, at 2:21 AM, Garrett Cooper wrote:


    The assumption (that isn't clearly stated) is that I am building
 things on suped up x86 hardware, not arm CPUs, Intel Atoms, etc. On
 those platforms building superfluous things still do matter (in
 particular because cross-building some things still isn't doable 100%
 of the time, but also because flash, some platter media, etc is slow).
 But I suppose I digress...


 When is cross building not doable?  Please, give examples, not fud.

 ports.

 Which affects profiled libraries how?

Please see later comment :/.
-Garrett
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228747 - head/sys/i386/xen

2011-12-20 Thread Alan Cox
Author: alc
Date: Tue Dec 20 20:29:45 2011
New Revision: 228747
URL: http://svn.freebsd.org/changeset/base/228747

Log:
  The size passed to kmem functions should be in terms of bytes and not
  pages.
  
  Avoid an out-of-bounds array access.
  
  Reviewed by:  cperciva

Modified:
  head/sys/i386/xen/mp_machdep.c

Modified: head/sys/i386/xen/mp_machdep.c
==
--- head/sys/i386/xen/mp_machdep.c  Tue Dec 20 20:16:12 2011
(r228746)
+++ head/sys/i386/xen/mp_machdep.c  Tue Dec 20 20:29:45 2011
(r228747)
@@ -810,7 +810,7 @@ cpu_initialize_context(unsigned int cpu)
 {
/* vcpu_guest_context_t is too large to allocate on the stack.
 * Hence we allocate statically and protect it with a lock */
-   vm_page_t m[4];
+   vm_page_t m[NPGPTD + 2];
static vcpu_guest_context_t ctxt;
vm_offset_t boot_stack;
vm_offset_t newPTD;
@@ -831,8 +831,8 @@ cpu_initialize_context(unsigned int cpu)
pmap_zero_page(m[i]);
 
}
-   boot_stack = kmem_alloc_nofault(kernel_map, 1);
-   newPTD = kmem_alloc_nofault(kernel_map, NPGPTD);
+   boot_stack = kmem_alloc_nofault(kernel_map, PAGE_SIZE);
+   newPTD = kmem_alloc_nofault(kernel_map, NPGPTD * PAGE_SIZE);
ma[0] = VM_PAGE_TO_MACH(m[0])|PG_V;
 
 #ifdef PAE 
@@ -854,7 +854,7 @@ cpu_initialize_context(unsigned int cpu)
nkpt*sizeof(vm_paddr_t));
 
pmap_qremove(newPTD, 4);
-   kmem_free(kernel_map, newPTD, 4);
+   kmem_free(kernel_map, newPTD, 4 * PAGE_SIZE);
/*
 * map actual idle stack to boot_stack
 */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228748 - head/lib/libarchive

2011-12-20 Thread Martin Matuska
Author: mm
Date: Tue Dec 20 20:34:02 2011
New Revision: 228748
URL: http://svn.freebsd.org/changeset/base/228748

Log:
  Sync libarchive with vendor branch release/2.8:
  
  3730:
  Fix issue 174 (Windows path names, not relevant for FreeBSD)
  
  3734:
  Merge r1989: archive_clear_error should set errno to 0.
  
  3735:
  Merge r3247 from trunk: Clear errors before returning
  from archive_read_support_format_all()
  
  3799:
  Check the position before dereferencing the pointer.
  This avoids dereferencing one byte past the end of a string
  
  3824:
  Merge r3823 from trunk for issue 199 (hang in iso9660 reading)
  
  Obtained from:http://code.google.com/p/libarchive
  MFC after:2 weeks

Modified:
  head/lib/libarchive/archive_read_support_format_all.c
  head/lib/libarchive/archive_read_support_format_iso9660.c
  head/lib/libarchive/archive_string.c
  head/lib/libarchive/archive_util.c
  head/lib/libarchive/archive_write_disk.c

Modified: head/lib/libarchive/archive_read_support_format_all.c
==
--- head/lib/libarchive/archive_read_support_format_all.c   Tue Dec 20 
20:29:45 2011(r228747)
+++ head/lib/libarchive/archive_read_support_format_all.c   Tue Dec 20 
20:34:02 2011(r228748)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2003-2007 Tim Kientzle
+ * Copyright (c) 2003-2011 Tim Kientzle
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -39,5 +39,13 @@ archive_read_support_format_all(struct a
archive_read_support_format_tar(a);
archive_read_support_format_xar(a);
archive_read_support_format_zip(a);
+
+   /* Note: We always return ARCHIVE_OK here, even if some of the
+* above return ARCHIVE_WARN.  The intent here is to enable
+* as much as possible.  Clients who need specific
+* compression should enable those individually so they can
+* verify the level of support. */
+   /* Clear any warning messages set by the above functions. */
+   archive_clear_error(a);
return (ARCHIVE_OK);
 }

Modified: head/lib/libarchive/archive_read_support_format_iso9660.c
==
--- head/lib/libarchive/archive_read_support_format_iso9660.c   Tue Dec 20 
20:29:45 2011(r228747)
+++ head/lib/libarchive/archive_read_support_format_iso9660.c   Tue Dec 20 
20:34:02 2011(r228748)
@@ -302,6 +302,8 @@ struct file_info {
struct file_info*first;
struct file_info**last;
} rede_files;
+   /* To check a ininity loop. */
+   struct file_info*loop_by;
 };
 
 struct heap_queue {
@@ -2699,8 +2701,14 @@ rede_add_entry(struct file_info *file)
struct file_info *re;
 
re = file-parent;
-   while (re != NULL  !re-re)
+   while (re != NULL  !re-re) {
+   /* Sanity check to prevent a infinity loop
+* cause by a currupted iso file. */
+   if (re-loop_by == file)
+   return (-1);
+   re-loop_by = file;
re = re-parent;
+   }
if (re == NULL)
return (-1);
 

Modified: head/lib/libarchive/archive_string.c
==
--- head/lib/libarchive/archive_string.cTue Dec 20 20:29:45 2011
(r228747)
+++ head/lib/libarchive/archive_string.cTue Dec 20 20:34:02 2011
(r228748)
@@ -152,7 +152,7 @@ __archive_strncat(struct archive_string 
/* Like strlen(p), except won't examine positions beyond p[n]. */
s = 0;
pp = p;
-   while (*pp  s  n) {
+   while (s  n  *pp) {
pp++;
s++;
}

Modified: head/lib/libarchive/archive_util.c
==
--- head/lib/libarchive/archive_util.c  Tue Dec 20 20:29:45 2011
(r228747)
+++ head/lib/libarchive/archive_util.c  Tue Dec 20 20:34:02 2011
(r228748)
@@ -155,6 +155,7 @@ archive_clear_error(struct archive *a)
 {
archive_string_empty(a-error_string);
a-error = NULL;
+   a-archive_error_number = 0;
 }
 
 void

Modified: head/lib/libarchive/archive_write_disk.c
==
--- head/lib/libarchive/archive_write_disk.cTue Dec 20 20:29:45 2011
(r228747)
+++ head/lib/libarchive/archive_write_disk.cTue Dec 20 20:34:02 2011
(r228748)
@@ -1513,6 +1513,22 @@ check_symlinks(struct archive_write_disk
 }
 
 #if defined(_WIN32) || defined(__CYGWIN__)
+static int
+guidword(const char *p, int n)
+{
+   int i;
+
+   for (i = 0; i  n; i++) {
+   if ((*p = '0'  *p = '9') ||
+   (*p = 'a'  *p = 'f') ||
+   (*p = 'A'  *p = 

svn commit: r228749 - head/usr.bin/tar

2011-12-20 Thread Martin Matuska
Author: mm
Date: Tue Dec 20 20:36:00 2011
New Revision: 228749
URL: http://svn.freebsd.org/changeset/base/228749

Log:
  Sync bsdtar with vendor branch release/2.8:
  
  Revision 3769:
  Merge r3744 from trunk:  Correctly return errors when reading
  an archive using @archive extension.
  
  Obtained from:http://code.google.com/p/libarchive
  MFC after:2 weeks

Modified:
  head/usr.bin/tar/write.c

Modified: head/usr.bin/tar/write.c
==
--- head/usr.bin/tar/write.cTue Dec 20 20:34:02 2011(r228748)
+++ head/usr.bin/tar/write.cTue Dec 20 20:36:00 2011(r228749)
@@ -592,7 +592,7 @@ append_archive(struct bsdtar *bsdtar, st
struct archive_entry *in_entry;
int e;
 
-   while (0 == archive_read_next_header(ina, in_entry)) {
+   while (ARCHIVE_OK == (e = archive_read_next_header(ina, in_entry))) {
if (!new_enough(bsdtar, archive_entry_pathname(in_entry),
archive_entry_stat(in_entry)))
continue;
@@ -630,8 +630,7 @@ append_archive(struct bsdtar *bsdtar, st
fprintf(stderr, \n);
}
 
-   /* Note: If we got here, we saw no write errors, so return success. */
-   return (0);
+   return (e == ARCHIVE_EOF ? ARCHIVE_OK : e);
 }
 
 /* Helper function to copy data between archives. */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228750 - head/usr.bin/cpio/test

2011-12-20 Thread Martin Matuska
Author: mm
Date: Tue Dec 20 20:37:17 2011
New Revision: 228750
URL: http://svn.freebsd.org/changeset/base/228750

Log:
  Sync bsdcpio with vendor branch release/2.8:
  
  Revision 3770:
  Merge r3768 from trunk: Fix typo in dev/ino verification for cpio formats.
  
  Obtained from:http://code.google.com/p/libarchive
  MFC after:2 weeks

Modified:
  head/usr.bin/cpio/test/test_option_c.c

Modified: head/usr.bin/cpio/test/test_option_c.c
==
--- head/usr.bin/cpio/test/test_option_c.c  Tue Dec 20 20:36:00 2011
(r228749)
+++ head/usr.bin/cpio/test/test_option_c.c  Tue Dec 20 20:37:17 2011
(r228750)
@@ -176,7 +176,7 @@ DEFINE_TEST(test_option_c)
assertEqualInt(dev, from_octal(e + 6, 6));
/* Ino must be different from first entry. */
assert(is_octal(e + 12, 6)); /* ino */
-   assert(dev != from_octal(e + 12, 6));
+   assert(ino != from_octal(e + 12, 6));
 #if defined(_WIN32)  !defined(__CYGWIN__)
/* Group members bits and others bits do not work. */
assertEqualMem(e + 18, 040777, 6); /* Mode */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228751 - head/sbin/fsck_ffs

2011-12-20 Thread Konstantin Belousov
Author: kib
Date: Tue Dec 20 20:39:00 2011
New Revision: 228751
URL: http://svn.freebsd.org/changeset/base/228751

Log:
  Change the type of real_dev_bsize variable from long to u_int.
  The DIOCGSECTORSIZE takes u_int * as an argument, using long *
  causes failures on big-endian targets.
  
  Diagnosed by: Michiel Boland boland37 xs4all nl
  PR:   sparc64/163460
  Tested by:pho (x86), flo (sparc64)
  MFC after:1 week

Modified:
  head/sbin/fsck_ffs/fsck.h
  head/sbin/fsck_ffs/suj.c

Modified: head/sbin/fsck_ffs/fsck.h
==
--- head/sbin/fsck_ffs/fsck.h   Tue Dec 20 20:37:17 2011(r228750)
+++ head/sbin/fsck_ffs/fsck.h   Tue Dec 20 20:39:00 2011(r228751)
@@ -268,7 +268,7 @@ charsnapname[BUFSIZ];   /* when doing sna
 char   *cdevname;  /* name of device being checked */
 long   dev_bsize;  /* computed value of DEV_BSIZE */
 long   secsize;/* actual disk sector size */
-long   real_dev_bsize;
+u_int  real_dev_bsize; /* actual disk sector size, not overriden */
 char   nflag;  /* assume a no response */
 char   yflag;  /* assume a yes response */
 intbkgrdflag;  /* use a snapshot to run on an active system */

Modified: head/sbin/fsck_ffs/suj.c
==
--- head/sbin/fsck_ffs/suj.cTue Dec 20 20:37:17 2011(r228750)
+++ head/sbin/fsck_ffs/suj.cTue Dec 20 20:39:00 2011(r228751)
@@ -206,7 +206,7 @@ opendisk(const char *devnam)
real_dev_bsize) == -1)
real_dev_bsize = secsize;
if (debug)
-   printf(dev_bsize %ld\n, real_dev_bsize);
+   printf(dev_bsize %u\n, real_dev_bsize);
 }
 
 /*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228750 - head/usr.bin/cpio/test

2011-12-20 Thread John Baldwin
On Tuesday, December 20, 2011 3:37:17 pm Martin Matuska wrote:
 Author: mm
 Date: Tue Dec 20 20:37:17 2011
 New Revision: 228750
 URL: http://svn.freebsd.org/changeset/base/228750
 
 Log:
   Sync bsdcpio with vendor branch release/2.8:
   
   Revision 3770:
   Merge r3768 from trunk: Fix typo in dev/ino verification for cpio formats.
   
   Obtained from:  http://code.google.com/p/libarchive
   MFC after:  2 weeks

If libarchive is now maintained externally rather than in the tree, is it time 
for bsdtar, bsdcpio, and libarchive to move to contrib and for vendor imports 
to be managed as they are for other contrib bits?

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228752 - head/share/misc

2011-12-20 Thread Jason Helfman
Author: jgh (ports committer)
Date: Tue Dec 20 21:16:49 2011
New Revision: 228752
URL: http://svn.freebsd.org/changeset/base/228752

Log:
  Add myself with mentor relationships
  Add tabthorpe - crees
  
  Approved by: crees (mentor)

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotTue Dec 20 20:39:00 2011
(r228751)
+++ head/share/misc/committers-ports.dotTue Dec 20 21:16:49 2011
(r228752)
@@ -99,6 +99,7 @@ ijliao [label=Ying-Chieh Liao\nijliao@F
 itetcu [label=Ion-Mihai Tetcu\nite...@freebsd.org\n2006/06/07]
 jacula [label=Giuseppe Pilichi\njac...@freebsd.org\n2010/04/05]
 jadawin [label=Philippe Audeoud\njada...@freebsd.org\n2008/03/02]
+jgh [label=Jason Helfman\n...@freebsd.org\n2011/12/16]
 jkim [label=Jung-uk Kim\nj...@freebsd.org\n2007/09/12]
 jlaffaye [label=Julien Laffaye\njlaff...@freebsd.org\n2011/06/06]
 jmelo [label=Jean Milanez Melo\njm...@freebsd.org\n2006/03/31]
@@ -234,6 +235,8 @@ clement - lawrance
 clsung - lwhsu
 clsung - tabthorpe
 
+crees - jgh
+
 delphij - nemoliu
 delphij - rafan
 
@@ -395,6 +398,7 @@ philip - koitsu
 rafan - chinsan
 
 rene - crees
+rene - jgh
 
 sahil - culot
 sahil - eadler
@@ -422,6 +426,7 @@ tabthorpe - ashish
 tabthorpe - avilla
 tabthorpe - avl
 tabthorpe - bapt
+tabthorpe - crees
 tabthorpe - dhn
 tabthorpe - fluffy
 tabthorpe - jacula
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228755 - head/lib/libc/gen

2011-12-20 Thread Eitan Adler
Author: eadler (ports committer)
Date: Tue Dec 20 22:56:44 2011
New Revision: 228755
URL: http://svn.freebsd.org/changeset/base/228755

Log:
  - Fix style(9) bugs in glob.c
  
  Approved by:  jilles

Modified:
  head/lib/libc/gen/glob.c

Modified: head/lib/libc/gen/glob.c
==
--- head/lib/libc/gen/glob.cTue Dec 20 22:56:13 2011(r228754)
+++ head/lib/libc/gen/glob.cTue Dec 20 22:56:44 2011(r228755)
@@ -232,9 +232,9 @@ glob(const char * __restrict pattern, in
*bufnext = EOS;
 
if (flags  GLOB_BRACE)
-   return globexp1(patbuf, pglob, limit);
+   return (globexp1(patbuf, pglob, limit));
else
-   return glob0(patbuf, pglob, limit);
+   return (glob0(patbuf, pglob, limit));
 }
 
 /*
@@ -304,7 +304,7 @@ globexp2(const Char *ptr, const Char *pa
/* Non matching braces; just glob the pattern */
if (i != 0 || *pe == EOS) {
*rv = glob0(patbuf, pglob, limit);
-   return 0;
+   return (0);
}
 
for (i = 0, pl = pm = ptr; pm = pe; pm++)
@@ -361,7 +361,7 @@ globexp2(const Char *ptr, const Char *pa
break;
}
*rv = 0;
-   return 0;
+   return (0);
 }
 
 
@@ -378,7 +378,7 @@ globtilde(const Char *pattern, Char *pat
Char *b, *eb;
 
if (*pattern != TILDE || !(pglob-gl_flags  GLOB_TILDE))
-   return pattern;
+   return (pattern);
 
/* 
 * Copy up to the end of the string or / 
@@ -403,7 +403,7 @@ globtilde(const Char *pattern, Char *pat
(pwd = getpwuid(getuid())) != NULL)
h = pwd-pw_dir;
else
-   return pattern;
+   return (pattern);
}
}
else {
@@ -411,7 +411,7 @@ globtilde(const Char *pattern, Char *pat
 * Expand a ~user
 */
if ((pwd = getpwnam((char*) patbuf)) == NULL)
-   return pattern;
+   return (pattern);
else
h = pwd-pw_dir;
}
@@ -425,7 +425,7 @@ globtilde(const Char *pattern, Char *pat
continue;
*b = EOS;
 
-   return patbuf;
+   return (patbuf);
 }
 
 
@@ -512,20 +512,20 @@ glob0(const Char *pattern, glob_t *pglob
if (((pglob-gl_flags  GLOB_NOCHECK) ||
((pglob-gl_flags  GLOB_NOMAGIC) 
!(pglob-gl_flags  GLOB_MAGCHAR
-   return(globextend(pattern, pglob, limit));
+   return (globextend(pattern, pglob, limit));
else
-   return(GLOB_NOMATCH);
+   return (GLOB_NOMATCH);
}
if (!(pglob-gl_flags  GLOB_NOSORT))
qsort(pglob-gl_pathv + pglob-gl_offs + oldpathc,
pglob-gl_pathc - oldpathc, sizeof(char *), compare);
-   return(0);
+   return (0);
 }
 
 static int
 compare(const void *p, const void *q)
 {
-   return(strcmp(*(char **)p, *(char **)q));
+   return (strcmp(*(char **)p, *(char **)q));
 }
 
 static int
@@ -535,8 +535,8 @@ glob1(Char *pattern, glob_t *pglob, size
 
/* A null pathname is invalid -- POSIX 1003.1 sect. 2.4. */
if (*pattern == EOS)
-   return(0);
-   return(glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1,
+   return (0);
+   return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1,
pattern, pglob, limit));
 }
 
@@ -561,7 +561,7 @@ glob2(Char *pathbuf, Char *pathend, Char
if (*pattern == EOS) {  /* End of pattern? */
*pathend = EOS;
if (g_lstat(pathbuf, sb, pglob))
-   return(0);
+   return (0);
 
if (((pglob-gl_flags  GLOB_MARK) 
pathend[-1] != SEP)  (S_ISDIR(sb.st_mode)
@@ -574,7 +574,7 @@ glob2(Char *pathbuf, Char *pathend, Char
*pathend = EOS;
}
++pglob-gl_matchc;
-   return(globextend(pathbuf, pglob, limit));
+   return (globextend(pathbuf, pglob, limit));
}
 
/* Find end of next segment, copy tentatively to pathend. */
@@ -597,8 +597,8 @@ glob2(Char *pathbuf, Char *pathend, Char
*pathend++ = *pattern++;
}
} else  /* Need expansion, recurse. */
-   return(glob3(pathbuf, pathend, pathend_last, pattern, p,
-   pglob, limit));
+   return (glob3(pathbuf, pathend, pathend_last, pattern,

Re: svn commit: r228143 - in head: . share/mk tools/build/options

2011-12-20 Thread Doug Barton
On 12/20/2011 06:08, John Baldwin wrote:
 The defaults for src.conf should be for the common case

Agreed. The problem we seem to be missing here is that developers are
not even statistically significant in measuring the common case.


-- 

[^L]

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228143 - in head: . share/mk tools/build/options

2011-12-20 Thread Doug Barton
On 12/20/2011 18:29, Ben Kaduk wrote:
 2011/12/20 Doug Barton do...@freebsd.org:
 On 12/20/2011 06:08, John Baldwin wrote:
 The defaults for src.conf should be for the common case

 Agreed. The problem we seem to be missing here is that developers are
 not even statistically significant in measuring the common case.
 
 The common case of what, though?  People using src.conf, or
 people rebuilding world, or just people using FreeBSD?

The latter of course. The overwhelming majority of FreeBSD users will
never use profiled libs, and in fact don't even know what they are. It's
just useless space being taken up on every install. The defaults should
be sensible for our users.

The people who actually need to use profiled libs intersects perfectly
with the set of people who know how to enable the knob in src.conf.
Disabling this by default is a total no-brainer. The fact that it's
generated such vehement objection by a miniscule percentage of our user
base (read, the developers who still use them) is clearly indicative of
a much larger problem. I think Warner summed it up best: The needs of
the many?  Please.

The battle between the forces who see FreeBSD primarily as a hobby
project (We're the developers, we do what we like because we like it.)
vs. those who'd like to move things in a direction that's more focused
on the unwashed masses who actually use the thing, has been going on
for a long time. This issue is a good example.


Doug (and a sad one)

-- 

[^L]

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228143 - in head: . share/mk tools/build/options

2011-12-20 Thread Steve Kargl
On Tue, Dec 20, 2011 at 06:45:07PM -0800, Doug Barton wrote:
 On 12/20/2011 18:29, Ben Kaduk wrote:
  2011/12/20 Doug Barton do...@freebsd.org:
  On 12/20/2011 06:08, John Baldwin wrote:
  The defaults for src.conf should be for the common case
 
  Agreed. The problem we seem to be missing here is that developers are
  not even statistically significant in measuring the common case.
  
  The common case of what, though?  People using src.conf, or
  people rebuilding world, or just people using FreeBSD?
 
 The latter of course. The overwhelming majority of FreeBSD users will
 never use profiled libs, and in fact don't even know what they are. It's
 just useless space being taken up on every install. The defaults should
 be sensible for our users.

OK, Doug, we get it! You don't like profiled libraries.
You don't use them, and by extension the 'common user'
does not use them.

-- 
Steve
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228143 - in head: . share/mk tools/build/options

2011-12-20 Thread Garrett Cooper
On Tue, Dec 20, 2011 at 8:55 PM, Steve Kargl
s...@troutmask.apl.washington.edu wrote:
 On Tue, Dec 20, 2011 at 06:45:07PM -0800, Doug Barton wrote:
 On 12/20/2011 18:29, Ben Kaduk wrote:
  2011/12/20 Doug Barton do...@freebsd.org:
  On 12/20/2011 06:08, John Baldwin wrote:
  The defaults for src.conf should be for the common case
 
  Agreed. The problem we seem to be missing here is that developers are
  not even statistically significant in measuring the common case.
 
  The common case of what, though?  People using src.conf, or
  people rebuilding world, or just people using FreeBSD?

 The latter of course. The overwhelming majority of FreeBSD users will
 never use profiled libs, and in fact don't even know what they are. It's
 just useless space being taken up on every install. The defaults should
 be sensible for our users.

 OK, Doug, we get it! You don't like profiled libraries.
 You don't use them, and by extension the 'common user'
 does not use them.

The point that I was trying to drive home (that I think Doug is as well) is:
- How many FreeBSD users are developers/performance/test engineers who
care about this stuff being compiled into the base system?
- How many developers use gprof / profiled libraries?
- How many developers reroll their world by turning on WITH_PROFILE ?
- How often do you use gprof to profile binaries?
Smart defaults and better tuning are what we ultimately should be
striving for, because again, WITH_PROFILE is a developer and not a
end-user / administrator convenience. Those are the individuals we
should be tailoring FreeBSD for -- not developers.
Thanks,
-Garrett
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org