]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
13 years agoMFC: r204646
marius [Sun, 17 Oct 2010 12:11:42 +0000 (12:11 +0000)]
MFC: r204646

The NetBSD Foundation has granted permission to remove clause 3 and 4 from
the software.

Obtained from: NetBSD

git-svn-id: svn://svn.freebsd.org/base/stable/8@213956 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r213104
marius [Sun, 17 Oct 2010 12:05:37 +0000 (12:05 +0000)]
MFC: r213104

minor simplifications and cosmetics

git-svn-id: svn://svn.freebsd.org/base/stable/8@213954 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r213873
marius [Sun, 17 Oct 2010 11:51:55 +0000 (11:51 +0000)]
MFC: r213873

Explicitly lower the PIL to 0 as part of enabling interrupts, similar to
what is done on other platforms. Unlike as with the sched_throw(NULL)
called on BSPs during their startup apparently there's nothing which will
reliably lower it on APs. I'm unsure why this only came up on V215 though,
breaking these with r207248. My best guess is that these are the only
supported ones so far fast enough to lose some race.

PR: 151404

git-svn-id: svn://svn.freebsd.org/base/stable/8@213952 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213835: Add FreeBSD 8.2.
jh [Sun, 17 Oct 2010 11:40:29 +0000 (11:40 +0000)]
MFC r213835: Add FreeBSD 8.2.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213951 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213837:
bz [Sun, 17 Oct 2010 09:13:47 +0000 (09:13 +0000)]
MFC r213837:

  Remove dead code:
  assignment to a local variable not used anywhere after that.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213949 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213836:
bz [Sun, 17 Oct 2010 08:59:02 +0000 (08:59 +0000)]
MFC r213836:

  Style: make the asterisk go with the variable name, not the type.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213948 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213832:
bz [Sun, 17 Oct 2010 08:46:34 +0000 (08:46 +0000)]
MFC r213832:

  Use ifa_ifwithaddr_check() rather than ifa_ifwithaddr() as we are not
  interested in the result and would leak a reference otherwise.

PR: kern/151435
Submitted by: Andrew Boyer (aboyer averesystems.com)

git-svn-id: svn://svn.freebsd.org/base/stable/8@213947 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoRevert r213261 (MFC of r212652): vm_page_sleep change has not been MFCed yet
avg [Sat, 16 Oct 2010 20:13:15 +0000 (20:13 +0000)]
Revert r213261 (MFC of r212652): vm_page_sleep change has not been MFCed yet

git-svn-id: svn://svn.freebsd.org/base/stable/8@213936 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213648: panic_cpu variable should be volatile
avg [Sat, 16 Oct 2010 19:58:49 +0000 (19:58 +0000)]
MFC r213648: panic_cpu variable should be volatile

git-svn-id: svn://svn.freebsd.org/base/stable/8@213934 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213735: tmpfs + sendfile: do not produce partially valid pages for
avg [Sat, 16 Oct 2010 19:56:46 +0000 (19:56 +0000)]
MFC r213735: tmpfs + sendfile: do not produce partially valid pages for
vnode's tail

git-svn-id: svn://svn.freebsd.org/base/stable/8@213933 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213730: zfs + sendfile: do not produce partially valid pages for
avg [Sat, 16 Oct 2010 11:52:43 +0000 (11:52 +0000)]
MFC r213730: zfs + sendfile: do not produce partially valid pages for
vnode's tail

git-svn-id: svn://svn.freebsd.org/base/stable/8@213924 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213651: add kmem_map_free sysctl: query largest contiguous free range in kmem_map
avg [Sat, 16 Oct 2010 11:24:27 +0000 (11:24 +0000)]
MFC r213651: add kmem_map_free sysctl: query largest contiguous free range in kmem_map

git-svn-id: svn://svn.freebsd.org/base/stable/8@213921 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213527: vm.kmem_map_size: a sysctl to query current kmem_map->size
avg [Sat, 16 Oct 2010 11:19:31 +0000 (11:19 +0000)]
MFC r213527: vm.kmem_map_size: a sysctl to query current kmem_map->size

git-svn-id: svn://svn.freebsd.org/base/stable/8@213919 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213359:
kib [Sat, 16 Oct 2010 08:43:23 +0000 (08:43 +0000)]
MFC r213359:
Release the vnode lock and close the linker file vnode earlier in the
linker_load_file methods. This prevents the LOR between kernel linker sx
xlock and vnode lock.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213915 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213354:
kib [Sat, 16 Oct 2010 08:38:12 +0000 (08:38 +0000)]
MFC r213354:
Cosmetic: make it less confusing when displaying RAID 1 level, that might
be 1+0 as well.

PR: kern/150936

git-svn-id: svn://svn.freebsd.org/base/stable/8@213914 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209866:
kib [Fri, 15 Oct 2010 18:07:45 +0000 (18:07 +0000)]
MFC r209866:
Fix spacing.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213902 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209862:
kib [Fri, 15 Oct 2010 17:56:51 +0000 (17:56 +0000)]
MFC r209862:
For both i386 and amd64 pmap,
- change the type of pm_active to cpumask_t, which it is;
- in pmap_remove_pages(), compare with PCPU(curpmap), instead of
  dereferencing the long chain of pointers [1].
For amd64 pmap, remove the unneeded checks for validity of curpmap
in pmap_activate(), since curpmap should be always valid after
r209789.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213901 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213284: tr: Fix '[=]=]' equivalence class.
jilles [Fri, 15 Oct 2010 15:37:16 +0000 (15:37 +0000)]
MFC r213284: tr: Fix '[=]=]' equivalence class.

A closing bracket immediately after '[=' should not be treated as special.

Different from the submitted patch, a string ending with '[=' does not cause
access beyond the terminating '\0'.

PR: bin/150384
Submitted by: Richard Lowe

git-svn-id: svn://svn.freebsd.org/base/stable/8@213899 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209605
alc [Fri, 15 Oct 2010 05:42:35 +0000 (05:42 +0000)]
MFC r209605
  Improve bufdone_finish()'s handling of the bogus page.  Specifically, if
  one or more mappings to the bogus page must be replaced, call pmap_qenter()
  just once.  Previously, pmap_qenter() was called for each mapping to the
  bogus page.

MFC r209902
  Change the implementation of vm_hold_free_pages() so that it performs at
  most one call to pmap_qremove(), and thus one TLB shootdown, instead of one
  call and TLB shootdown per page.

  Simplify the interface to vm_hold_free_pages().

git-svn-id: svn://svn.freebsd.org/base/stable/8@213890 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of r204697 r204706 r204849 r204908 r205071 r205427 r212032
edwin [Fri, 15 Oct 2010 05:17:48 +0000 (05:17 +0000)]
MFC of r204697 r204706 r204849 r204908 r205071 r205427 r212032

r212032:

    Use basename(3) to determine the name of the program.

    Submitted by:   Alexander Best <arundel@>

r205427:

    Replace -b with -C and -B (as proposed by Alexander).
    Add -3, -A and -B to the usage.
    Update regression test for the new parameters.

r205071:

    - With the introduction of -A, -B and -3, not all combinations of
      arguments makes sense anymore. For example, what would a combination
      of -3 (show three months) and -y (show the whole year) do?
      We will abort on these cases.
    - Move the debug option -d to -H (from highlight), while -d is now
      used for setting the day of "today" so that -y and friends can
      be tested.

r204908:

    - Fix the highlighting for non-terminals when the last week is not
      7 days long.
    - "-m <N> <YYYY>" now prints only the month, not the whole year.

r204849:

    - document the -3, -A and -B properly in Synopsis.
    - add highlight of current date for non-terminals.
    - fix -J option.
    - code cleanup.

r204706:

Remove no-op of WARNS?=

    Submitted by:   Ulrich Sp??rlein <uqs@spoerlein.net>

r204697:

    - Implement -3 option (show previous, this and next month) option.
    - Add -A option (months after this month).
    - Add -B option (months before this month).
    - Fix highlighting of today in year overview.
    - Fix aligning of "foreign" characters.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213889 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210124
alc [Fri, 15 Oct 2010 04:02:07 +0000 (04:02 +0000)]
MFC r210124
  Optimize pmap_remove()'s handling of PG_G mappings.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213888 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209789
alc [Fri, 15 Oct 2010 03:23:53 +0000 (03:23 +0000)]
MFC r209789
  Correctly maintain the per-cpu field "curpmap" on amd64 just like we
  do on i386.  The consequences of not doing so on amd64 became apparent
  with the introduction of the COUNT_IPIS and COUNT_XINVLTLB_HITS
  options.  Specifically, single-threaded applications were generating
  unnecessary IPIs to shoot-down the TLB on other processors.

MFC r209887
  Reduce the number of global TLB shootdowns generated by pmap_qenter().
  Specifically, teach pmap_qenter() to recognize the case when it is being
  asked to replace a mapping with the very same mapping and not generate
  a shootdown.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213887 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212873
alc [Fri, 15 Oct 2010 02:58:49 +0000 (02:58 +0000)]
MFC r212873
  Allow a POSIX shared memory object that is opened for read but not for
  write to nonetheless be mapped PROT_WRITE and MAP_PRIVATE, i.e.,
  copy-on-write.

PR: 150260

git-svn-id: svn://svn.freebsd.org/base/stable/8@213886 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of r213875
edwin [Thu, 14 Oct 2010 21:58:51 +0000 (21:58 +0000)]
MFC of r213875

Update manual with regarding to the status of calendars/calendar.judaic.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213877 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of r211517 r212035
edwin [Thu, 14 Oct 2010 21:38:20 +0000 (21:38 +0000)]
MFC of r211517 r212035

r211517:
'\0' -> 0

Fix silly mistake by being overly zeaolous[sp] of applying the style rules.

r212035:
For calendars which don't match the solar-based Gregorian calendar,
be able to specify a year string in an entry.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213870 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of r213032 r213033
edwin [Thu, 14 Oct 2010 21:16:14 +0000 (21:16 +0000)]
MFC of r213032 r213033

Fix location and year of the Battle of the Plains of Abraham

PR:             150504
Submitted by:   Douglas Berry <bitnix@bitnix.ca>

git-svn-id: svn://svn.freebsd.org/base/stable/8@213859 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213406:
nwhitehorn [Thu, 14 Oct 2010 13:56:26 +0000 (13:56 +0000)]
MFC r213406:

Fix two subtle problems in PPC32 RTLD. The first is a concurrency issue
where long PLT calls in multi-threaded environments could end up with
incorrect jmptab values. The second is that, after the addition of extended
PLT support, I forgot to update the PLT icache synchronization code to cover
the extended PLT instead of just the basic PLT.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213833 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213508:
kib [Thu, 14 Oct 2010 09:29:59 +0000 (09:29 +0000)]
MFC r213508:
Explicitely call cache_purge(fvp) when msdosfs_rename() succeeded, to flush
aliases created due to msdosfs being case-insensitive.

MFC r213543:
Add a comment describing the reason for calling cache_purge(fvp).

git-svn-id: svn://svn.freebsd.org/base/stable/8@213830 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212832: update manpage
obrien [Thu, 14 Oct 2010 03:11:41 +0000 (03:11 +0000)]
MFC r212832: update manpage

git-svn-id: svn://svn.freebsd.org/base/stable/8@213827 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212771:
obrien [Thu, 14 Oct 2010 02:10:49 +0000 (02:10 +0000)]
MFC r212771:
  Increase the hostname display width to >12 characters.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213825 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212770 & r212832:
obrien [Thu, 14 Oct 2010 01:21:44 +0000 (01:21 +0000)]
MFC r212770 & r212832:
  + Add the SCRIPT environmental variable to the sub-shell.
  + Add the 'command' argument (if supplied on the command line)
    to the typescript file.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213817 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212594:
emaste [Thu, 14 Oct 2010 00:46:33 +0000 (00:46 +0000)]
MFC r212594:

  Avoid repeatedly spamming the console while a timed out command is waiting
  to complete.  Instead, print one message after the timeout period expires,
  and one more when (if) the command eventually completes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213816 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r200036 by scottl:
jh [Wed, 13 Oct 2010 14:02:45 +0000 (14:02 +0000)]
MFC r200036 by scottl:

Fix several cases where the periph lock was held over malloc.

PR: kern/130735

git-svn-id: svn://svn.freebsd.org/base/stable/8@213776 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213476:
kib [Wed, 13 Oct 2010 11:39:36 +0000 (11:39 +0000)]
MFC r213476:
Add cross-references to lrand48(3) and arc4random(3) from rand(3)
and random(3).

MFC r213477:
Missed space.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213773 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 213691:
gnn [Tue, 12 Oct 2010 22:10:07 +0000 (22:10 +0000)]
MFC 213691:

Add code to print the number and type of the CPU that is present in
the system as well has how many PMCs there are per CPU.  In this code
CPU and core are equivalent.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213753 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 213226:
jhb [Tue, 12 Oct 2010 19:28:20 +0000 (19:28 +0000)]
MFC 213226:
Rewrite the i386 memory probe:
- Check for SMAP data from the loader first.  If it exists, don't bother
  doing any VM86 calls at all.  This will be more friendly for non-BIOS
  boot environments such as EFI, etc.
- Move the base memory setup into a new basemem_setup() routine instead
  of duplicating it.
- Simplify the XEN case by removing all of the VM86/SMAP parsing code rather
  than just jumping over it.
- Adjust some comments to better explain the code flow.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213745 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 204310:
gnn [Tue, 12 Oct 2010 19:07:36 +0000 (19:07 +0000)]
MFC 204310:

Moved mcgrab(1) into a separate directory -- our .mk infrastructure
doesn't currently have support for building multiple programs in a
single makefile.

While here, fixed manpages and makefiles (missing dependencies).

git-svn-id: svn://svn.freebsd.org/base/stable/8@213741 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 213300:
jhb [Tue, 12 Oct 2010 17:12:13 +0000 (17:12 +0000)]
MFC 213300:
If an RCS file is truncated, rcsfile_getdelta() will return NULL.  Instead
of faulting, check for NULL.  However, returning an error would cause csup
to just abort the entire update.  Instead, break out of the loop and
return ok.  The attempts to update the file will trigger a MD5 failure which
will cause csup to download the entire file as a fixup.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213732 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 213268:
jhb [Tue, 12 Oct 2010 16:23:50 +0000 (16:23 +0000)]
MFC 213268:
If rt2560_bbp_init() fails, don't drop the lock as the callers of
rt2560_init_locked() expect the lock to be held on return.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213728 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 213028,213328:
jhb [Tue, 12 Oct 2010 16:08:20 +0000 (16:08 +0000)]
MFC 213028,213328:
- Expand scope of tun/tap softc locks to cover more softc fields and
  driver-maintained ifnet fields (such as if_drv_flags).
- Use soft locks as the mutex that protects each interface's knote list
  rather than using the global knote list lock.  Also, use the softc
  for kn_hook instead of the cdev.
- Use mtx_sleep() instead of tsleep() when blocking in the read routines.
  This fixes a lost wakeup race.
- Remove D_NEEDGIANT now that the cdevsw routines use the softc lock
  where locking is needed.
- Lock IFQ when calculating the result for FIONREAD in tap(4).  tun(4)
  already did this.
- Remove remaining spl calls.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213726 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 213271:
jhb [Tue, 12 Oct 2010 15:48:14 +0000 (15:48 +0000)]
MFC 213271:
Account for unlocking a spin mutex in the lock profiling code in the !SMP
case.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213723 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 212974:
jhb [Tue, 12 Oct 2010 15:26:13 +0000 (15:26 +0000)]
MFC 212974:
Comment nit, set TDF_NEEDRESCHED after the comment describing why it is
done rather than before.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213721 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 205021:
jhb [Tue, 12 Oct 2010 13:13:20 +0000 (13:13 +0000)]
MFC 205021:
- Use an initializer macro to initialize fields in 'fake' FILE objects used
  by *sprintf(), etc.
- Explicitly initialize _fl_mutex to PTHREAD_MUTEX_INITIALIZER for all FILE
  objects.  This is currently a nop on FreeBSD, but is import for other
  platforms (or in the future) where PTHREAD_MUTEX_INITIALIZER is not simply
  zero.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213720 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213452:
kib [Tue, 12 Oct 2010 09:10:24 +0000 (09:10 +0000)]
MFC r213452:
Display PCID capability of CPU and add CPUID define for it.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213715 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210977:
avg [Mon, 11 Oct 2010 22:46:15 +0000 (22:46 +0000)]
MFC r210977:

When EC burst mode is activated and multiple bytes are accessed, do not
disable and enable repeatedly, just do it once per call.  It also reduces
code duplication.  Check all parameters early and fail immediately.

On behalf of: jkim

git-svn-id: svn://svn.freebsd.org/base/stable/8@213709 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208722: Remove unnecessary pointer type castings, shift operations
avg [Mon, 11 Oct 2010 22:41:01 +0000 (22:41 +0000)]
MFC r208722: Remove unnecessary pointer type castings, shift operations
and dead code.

On behalf of: jkim

git-svn-id: svn://svn.freebsd.org/base/stable/8@213706 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 213409:
gnn [Mon, 11 Oct 2010 21:23:07 +0000 (21:23 +0000)]
MFC 213409:

Fix two aliases that had the same name but were pointing to different
events.  These are now disamiguated.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213701 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 213402:
gnn [Mon, 11 Oct 2010 16:55:17 +0000 (16:55 +0000)]
MFC 213402:
Fix punctuation and grammar, mostly by ending sentences with a period.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213692 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213225:
delphij [Mon, 11 Oct 2010 11:25:37 +0000 (11:25 +0000)]
MFC r213225:

Add a bandaid for a long-standing race condition during route entry
un-expiring.

The previous version of code have no locking when testing rt_refcnt.
The result of the lack of locking may result in a condition where
a routing entry have a reference count but at the same time have
RTPRF_OURS bit set and an expiration timer.  These would eventually
lead to a panic:

panic: rtqkill route really not free

When the system have ICMP redirects accepted from local gateway
in a moderate frequency, for instance.

Commit this workaround for now until we have some better solution.

PR: kern/149804
Reviewed by: bz
Tested by: Zhao Xin, Pete French

git-svn-id: svn://svn.freebsd.org/base/stable/8@213687 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoRegen.
kib [Mon, 11 Oct 2010 09:42:30 +0000 (09:42 +0000)]
Regen.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213686 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213544:
kib [Mon, 11 Oct 2010 09:41:24 +0000 (09:41 +0000)]
MFC r213544:
Fix typo.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213685 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoGPART's control interface between kernel and user space has been
ae [Mon, 11 Oct 2010 09:39:32 +0000 (09:39 +0000)]
GPART's control interface between  kernel and user space has been
changed in r212614. Perform partial MFC of r213097 adapted to the
stable ABI:

  Implement "force" (-F) option for gpart destroy verb.
  This option doesn't passed to kernel and handled in user-space.
  With -F option gpart creates new "delete" request for each
  partition in table. Each request has flags="X" that disables
  auto-commit feature. Last request is the original "destroy" request.
  It has own flags and can have disabled or enabled auto-commit feature.
  If error is occurred when deleting partitions, then new "undo" request
  is created and all changes will be rolled back.

Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@213684 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210470:
mm [Mon, 11 Oct 2010 09:34:46 +0000 (09:34 +0000)]
MFC r210470:

Import two changesets from OpenSolaris to make future updates easier.

The changes do not affect FreeBSD code because
zfs_znode_move(), cleanlocks() and cleanshares() are not used.

OpenSolaris onnv changeset: 9788:f660bc44f2e8, 9909:aa280f585a3e

Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 68437006790232)

git-svn-id: svn://svn.freebsd.org/base/stable/8@213683 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212373:
kaiw [Sun, 10 Oct 2010 12:20:04 +0000 (12:20 +0000)]
MFC r212373:

  libelf is overly strict about the type and alignment of Elf_Data
  objects inside one ELF section, which prevents the creation of a ELF
  section with mixed data types. For example, gcc LTO use libelf to
  create a .gnu_lto_XXX section that contains integers and a string
  table, which doesn't work with our libelf implementation.

  The changes made in this commit include:
  * Allow Elf_Data type to be different than section type.
  * Relax Elf_Data alignment check.
  * Align each Elf_Data by their own alignment instead of section alignment.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213670 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMove HAVE_LIBLZMA from Makefile to config_freebsd.h
mm [Sun, 10 Oct 2010 12:18:53 +0000 (12:18 +0000)]
Move HAVE_LIBLZMA from Makefile to config_freebsd.h

Approved by: delphij (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@213669 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years ago- Add liblzma support to libarchive and usr.bin/tar
mm [Sun, 10 Oct 2010 08:41:08 +0000 (08:41 +0000)]
- Add liblzma support to libarchive and usr.bin/tar
- Do not link usr.bin/ar to liblzma if building bootstrap-tools and
the local system doesn't include liblzma (fixes world build on FreeBSD 7.x)

This is a direct commit.

Approved by: delphij (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@213667 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213382:
kib [Sun, 10 Oct 2010 07:07:21 +0000 (07:07 +0000)]
MFC r213382:
In makectx(), always use the tf_rsp from trap frame. %rsp is pushed
unconditionally by hardware on the trap.

PR:   amd64/151167

git-svn-id: svn://svn.freebsd.org/base/stable/8@213665 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212608 (by pjd):
ae [Sat, 9 Oct 2010 20:06:35 +0000 (20:06 +0000)]
MFC r212608 (by pjd):
  All gpart(8) subcommands apart from the 'bootcode' subcommand handle
  given geom/provider names with and without /dev/ prefix. Teach the
  'bootcode' subcommand to handle /dev/<foo> names as well.

Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@213661 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMerge r213061 from head:
gavin [Sat, 9 Oct 2010 13:03:32 +0000 (13:03 +0000)]
Merge r213061 from head:
  Various changes from various sources:

  - Add "children" [1]
  - Add "acknowledgement", "acknowledgment", "Austria" and "haunted" [2]
  - Add "near", "antidisestablishmentarianism" and "Persephone" [2]
  - "Transvaal" should be capitalized [2]
  - Correct spelling of "structurelessness" and "Athena" [2]
  - Add missing atomic elements [3]
  - Add various words from "word of the day" lists [3]

PR: conf/149756 [1]
Submitted by: Nick Johnson <freebsd spatula.net> [1]
Obtained from: NetBSD [2], OpenBSD [3]

git-svn-id: svn://svn.freebsd.org/base/stable/8@213656 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211980: Correct value for _POSIX_AIO_LISTIO_MAX in <limits.h>.
jilles [Sat, 9 Oct 2010 13:01:25 +0000 (13:01 +0000)]
MFC r211980: Correct value for _POSIX_AIO_LISTIO_MAX in <limits.h>.

All the "Minimum Values" (POSIX.1-2008 XBD 13 Headers <limits.h>) are now
correct. These should all be exactly as they are in the specification; the
possibly higher values we support are announced differently.

PR: standards/104743

git-svn-id: svn://svn.freebsd.org/base/stable/8@213655 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209653: sh: Use $PWD instead of getcwd() for \w \W prompt expansions.
jilles [Sat, 9 Oct 2010 12:57:06 +0000 (12:57 +0000)]
MFC r209653: sh: Use $PWD instead of getcwd() for \w \W prompt expansions.

This ensures that the logical working directory (which may include
symlinks) is shown and is similar to the default behaviour of the pwd
builtin.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213654 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213488:
delphij [Sat, 9 Oct 2010 00:36:32 +0000 (00:36 +0000)]
MFC r213488:

Use a defined FreeBSD version.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213641 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213487:
delphij [Sat, 9 Oct 2010 00:34:58 +0000 (00:34 +0000)]
MFC r213487:

Add definition for FreeBSD 7.4, which will be used in a manual page change.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213640 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212167:
yongari [Fri, 8 Oct 2010 23:16:02 +0000 (23:16 +0000)]
MFC r212167:
  Initial WOL support. NS DP8315 was tested but SiS900/SiS7016 was
  not tested.
  While I'm here, clean up SIOCSIFCAP handler.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213637 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212166:
yongari [Fri, 8 Oct 2010 23:11:46 +0000 (23:11 +0000)]
MFC r212166:
  Implement initial device suspend/resume method.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213635 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212159,212161:
yongari [Fri, 8 Oct 2010 20:58:05 +0000 (20:58 +0000)]
MFC r212159,212161:
r212159:
  Document tunable dev.sis.%unit.manual_pad
  While I'm here Xref vlan(4) as sis(4) supports VLAN oversized
  frames.

r212161:
  Better wording.

  Submitted by: jkim

git-svn-id: svn://svn.freebsd.org/base/stable/8@213630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212158:
yongari [Fri, 8 Oct 2010 20:54:09 +0000 (20:54 +0000)]
MFC r212158:
  Enable sis(4). sis(4) should work on all architectures.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213628 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212157:
yongari [Fri, 8 Oct 2010 20:51:33 +0000 (20:51 +0000)]
MFC r212157:
  Unlike most other controllers, NS DP83815/DP83816 controllers seem
  to pad with 0xFF when it encounter short frames.  According to RFC
  1042 the pad bytes should be 0x00.
  Because manual padding consumes extra CPU cycles, introduce a new
  tunable which controls the padding behavior. Turning this tunable
  on will have driver pad manually but it's disabled by default. Users
  can enable software padding by setting the following tunable to
  non-zero value.

  dev.sis.%d.manual_pad="1"

  PR: kern/35422 (patch not used)

git-svn-id: svn://svn.freebsd.org/base/stable/8@213626 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212121,212156:
yongari [Fri, 8 Oct 2010 20:48:09 +0000 (20:48 +0000)]
MFC r212121,212156:
r212121:
  Move sis_reset() to sis_initl(). This ensures driver starts with
  known good state of controller.

r212156:
  Fix the last endianness issue on handling station address which
  prevented driver from working on big-endian machines. Also rewrite
  station address programming to make it work on strict-alignment
  architectures. With this change, sis(4) now works on sparc64 and
  performance number looks good even though sis(4) have to apply
  fixup code to align received frames on 2 bytes boundary on sparc64.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213624 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212120:
yongari [Fri, 8 Oct 2010 20:42:59 +0000 (20:42 +0000)]
MFC r212120:
  Avoid controller reinitialization which could be triggered by
  dhclient(8) or alias addresses are added.

  PR: kern/87506

git-svn-id: svn://svn.freebsd.org/base/stable/8@213622 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212117,212119:
yongari [Fri, 8 Oct 2010 20:39:45 +0000 (20:39 +0000)]
MFC r212117,212119:
rr212117:
  Report result of link state change to caller. Previously it always
  returned success.

r212119:
  Do not reinitialize controller whenever promiscuous mode or
  allmulti is toggled. Controller does not require reinitialization.
  This removes unnecessary controller reinitialization whenever
  tcpdump is used.
  While I'm here remove unnecessary variable reinitialization.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213619 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212116:
yongari [Fri, 8 Oct 2010 20:33:43 +0000 (20:33 +0000)]
MFC r212116:
  Overhaul link state change handling. Previously sis(4) blindly
  configured TX/RX MACs before getting a valid link. After that, when
  link state change callback is called, it called device
  initialization again to reconfigure TX/RX MACs depending on
  resolved link state. This hack created several bad side effects and
  it required more hacks to not collide with sis_tick callback as
  well as disabling switching to currently selected media in device
  initialization. Also it seems sis(4) was used to be a template
  driver for long time so other drivers which was modeled after
  sis(4) also should be changed.

  TX/RX MACs are now reconfigured after getting a valid link. Fix for
  short cable error is also applied after getting a link because it's
  only valid when the resolved speed is 100Mbps.

  While I'm here slightly reorganize interrupt handler such that
  sis(4) always read SIS_ISR register to see whether the interrupt is
  ours or not. This change removes another hack and make it possible
  to nuke sis_stopped variable in softc.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213616 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212113:
yongari [Fri, 8 Oct 2010 20:30:08 +0000 (20:30 +0000)]
MFC r212113:
  s/u_intXX_t/uintXX_t/g

git-svn-id: svn://svn.freebsd.org/base/stable/8@213614 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212109,212124,212185:
yongari [Fri, 8 Oct 2010 20:18:44 +0000 (20:18 +0000)]
MFC r212109,212124,212185:
r212109:
  bus_dma(9) cleanup.
   o Enforce TX/RX descriptor ring alignment. NS data sheet says the
     controller needs 4 bytes alignment but use 16 to cover both SiS
     and NS controllers. I don't have SiS data sheet so I'm not sure
     what is alignment restriction of SiS controller but 16 would be
     enough because it's larger than the size of a TX/RX descriptor.
     Previously sis(4) ignored the alignment restriction.
   o Enforce RX buffer alignment, 4.
     Previously sis(4) ignored RX buffer alignment restriction.
   o Limit number of TX DMA segment to be used to 16. It seems
     controller has no restriction on number of DMA segments but
     using more than 16 looks resource waste.
   o Collapse long mbuf chains with m_collapse(9) instead of calling
     expensive m_defrag(9).
   o TX/RX side bus_dmamap_load_mbuf_sg(9) support and remove
     unnecessary callbacks.
   o Initial endianness support.
   o Prefer local alignment fixup code to m_devget(9).
   o Pre-allocate TX/RX mbuf DMA maps instead of creating/destroying
     these maps in fast TX/RX path. On non-x86 architectures, this is
     very expensive operation and there is no need to do that.
   o Add missing bus_dmamap_sync(9) in TX/RX path.
   o watchdog is now unarmed only when there are no pending frames
     on controller. Previously sis(4) blindly unarmed watchdog
     without checking the number of queued frames.
   o For efficiency, loaded DMA map is reused for error frames.
   o DMA map loading failure is now gracefully handled. Previously
     sis(4) ignored any DMA map loading errors.
   o Nuke unused macros which are not appropriate for endianness
     operation.
   o Stop embedding driver maintained structures into descriptor
     rings. Because TX/RX descriptor structures are shared between
     host and controller, frequent bus_dmamap_sync(9) operations are
     required in fast path. Embedding driver structures will increase
     the size of DMA map which in turn will slow down performance.

r212124:
  Fix stupid error in r212109 which didn't swap DMA maps. This caused
  IOMMU panic on sparc64 under high TX load.

r212185:
  Fix another bug introduced in r212109. We should unload DMA maps
  only after sending the last fragment of a frame so the mbuf pointer
  also should be stored in the last descriptor index.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212103-212105:
yongari [Fri, 8 Oct 2010 19:39:35 +0000 (19:39 +0000)]
MFC r212103-212105:
r212103:
  Remove leading and trailing white spaces.
  No functional changes.

r212104:
  style(9) - space after keywords.

r212105:
  Nuke unnecessary return at the end of function.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213607 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212972,21300:
yongari [Fri, 8 Oct 2010 19:32:39 +0000 (19:32 +0000)]
MFC r212972,21300:
r212972:
  Remove unnecessary controller reinitialization.

  PR: kern/87506

r213000:
  Fix build breakage introduced in r212972.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213605 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212971:
yongari [Fri, 8 Oct 2010 19:27:34 +0000 (19:27 +0000)]
MFC r212971:
  Remove unnecessary controller reinitialization.
  StarFire controller does not require controller reinitialization to
  program perfect filters. While here, make driver immediately exit
  from interrupt/polling handler if driver reinitialized controller.

  PR: kern/87506

git-svn-id: svn://svn.freebsd.org/base/stable/8@213603 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212969:
yongari [Fri, 8 Oct 2010 19:24:38 +0000 (19:24 +0000)]
MFC r212969:
  Make sure to clear IFF_DRV_RUNNING to reinitialize controller.
  While I'm here update if_oerrors counter when driver encounters
  watchdog timeout.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213601 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212968:
yongari [Fri, 8 Oct 2010 19:19:51 +0000 (19:19 +0000)]
MFC r212968:
  Remove unnecessary controller reinitialization.

  PR: kern/87506

git-svn-id: svn://svn.freebsd.org/base/stable/8@213599 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212306-212307,212342:
yongari [Fri, 8 Oct 2010 18:58:01 +0000 (18:58 +0000)]
MFC r212306-212307,212342:
r212306:
  Remove trailing CR at EOL.

r212307:
  Consistently use tab characters instead of tab + space characters.
  No functional changes.

r212342:
  Correct definition of T2 mode bit of MRBE Message Page 5 Next Page
  Control Register.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213597 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212069,212071:
yongari [Fri, 8 Oct 2010 18:49:59 +0000 (18:49 +0000)]
MFC r212069,212071:
r212069:
  bge_txeof() already checks whether it has to free transmitted mbufs
  or not by comparing reported TX consumer index with saved index. So
  remove unnecessary check done after freeing transmitted mbufs.
  While I'm here nuke unnecessary variable initializations.

r212071:
  Remove unnecessary atomic operation in bge_poll. bge(4) always
  holds a driver lock in the function entry and
  memory synchronization is handled by bus_dmamap_sync(9).

git-svn-id: svn://svn.freebsd.org/base/stable/8@213595 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212061,212065,212302:
yongari [Fri, 8 Oct 2010 18:43:06 +0000 (18:43 +0000)]
MFC r212061,212065,212302:
r212061:
  Split common parent DMA tag into ring DMA tag and TX/RX mbuf DMA
  tag. All controllers that are not BCM5755 or higher have 4GB
  boundary DMA bug. Previously bge(4) used 32bit DMA address to
  workaround the bug(r199670). However this caused the use of bounce
  buffers such that it resulted in poor performance for systems which
  have more than 4GB memory. Because bus_dma(9) honors boundary
  restriction requirement of DMA tag for dynamic buffers, having a
  separate TX/RX mbuf DMA tag will greatly reduce the possibility of
  using bounce buffers. For DMA buffers allocated with
  bus_dmamem_alloc(9), now bge(4) explicitly checks whether the
  requested memory region crossed the boundary or not.
  With this change, only the DMA buffer that crossed the boundary
  will use 32bit DMA address. Other DMA buffers are not affected as
  separate DMA tag is created for each DMA buffer.
  Even if 32bit DMA address space is used for a buffer, the chance to
  use bounce buffer is still very low as the size of buffer is small.
  This change should eliminate most usage of bounce buffers on
  systems that have more than 4GB memory.

  More correct fix would be teaching bus_dma(9) to honor boundary
  restriction for buffers created with bus_dmamem_alloc(9) but it
  seems that is not easy.

  While I'm here cleanup bge_dma_map_addr() and remove unnecessary
  member variables in bge_dmamap_arg structure.

  Tested by: marcel

r212065:
  Handle PAE case correctly. You cannot effectively specify a 4GB
  boundary in PAE case so use a 2GB boundary for PAE as suggested by
  jhb.

  Pointed out by: jhb
  Reviewed by: jhb

r212302:
  Make sure to create DMA'able memory for statistics block. This was
  missed in r212061 and it caused crashes for 570x controllers as
  controller DMAed statistics to physical address 0.

  Reported by: kan

git-svn-id: svn://svn.freebsd.org/base/stable/8@213593 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213306:
yongari [Fri, 8 Oct 2010 18:19:05 +0000 (18:19 +0000)]
MFC r213306:
  Rename rl_setmulti() to rl_rxfilter() as rl_rxfilter() will handle
  IFF_ALLMULTI/IFF_PROMISC as well as multicast filter configuration.
  Rewrite RX filter logic to reduce number of register accesses and
  make it handle promiscuous/allmulti toggling without controller
  reinitialization.

  Previously rl(4) counted on controller reinitialization to reprogram
  promiscuous configuration but r211767 resulted in avoiding
  controller reinitialization whenever promiscuous mode is toggled.
  To address this, keep track of driver's view of interface state and
  handle IFF_ALLMULTI/IFF_PROMISC changes without reinitializing
  controller. This should fix a regression introduced in r211267.

  While I'm here remove unnecessary variable reassignment in ioctl
  handler.

  PR: kern/151079

git-svn-id: svn://svn.freebsd.org/base/stable/8@213590 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212926:
mdf [Fri, 8 Oct 2010 18:06:15 +0000 (18:06 +0000)]
MFC r212926:

Use destroy_dev_sched(9) instead of destroy_dev(9) in passcleanup() as
it is indirectly a d_close method.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213588 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213013:
emaste [Fri, 8 Oct 2010 14:59:14 +0000 (14:59 +0000)]
MFC r213013:

  Move test for zero bufp or size before rseq and wseq calculation.  This
  avoids spinning in an infinite loop for some (possibly corrupt?) core
  files at work.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213577 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212570:
emaste [Fri, 8 Oct 2010 14:56:39 +0000 (14:56 +0000)]
MFC r212570:

  Allow a kernel config to specify a set but empty value via
  'makeoptions OPTION=' for consistency with the make commandline.

  Previously 'makeoptions WERROR=' would result in a syntax error; now
  it produces the same effect as 'makeoptions WERROR'.  Both forms now
  result in 'WERROR=' in the generated Makefile.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213576 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213322: sysctls in kern_shutdown: add twin tunables
avg [Fri, 8 Oct 2010 08:13:22 +0000 (08:13 +0000)]
MFC r213322: sysctls in kern_shutdown: add twin tunables

git-svn-id: svn://svn.freebsd.org/base/stable/8@213560 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213305: there must be only one SYSINIT with
avg [Fri, 8 Oct 2010 08:01:36 +0000 (08:01 +0000)]
MFC r213305: there must be only one SYSINIT with
SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY order

git-svn-id: svn://svn.freebsd.org/base/stable/8@213558 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213304: debug.kdb.stop_cpus sysctl: hint that this is also a
avg [Fri, 8 Oct 2010 07:57:19 +0000 (07:57 +0000)]
MFC r213304: debug.kdb.stop_cpus sysctl: hint that this is also a
tunable

git-svn-id: svn://svn.freebsd.org/base/stable/8@213556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213303: kmem_size* sysctls: hint that these are also tunables
avg [Fri, 8 Oct 2010 07:52:00 +0000 (07:52 +0000)]
MFC r213303: kmem_size* sysctls: hint that these are also tunables

git-svn-id: svn://svn.freebsd.org/base/stable/8@213554 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212994: kdb_backtrace: use stack_print_ddb instead of stack_print
avg [Fri, 8 Oct 2010 07:49:05 +0000 (07:49 +0000)]
MFC r212994: kdb_backtrace: use stack_print_ddb instead of stack_print

git-svn-id: svn://svn.freebsd.org/base/stable/8@213553 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212964: kdb_backtrace: stack(9)-based code to print backtrace
avg [Fri, 8 Oct 2010 07:38:44 +0000 (07:38 +0000)]
MFC r212964: kdb_backtrace: stack(9)-based code to print backtrace
without any backend

git-svn-id: svn://svn.freebsd.org/base/stable/8@213552 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212781: zfs arc_reclaim_needed: remove redundant checks for
avg [Fri, 8 Oct 2010 07:36:30 +0000 (07:36 +0000)]
MFC r212781: zfs arc_reclaim_needed: remove redundant checks for
arc_c_max and arc_c_max

git-svn-id: svn://svn.freebsd.org/base/stable/8@213551 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212783: zfs arc_reclaim_needed: fix typo in mismerge in r212780
avg [Fri, 8 Oct 2010 07:34:32 +0000 (07:34 +0000)]
MFC r212783: zfs arc_reclaim_needed: fix typo in mismerge in r212780

git-svn-id: svn://svn.freebsd.org/base/stable/8@213550 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212780: zfs arc_reclaim_needed: more reasonable threshold for
avg [Fri, 8 Oct 2010 07:33:22 +0000 (07:33 +0000)]
MFC r212780: zfs arc_reclaim_needed: more reasonable threshold for
available pages

git-svn-id: svn://svn.freebsd.org/base/stable/8@213549 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212657: zfs vn_has_cached_data: take into account v_object->cache != NULL
avg [Fri, 8 Oct 2010 07:31:32 +0000 (07:31 +0000)]
MFC r212657: zfs vn_has_cached_data: take into account v_object->cache != NULL

git-svn-id: svn://svn.freebsd.org/base/stable/8@213548 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212951: zfs_map_page/zfs_unmap_page: do not use sched_pin() and
avg [Fri, 8 Oct 2010 07:29:26 +0000 (07:29 +0000)]
MFC r212951: zfs_map_page/zfs_unmap_page: do not use sched_pin() and
SFB_CPUPRIVATE

git-svn-id: svn://svn.freebsd.org/base/stable/8@213547 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212950: zfs_vnops: use zfs_map_page/zfs_unmap_page helper functions
avg [Fri, 8 Oct 2010 07:26:56 +0000 (07:26 +0000)]
MFC r212950: zfs_vnops: use zfs_map_page/zfs_unmap_page helper functions
in another place

git-svn-id: svn://svn.freebsd.org/base/stable/8@213546 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213258:
davidxu [Thu, 7 Oct 2010 12:20:50 +0000 (12:20 +0000)]
MFC r213258:
- kern_sched_rr_get_interval should return interval for thread 1 in
    target process.
- eliminate a goto.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213511 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211059:
delphij [Thu, 7 Oct 2010 00:36:58 +0000 (00:36 +0000)]
MFC r211059:

Address an edge condition that we found at work, where the carp(4)
interface goes to issue LINK_UP, then LINK_DOWN, then LINK_UP at
cold boot.  This behavior is not observed when carp(4) interface
is created slightly later, when the underlying interface is fully
up.

Before this change what happen at boot is roughly:

 - ifconfig creates em0 interface;
 - ifconfig clones a carp device using em0;
   (em0's link state is DOWN at this point)
 - carp state: INIT -> BACKUP [*]
 - carp state: BACKUP -> MASTER
 - [Some negotiate between em0 and switch]
 - em0 kicks up link state change event
   (em0's link state is now up DOWN at this point)
 - do_link_state_change() -> carp_carpdev_state()
 - carp state: MASTER -> INIT (via carp_set_state(sc, INIT)) [+]
 - carp state: INIT -> BACKUP
 - carp state: BACKUP -> MASTER

At the [*] stage, em0 did not received any broadcast message from other
node, and assume our node is the master, thus carp(4) sets the link
state to "UP" after becoming a master.  At [+], the master status
is forcely set to "INIT", then an election is casted, after which our
node would actually become a master.

We believe that at the [*] stage, the master status should remain as
"INIT" since the underlying parent interface's link state is not up.

Obtained from:  iXsystems, Inc.
Reported by:    jpaetzel

git-svn-id: svn://svn.freebsd.org/base/stable/8@213505 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f