GitHub/MotorolaMobilityLLC/kernel-slsi.git
18 years agoMerge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
Linus Torvalds [Fri, 30 Jun 2006 22:39:49 +0000 (15:39 -0700)]
Merge branch 'for-linus' of /linux/kernel/git/roland/infiniband

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IB/core: Set alternate port number when initializing QP attributes
  IB/uverbs: Set correct user handle for user SRQs

18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
Linus Torvalds [Fri, 30 Jun 2006 22:39:30 +0000 (15:39 -0700)]
Merge git://git./linux/kernel/git/bunk/trivial

* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial:
  Remove obsolete #include <linux/config.h>
  remove obsolete swsusp_encrypt
  arch/arm26/Kconfig typos
  Documentation/IPMI typos
  Kconfig: Typos in net/sched/Kconfig
  v9fs: do not include linux/version.h
  Documentation/DocBook/mtdnand.tmpl: typo fixes
  typo fixes: specfic -> specific
  typo fixes in Documentation/networking/pktgen.txt
  typo fixes: occuring -> occurring
  typo fixes: infomation -> information
  typo fixes: disadvantadge -> disadvantage
  typo fixes: aquire -> acquire
  typo fixes: mecanism -> mechanism
  typo fixes: bandwith -> bandwidth
  fix a typo in the RTC_CLASS help text
  smb is no longer maintained

Manually merged trivial conflict in arch/um/kernel/vmlinux.lds.S

18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6/
Linus Torvalds [Fri, 30 Jun 2006 22:36:52 +0000 (15:36 -0700)]
Merge git://git./linux/kernel/git/brodo/pcmcia-2.6/

* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6/:
  [PATCH] pcmcia: fix deadlock in pcmcia_parse_events
  [PATCH] com20020_cs: more device support
  [PATCH] au1xxx: pcmcia: fix __init called from non-init
  [PATCH] kill open-coded offsetof in cm4000_cs.c ZERO_DEV()
  [PATCH] pcmcia: convert pcmcia_cs to kthread
  [PATCH] pcmcia: fix kernel-doc function name
  [PATCH] pcmcia: hostap_cs.c - 0xc00f,0x0000 conflicts with pcnet_cs
  [PATCH] pcmcia: at91_cf suspend/resume/wakeup
  [PATCH] pcmcia: Make ide_cs work with the memory space of CF-Cards if IO space is not available
  [PATCH] pcmcia: TI PCIxx12 CardBus controller support
  [PATCH] pcmcia: warn if driver requests exclusive, but gets a shared IRQ
  [PATCH] pcmcia: expose tool in pcmcia/Documentation/pcmcia/
  [PATCH] pcmcia: another ID for serial_cs.c
  [PATCH] yenta: fix hidden PCI bus numbers
  [PATCH] yenta: do power-up only after socket is configured

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Linus Torvalds [Fri, 30 Jun 2006 22:36:19 +0000 (15:36 -0700)]
Merge /pub/scm/linux/kernel/git/mchehab/v4l-dvb

* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (4290): Add support for the TCL M2523_3DB_E tuner.
  V4L/DVB (4289): Missing statement in drivers/media/dvb/frontends/cx22700.c
  V4L/DVB (4288): Clean out a zillion sparse warnings in pvrusb2
  V4L/DVB (4287): Pvrusb2/: possible cleanups
  V4L/DVB (4285): Cx88: add support for Geniatech Digistar / Digiwave 103g
  V4L/DVB (4284): Cx24123: fix set_voltage function according to the specs
  V4L/DVB (4282): Fix: use swzigzag for swalgo
  V4L/DVB (4281): TDA9887_SET_CONFIG should only be handled by the tda9887.
  V4L/DVB (4277): Fix CI interface on PRO KNC1 cards
  V4L/DVB (4276): Fix CI on old KNC1 DVBC cards
  V4L/DVB (4275): The FE_SET_FRONTEND_TUNE_MODE ioctl always returns EOPNOTSUPP
  V4L/DVB (4274): Eliminate use of tda9887 from pvrusb2 driver
  V4L/DVB (4273): Always log pvrusb2 device register / unregister events
  V4L/DVB (4272): Fix tveeprom supported standards
  V4L/DVB (4270): Add tda9887-specific tuner configuration
  V4L/DVB (4269): Subject: videocodec: make 1-bit fields unsigned
  V4L/DVB (4267): Remove all instances of request_module("tda9887")
  V4L/DVB (4264): Cx88-blackbird: implement VIDIOC_QUERYCTRL and VIDIOC_QUERYMENU

18 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Fri, 30 Jun 2006 22:34:15 +0000 (15:34 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (25 commits)
  ACPI: Kconfig: ACPI_SRAT depends on ACPI
  ACPI: drivers/acpi/scan.c: make acpi_bus_type static
  ACPI: fixup memhotplug debug message
  ACPI: ACPICA 20060623
  ACPI: C-States: only demote on current bus mastering activity
  ACPI: C-States: bm_activity improvements
  ACPI: C-States: accounting of sleep states
  ACPI: additional blacklist entry for ThinkPad R40e
  ACPI: restore comment justifying 'extra' P_LVLx access
  ACPI: fix battery on HP NX6125
  ACPIPHP: prevent duplicate slot numbers when no _SUN
  ACPI: static-ize handle_hotplug_event_func()
  ACPIPHP: use ACPI dock driver
  ACPI: dock driver
  KEVENT: add new uevent for dock
  ACPI: asus_acpi_init: propagate correct return value
  [ACPI] Print error message if remove/install notify handler fails
  ACPI: delete tracing macros from drivers/acpi/*.c
  ACPI: HW P-state coordination support
  ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...)
  ...

18 years agoIB/core: Set alternate port number when initializing QP attributes
Sean Hefty [Fri, 30 Jun 2006 21:10:14 +0000 (14:10 -0700)]
IB/core: Set alternate port number when initializing QP attributes

Set alternate port number when initializing QP attributes.  This bug
is OpenFabrics bugzilla bug #160.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/uverbs: Set correct user handle for user SRQs
Roland Dreier [Fri, 30 Jun 2006 20:40:13 +0000 (13:40 -0700)]
IB/uverbs: Set correct user handle for user SRQs

Store away the user handle passed in from userspace when creating an
SRQ, so that the kernel can return the correct handle when an SRQ
asynchronous event occurs.  (A 0 was incorrectly stored as the user
handle as part of the changes in 9ead190b, "IB/uverbs: Don't serialize
with ib_uverbs_idr_mutex")

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years ago[PATCH] pcmcia: fix deadlock in pcmcia_parse_events
Arjan van de Ven [Fri, 30 Jun 2006 08:31:13 +0000 (10:31 +0200)]
[PATCH] pcmcia: fix deadlock in pcmcia_parse_events

The PCMCIA layer calls pcmcia_parse_events both from user context and
IRQ context; the lock thus needs to be irqsave to avoid deadlocks

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] com20020_cs: more device support
Marc Sowen [Sun, 25 Jun 2006 08:56:24 +0000 (01:56 -0700)]
[PATCH] com20020_cs: more device support

Enable the com20020_cs arcnet driver to see the SoHard (now Mercury
Computer Systems Inc.) SH ARC-PCMCIA card.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] au1xxx: pcmcia: fix __init called from non-init
Domen Puncer [Fri, 23 Jun 2006 11:06:56 +0000 (12:06 +0100)]
[PATCH] au1xxx: pcmcia: fix __init called from non-init

This must not be marked __init, as it is called from
au1x00_drv_pcmcia_probe.

Signed-off-by: Domen Puncer <domen.puncer@ultra.si>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] kill open-coded offsetof in cm4000_cs.c ZERO_DEV()
Al Viro [Thu, 15 Jun 2006 11:26:55 +0000 (12:26 +0100)]
[PATCH] kill open-coded offsetof in cm4000_cs.c ZERO_DEV()

... to make sure that it doesn't break again when a field changes (see
"[PATCH] pcmcia: fix zeroing of cm4000_cs.c data" for recent example).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: convert pcmcia_cs to kthread
Serge E. Hallyn [Wed, 14 Jun 2006 13:01:26 +0000 (08:01 -0500)]
[PATCH] pcmcia: convert pcmcia_cs to kthread

Convert pcmcia_cs to use kthread instead of the deprecated
kernel_thread.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: fix kernel-doc function name
Randy Dunlap [Tue, 6 Jun 2006 19:06:41 +0000 (12:06 -0700)]
[PATCH] pcmcia: fix kernel-doc function name

Fix kernel-doc function name spello.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: hostap_cs.c - 0xc00f,0x0000 conflicts with pcnet_cs
Komuro [Mon, 17 Apr 2006 12:41:21 +0000 (21:41 +0900)]
[PATCH] pcmcia: hostap_cs.c - 0xc00f,0x0000 conflicts with pcnet_cs

Comment out the ID 0xc00f,0x0000 in hostap_cs.c, as it conflicts with the
pcnet_cs driver.

Signed-off-by: komurojun-mbn@nifty.com
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: at91_cf suspend/resume/wakeup
David Brownell [Wed, 19 Apr 2006 13:37:48 +0000 (06:37 -0700)]
[PATCH] pcmcia: at91_cf suspend/resume/wakeup

AT91 CF updates, mostly for power management:

 - Add suspend/resume methods to the AT91 CF driver, disabling
   non-wakeup IRQs during system suspend.  The card detect IRQ
   serves as a wakeup event source.

 - Convert the driver to the more-current "platform_driver" style.

So inserting or removing a CF card will wake the system, unless that
has been disabled by updating the sysfs file; and there will be no
more warnings about spurious IRQs during suspend/resume cycles.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: Make ide_cs work with the memory space of CF-Cards if IO space is...
Thomas Kleffel [Sun, 14 May 2006 13:16:30 +0000 (15:16 +0200)]
[PATCH] pcmcia: Make ide_cs work with the memory space of CF-Cards if IO space is not available

This patch enables ide_cs to access CF-cards via their common memory
rather than via their IO space.

Signed-off-by: Thomas Kleffel <tk@maintech.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: TI PCIxx12 CardBus controller support
Alex Williamson [Tue, 9 May 2006 05:22:07 +0000 (23:22 -0600)]
[PATCH] pcmcia: TI PCIxx12 CardBus controller support

The patch below adds support for the TI PCIxx12 CardBus controllers.
This seems to be sufficient to detect the cardbus bridge on an HP nc6320
and works with an orinoco wifi card.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: warn if driver requests exclusive, but gets a shared IRQ
Alan Cox [Tue, 16 May 2006 15:16:44 +0000 (16:16 +0100)]
[PATCH] pcmcia: warn if driver requests exclusive, but gets a shared IRQ

The patch below cleans up the pcmcia code a bit on the IRQ side (I did
this while debugging the problem just so I could read wtf it was doing),
and also adds a warning and passes back the correct information when a
device asks for exclusive but gets given shared. This at least means the
dmesg dump of a problem triggered by this will have a signature to find.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: expose tool in pcmcia/Documentation/pcmcia/
Randy Dunlap [Mon, 22 May 2006 03:57:42 +0000 (20:57 -0700)]
[PATCH] pcmcia: expose tool in pcmcia/Documentation/pcmcia/

Expose example and tool source files in the Documentation/ directory in
their own files instead of being buried (almost hidden) in readme/txt files.

This will make them more visible/usable to users who may need
to use them, to developers who may need to test with them, and
to janitors who would update them if they were more visible.

Also, if any of these possibly should not be in the kernel tree at
all, it will be clearer that they are here and we can discuss if
they should be removed.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: another ID for serial_cs.c
Dominik Brodowski [Wed, 26 Apr 2006 17:57:32 +0000 (19:57 +0200)]
[PATCH] pcmcia: another ID for serial_cs.c

Add an ID for "GlobeTrotter" cards which need a CIS override

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] yenta: fix hidden PCI bus numbers
Bernhard Kaindl [Tue, 30 May 2006 16:00:34 +0000 (18:00 +0200)]
[PATCH] yenta: fix hidden PCI bus numbers

Fixup the subordinate number parent bridge of yenta Cardbus Bridges
before the PCI bus scan starts to make the cardbus cards which are
otherwise hidden for PCI scans work.

Signed-off-by: Bernhard Kaindl <bk@suse.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] yenta: do power-up only after socket is configured
Daniel Ritz [Mon, 6 Mar 2006 16:37:04 +0000 (17:37 +0100)]
[PATCH] yenta: do power-up only after socket is configured

Power-up the card only after the socket is configured. power-down in
the old place. The point is not to power-up the card before the interrupt
routing is set up correctly.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years agoV4L/DVB (4290): Add support for the TCL M2523_3DB_E tuner.
Hans Verkuil [Fri, 30 Jun 2006 16:41:26 +0000 (13:41 -0300)]
V4L/DVB (4290): Add support for the TCL M2523_3DB_E tuner.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4289): Missing statement in drivers/media/dvb/frontends/cx22700.c
Eric Sesterhenn [Fri, 30 Jun 2006 14:51:11 +0000 (11:51 -0300)]
V4L/DVB (4289): Missing statement in drivers/media/dvb/frontends/cx22700.c

Stumbled over this because of coverity (id #492),
seems like we are missing a return statement here and fail
to do proper bounds checking. If this assumption is false
we should at least change the identation to make it clear

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4288): Clean out a zillion sparse warnings in pvrusb2
Mike Isely [Fri, 30 Jun 2006 14:35:28 +0000 (11:35 -0300)]
V4L/DVB (4288): Clean out a zillion sparse warnings in pvrusb2

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4287): Pvrusb2/: possible cleanups
Adrian Bunk [Fri, 30 Jun 2006 14:30:20 +0000 (11:30 -0300)]
V4L/DVB (4287): Pvrusb2/: possible cleanups

This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 unused global functions

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4285): Cx88: add support for Geniatech Digistar / Digiwave 103g
Saqeb Akhter [Thu, 29 Jun 2006 23:29:33 +0000 (20:29 -0300)]
V4L/DVB (4285): Cx88: add support for Geniatech Digistar / Digiwave 103g

This patch adds support for the Geniatech Digistar, aka
Digiwave 103g DVB-S card.
Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Saqeb Akhter <johoja@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4284): Cx24123: fix set_voltage function according to the specs
Saqeb Akhter [Thu, 29 Jun 2006 23:29:29 +0000 (20:29 -0300)]
V4L/DVB (4284): Cx24123: fix set_voltage function according to the specs

The set_voltage function in cx24123.c was corrected to match how it is
described in the CX24123 specs, producing the correct behaviour for cards
that require it.
Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Saqeb Akhter <johoja@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4282): Fix: use swzigzag for swalgo
Manu Abraham [Fri, 30 Jun 2006 01:05:23 +0000 (22:05 -0300)]
V4L/DVB (4282): Fix: use swzigzag for swalgo

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4281): TDA9887_SET_CONFIG should only be handled by the tda9887.
Hans Verkuil [Thu, 29 Jun 2006 19:30:51 +0000 (16:30 -0300)]
V4L/DVB (4281): TDA9887_SET_CONFIG should only be handled by the tda9887.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4277): Fix CI interface on PRO KNC1 cards
Andrew de Quincey [Thu, 29 Jun 2006 16:16:11 +0000 (13:16 -0300)]
V4L/DVB (4277): Fix CI interface on PRO KNC1 cards

The original driver had a restriction that if a card as an saa7113 chip,
then it cannot have a CI interface. This is not the case.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4276): Fix CI on old KNC1 DVBC cards
Andrew de Quincey [Thu, 29 Jun 2006 16:16:07 +0000 (13:16 -0300)]
V4L/DVB (4276): Fix CI on old KNC1 DVBC cards

These cards do not need the tda10021 configuration change when data is
streamed through a CAM module. This disables it for these ones.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4275): The FE_SET_FRONTEND_TUNE_MODE ioctl always returns EOPNOTSUPP
Trent Piepho [Thu, 29 Jun 2006 16:16:04 +0000 (13:16 -0300)]
V4L/DVB (4275): The FE_SET_FRONTEND_TUNE_MODE ioctl always returns EOPNOTSUPP

When someone added the front-end ioctl FE_SET_FRONTEND_TUNE_MODE, they
forgot to set the return value to 0.  It always returns EOPNOTSUPP,
causing problems for programmers who actually check for error conditions.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4274): Eliminate use of tda9887 from pvrusb2 driver
Mike Isely [Thu, 29 Jun 2006 12:26:57 +0000 (09:26 -0300)]
V4L/DVB (4274): Eliminate use of tda9887 from pvrusb2 driver

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4273): Always log pvrusb2 device register / unregister events
Mike Isely [Thu, 29 Jun 2006 12:26:43 +0000 (09:26 -0300)]
V4L/DVB (4273): Always log pvrusb2 device register / unregister events

Previously the pvrusb2 driver was conditionalizing printing of the
device register / unregister messages against a debug mask.  This sort
of information should always appear, thus this patch.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4272): Fix tveeprom supported standards
Mauro Carvalho Chehab [Wed, 28 Jun 2006 21:17:44 +0000 (18:17 -0300)]
V4L/DVB (4272): Fix tveeprom supported standards

The supported standards by the tuner on tveeprom were too restricted.
It were showing just the main format, instead of the format family.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4270): Add tda9887-specific tuner configuration
Hans Verkuil [Sun, 25 Jun 2006 18:34:39 +0000 (15:34 -0300)]
V4L/DVB (4270): Add tda9887-specific tuner configuration

Many tda9887 settings depend on the chosen tuner. Expand the tuner parameters
to include these tda9887 settings.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4269): Subject: videocodec: make 1-bit fields unsigned
Randy Dunlap [Wed, 28 Jun 2006 18:05:11 +0000 (15:05 -0300)]
V4L/DVB (4269): Subject: videocodec: make 1-bit fields unsigned

Make 1-bit bitfields unsigned.  Removes 68 sparse errors like these:
drivers/media/video/videocodec.h:225:17: error: dubious one-bit signed bitfield
drivers/media/video/msp3400-driver.h:93:32: error: dubious one-bit signed bitfield
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4267): Remove all instances of request_module("tda9887")
Michael Krufky [Tue, 27 Jun 2006 03:35:41 +0000 (00:35 -0300)]
V4L/DVB (4267): Remove all instances of request_module("tda9887")

We should no longer try to load the tda9887 module, because it no longer
exists. The tda9887 driver has been merged into the tuner module.
This patch removes all instances of request_module("tda9887") from
the following video4linux drivers: bttv, cx88, em28xx and saa7134.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (4264): Cx88-blackbird: implement VIDIOC_QUERYCTRL and VIDIOC_QUERYMENU
Michael Krufky [Tue, 27 Jun 2006 02:42:39 +0000 (23:42 -0300)]
V4L/DVB (4264): Cx88-blackbird: implement VIDIOC_QUERYCTRL and VIDIOC_QUERYMENU

This patch implements the newer v4l2 control features to make the
standard user controls and mpeg encoder controls of cx88-blackbird
video encoder boards available to userspace.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoACPI: Kconfig: ACPI_SRAT depends on ACPI
Andrew Morton [Fri, 30 Jun 2006 09:15:00 +0000 (05:15 -0400)]
ACPI: Kconfig: ACPI_SRAT depends on ACPI

arch/i386/kernel/srat.c won't compile without CONFIG_ACPI.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years agoACPI: drivers/acpi/scan.c: make acpi_bus_type static
Adrian Bunk [Fri, 30 Jun 2006 09:15:00 +0000 (05:15 -0400)]
ACPI: drivers/acpi/scan.c: make acpi_bus_type static

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years ago[PATCH] i2c-801: 64bit resource fix
Andrew Morton [Fri, 30 Jun 2006 08:56:20 +0000 (01:56 -0700)]
[PATCH] i2c-801: 64bit resource fix

drivers/i2c/busses/i2c-i801.c: In function 'i801_probe':
drivers/i2c/busses/i2c-i801.c:496: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'resource_size_t'

Cc: Greg KH <greg@kroah.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] infiniband: devfs fix
Andrew Morton [Fri, 30 Jun 2006 08:56:20 +0000 (01:56 -0700)]
[PATCH] infiniband: devfs fix

Remove devfs leftovers.

Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: svcrpc: gss: server-side implementation of rpcsec_gss privacy
J. Bruce Fields [Fri, 30 Jun 2006 08:56:19 +0000 (01:56 -0700)]
[PATCH] knfsd: svcrpc: gss: server-side implementation of rpcsec_gss privacy

Server-side implementation of rpcsec_gss privacy, which enables encryption of
the payload of every rpc request and response.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: nfsd: mark rqstp to prevent use of sendfile in privacy case
J. Bruce Fields [Fri, 30 Jun 2006 08:56:19 +0000 (01:56 -0700)]
[PATCH] knfsd: nfsd: mark rqstp to prevent use of sendfile in privacy case

Add a rq_sendfile_ok flag to svc_rqst which will be cleared in the privacy
case so that the wrapping code will get copies of the read data instead of
real page cache pages.  This makes life simpler when we encrypt the response.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: svcrpc: Simplify nfsd rpcsec_gss integrity code
J. Bruce Fields [Fri, 30 Jun 2006 08:56:18 +0000 (01:56 -0700)]
[PATCH] knfsd: svcrpc: Simplify nfsd rpcsec_gss integrity code

Pull out some of the integrity code into its own function, otherwise
svcauth_gss_release() is going to become very ungainly after the addition of
privacy code.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: nfsd4: fix open flag passing
J. Bruce Fields [Fri, 30 Jun 2006 08:56:17 +0000 (01:56 -0700)]
[PATCH] knfsd: nfsd4: fix open flag passing

Since nfsv4 actually keeps around the file descriptors it gets from open
(instead of just using them for a single read or write operation), we need to
make sure that we can do RDWR opens and not just RDONLY/WRONLY.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: nfsd4: fix some open argument tests
J. Bruce Fields [Fri, 30 Jun 2006 08:56:16 +0000 (01:56 -0700)]
[PATCH] knfsd: nfsd4: fix some open argument tests

These tests always returned true; clearly that wasn't what was intended.

In keeping with kernel style, make them functions instead of macros while
we're at it.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: svcrpc: gss: simplify rsc_parse()
J. Bruce Fields [Fri, 30 Jun 2006 08:56:16 +0000 (01:56 -0700)]
[PATCH] knfsd: svcrpc: gss: simplify rsc_parse()

Adopt a simpler convention for gss_mech_put(), to simplify rsc_parse().

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: nfsd: fix misplaced fh_unlock() in nfsd_link()
David M. Richter [Fri, 30 Jun 2006 08:56:15 +0000 (01:56 -0700)]
[PATCH] knfsd: nfsd: fix misplaced fh_unlock() in nfsd_link()

In the event that lookup_one_len() fails in nfsd_link(), fh_unlock() is
skipped and locks are held overlong.

Patch was tested on 2.6.17-rc2 by causing lookup_one_len() to fail and
verifying that fh_unlock() gets called appropriately.

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: nfsd4: remove superfluous grace period checks
J. Bruce Fields [Fri, 30 Jun 2006 08:56:14 +0000 (01:56 -0700)]
[PATCH] knfsd: nfsd4: remove superfluous grace period checks

We're checking nfs_in_grace here a few times when there isn't really any
reason to--bad_stateid is probably the more sensible return value anyway.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: nfsd: call nfsd_setuser() on fh_compose(), fix nfsd4 permissions problem
J. Bruce Fields [Fri, 30 Jun 2006 08:56:14 +0000 (01:56 -0700)]
[PATCH] knfsd: nfsd: call nfsd_setuser() on fh_compose(), fix nfsd4 permissions problem

In the typical v2/v3 case the only new filehandles used as arguments to
operations are filehandles taken directly off the wire, which don't get
dentries until fh_verify() is called.

But in v4 the filehandles that are arguments to operations were often created
by previous operations (putrootfh, lookup, etc.) using fh_compose, which sets
the dentry in the filehandle without calling nfsd_setuser().

This also means that, for example, if filesystem B is mounted on filesystem A,
and filesystem A is exported without root-squashing, then a client can bypass
the rootsquashing on B using a compound that starts at a filehandle in A,
crosses into B using lookups, and then does stuff in B.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: nfsd4: fix open_confirm locking
J. Bruce Fields [Fri, 30 Jun 2006 08:56:13 +0000 (01:56 -0700)]
[PATCH] knfsd: nfsd4: fix open_confirm locking

Fix an improper unlock in an error path.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: ignore ref_fh when crossing a mountpoint
NeilBrown [Fri, 30 Jun 2006 08:56:12 +0000 (01:56 -0700)]
[PATCH] knfsd: ignore ref_fh when crossing a mountpoint

nfsd tries to return to a client the same sort of filehandle as was used by
the client.  This removes some filehandle aliasing issues and means that a
server upgrade followed by a downgrade will not confused clients not restarted
during that time.

However when crossing a mountpoint, the filehandle used for one filesystem
doesn't provide any useful information on what sort of filehandle should be
used on the other, and can provide misleading information.  So if the
reference filehandle is on a different filesystem to the one being generated,
ignore it.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: remove noise about filehandle being uptodate
NeilBrown [Fri, 30 Jun 2006 08:56:11 +0000 (01:56 -0700)]
[PATCH] knfsd: remove noise about filehandle being uptodate

There is a perfectly valid situation where fh_update gets called on an already
uptodate filehandle - in nfsd_create_v3 where a CREATE_UNCHECKED finds an
existing file and wants to just set the size.

We could possible optimise out the call in that case, but the only harm
involved is that fh_update prints a warning, so it is easier to remove the
warning.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: fixing missing 'expkey' support for fsid type 3
Frank Filz [Fri, 30 Jun 2006 08:56:11 +0000 (01:56 -0700)]
[PATCH] knfsd: fixing missing 'expkey' support for fsid type 3

Type '3' is used for the fsid in filehandles when the device number of the
device holding the filesystem has more than 8 bits in either major or minor.
Unfortunately expkey_parse doesn't recognise type 3.  Fix this.

(Slighty modified from Frank's original)

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: improve the test for cross-device-rename in nfsd
NeilBrown [Fri, 30 Jun 2006 08:56:10 +0000 (01:56 -0700)]
[PATCH] knfsd: improve the test for cross-device-rename in nfsd

Just testing the i_sb isn't really enough, at least the vfsmnt must be the
same.  Thanks Al.

Cc: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] EDAC: maintainers update
Doug Thompson [Fri, 30 Jun 2006 08:56:09 +0000 (01:56 -0700)]
[PATCH] EDAC: maintainers update

Removed Dave Peterson as per his request as co-maintainer of EDAC Thanks Dave.

Added Mark Gross as maintainer of edac-e752x driver Thanks Mark

Signed-off-by: Doug Thompson <norsk5@xmission.com>
Signed-off-by: Dave Peterson <dsp@llnl.gov>
Signed-off-by: Mark Gross <mark.gross@intel.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] EDAC: probe1 cleanup 1-of-2
Doug Thompson [Fri, 30 Jun 2006 08:56:08 +0000 (01:56 -0700)]
[PATCH] EDAC: probe1 cleanup 1-of-2

- Add lower-level functions that handle various parts of the initialization
  done by the xxx_probe1() functions.  Some of the xxx_probe1() functions are
  much too long and complicated (see "Chapter 5: Functions" in
  Documentation/CodingStyle).

- Cleanup of probe1() functions in EDAC

Signed-off-by: Doug Thompson <norsk5@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] EDAC: mc numbers refactor 1-of-2
Doug Thompson [Fri, 30 Jun 2006 08:56:08 +0000 (01:56 -0700)]
[PATCH] EDAC: mc numbers refactor 1-of-2

Remove add_mc_to_global_list().  In next patch, this function will be
reimplemented with different semantics.

1 Reimplement add_mc_to_global_list() with semantics that allow the caller to
  determine the ID number for a mem_ctl_info structure.  Then modify
  edac_mc_add_mc() so that the caller specifies the ID number for the new
  mem_ctl_info structure.  Platform-specific code should be able to assign the
  ID numbers in a platform-specific manner.  For instance, on Opteron it makes
  sense to have the ID of the mem_ctl_info structure match the ID of the node
  that the memory controller belongs to.

2 Modify callers of edac_mc_add_mc() so they use the new semantics.

Signed-off-by: Doug Thompson <norsk5@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] EDAC: PCI device to DEVICE cleanup
Doug Thompson [Fri, 30 Jun 2006 08:56:07 +0000 (01:56 -0700)]
[PATCH] EDAC: PCI device to DEVICE cleanup

Change MC drivers from using CVS revision strings for their version number,
Now each driver has its own local string.

Remove some PCI dependencies from the core EDAC module.  Made the code 'struct
device' centric instead of 'struct pci_dev' Most of the code changes here are
from a patch by Dave Jiang.  It may be best to eventually move the
PCI-specific code into a separate source file.

Signed-off-by: Doug Thompson <norsk5@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Documentation/IPMI typos
Matt LaPlante [Fri, 30 Jun 2006 08:56:06 +0000 (01:56 -0700)]
[PATCH] Documentation/IPMI typos

Two typos in Documentation/IPMI.

Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] rcu: Add lock annotations to RCU locking primitives
Josh Triplett [Fri, 30 Jun 2006 08:56:05 +0000 (01:56 -0700)]
[PATCH] rcu: Add lock annotations to RCU locking primitives

Add __acquire annotations to rcu_read_lock and rcu_read_lock_bh, and add
__release annotations to rcu_read_unlock and rcu_read_unlock_bh.  This
allows sparse to detect improperly paired calls to these functions.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] drivers/cdrom/cm206.c: cleanups
Adrian Bunk [Fri, 30 Jun 2006 08:56:04 +0000 (01:56 -0700)]
[PATCH] drivers/cdrom/cm206.c: cleanups

- make __cm206_init() __init (required since it calls
  the __init cm206_init())
- make the needlessly global bcdbin() static
- remove a comment with an obsolete compile command

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] show Acorn-specific block devices menu only when required
Adrian Bunk [Fri, 30 Jun 2006 08:56:02 +0000 (01:56 -0700)]
[PATCH] show Acorn-specific block devices menu only when required

Don't show a menu that can't be entered due to lack of contents on arm (the
options are only available on arm26).

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Ian Molton <spyro@f2s.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Correct rtc_wkalrm comments
Andrew Victor [Fri, 30 Jun 2006 08:56:01 +0000 (01:56 -0700)]
[PATCH] Correct rtc_wkalrm comments

This corrects the comments describing the 'enabled' and 'pending' flags in
struct rtc_wkalrm of include/linux/rtc.h.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] cond_resched() fix
Andrew Morton [Fri, 30 Jun 2006 08:56:00 +0000 (01:56 -0700)]
[PATCH] cond_resched() fix

Fix a bug identified by Zou Nan hai <nanhai.zou@intel.com>:

If the system is in state SYSTEM_BOOTING, and need_resched() is true,
cond_resched() returns true even though it didn't reschedule.  Consequently
need_resched() remains true and JBD locks up.

Fix that by teaching cond_resched() to only return true if it really did call
schedule().

cond_resched_lock() and cond_resched_softirq() have a problem too.  If we're
in SYSTEM_BOOTING state and need_resched() is true, these functions will drop
the lock and will then try to call schedule(), but the SYSTEM_BOOTING state
will prevent schedule() from being called.  So on return, need_resched() will
still be true, but cond_resched_lock() has to return 1 to tell the caller that
the lock was dropped.  The caller will probably lock up.

Bottom line: if these functions dropped the lock, they _must_ call schedule()
to clear need_resched().   Make it so.

Also, uninline __cond_resched().  It's largeish, and slowpath.

Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: add __raw_writeq definition
Jeff Dike [Fri, 30 Jun 2006 08:55:59 +0000 (01:55 -0700)]
[PATCH] uml: add __raw_writeq definition

The x86_64 build requires a definition for __raw_writeq.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix biarch gcc build on x86_64
Jeff Dike [Fri, 30 Jun 2006 08:55:58 +0000 (01:55 -0700)]
[PATCH] uml: fix biarch gcc build on x86_64

I run an x86_64 kernel with i386 userspace (Ubuntu Dapper) and decided to try
out UML today.  I found that UML wasn't quite aware of biarch compilers (which
Ubuntu i386 ships).  A fix similar to what was done for x86_64 should probably
be committed (see
http://marc.theaimsgroup.com/?l=linux-kernel&m=113425940204010&w=2).  Without
the FLAGS changes, the build will fail at a number of places and without the
LINK change, the final link will fail.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: remove stray file
Jeff Dike [Fri, 30 Jun 2006 08:55:57 +0000 (01:55 -0700)]
[PATCH] uml: remove stray file

Forgot to remove arch/um/kernel/time.c when it was mostly moved to
arch/um/os-Linux.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: remove unneeded time definitions
Jeff Dike [Fri, 30 Jun 2006 08:55:57 +0000 (01:55 -0700)]
[PATCH] uml: remove unneeded time definitions

Remove um_time() and um_stime() syscalls since they are identical to
system-wide ones.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: add locking to xtime accesses
Jeff Dike [Fri, 30 Jun 2006 08:55:56 +0000 (01:55 -0700)]
[PATCH] uml: add locking to xtime accesses

do_timer must be called with xtime_lock held.  I'm not sure boot_timer_handler
needs this, however I don't think it hurts: it simply disables irq and takes a
spinlock.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: unregister useless console when it's not needed
Jeff Dike [Fri, 30 Jun 2006 08:55:55 +0000 (01:55 -0700)]
[PATCH] uml: unregister useless console when it's not needed

-mm in combination with an FC5 init started dying with 'stderr=1' because init
didn't like the lack of /dev/console and exited.  The problem was that the
stderr console, which is intended to dump printk output to the terminal before
the regular console is initialized, isn't a tty, and so can't make
/dev/console operational.

However, since it is registered first, the normal console, when it is
registered, doesn't become the preferred console, and isn't attached to
/dev/console.  Thus, /dev/console is never operational.

This patch makes the stderr console unregister itself in an initcall, which is
late enough that the normal console is registered.  When that happens, the
normal console will become the preferred console and will be able to run
/dev/console.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix off-by-one bug in VM file creation
Jeff Dike [Fri, 30 Jun 2006 08:55:55 +0000 (01:55 -0700)]
[PATCH] uml: fix off-by-one bug in VM file creation

Fix an off-by-one bug in temp file creation.  Seeking to the desired length
and writing a byte resulted in the file being one byte longer than expected.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix /proc/mounts parsing boundary condition
Jeff Dike [Fri, 30 Jun 2006 08:55:54 +0000 (01:55 -0700)]
[PATCH] uml: fix /proc/mounts parsing boundary condition

When parsing /proc/mounts looking for a tmpfs mount on /dev/shm, if a string
that we are looking for if split across reads, then it won't be recognized.

Fix this by refilling the buffer whenever we advance the cursor.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] UML: fix the INIT_ENV_ARG_LIMIT dependencies
Adrian Bunk [Fri, 30 Jun 2006 08:55:51 +0000 (01:55 -0700)]
[PATCH] UML: fix the INIT_ENV_ARG_LIMIT dependencies

Fix the INIT_ENV_ARG_LIMIT dependencies to what seems to have been
intended.

Spotted by Jean-Luc Leger.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] add smp_setup_processor_id()
Andrew Morton [Fri, 30 Jun 2006 08:55:50 +0000 (01:55 -0700)]
[PATCH] add smp_setup_processor_id()

Presently, smp_processor_id() isn't necessarily set up until setup_arch().
But it's used in boot_cpu_init() and printk() and perhaps in other places,
prior to setup_arch() being called.

So provide a new smp_setup_processor_id() which is called before anything
else, wire it up for Voyager (which boots on a CPU other than #0, and broke).

Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] SELinux: Add security hook definition for getioprio and insert hooks
David Quigley [Fri, 30 Jun 2006 08:55:49 +0000 (01:55 -0700)]
[PATCH] SELinux: Add security hook definition for getioprio and insert hooks

Add a new security hook definition for the sys_ioprio_get operation.  At
present, the SELinux hook function implementation for this hook is
identical to the getscheduler implementation but a separate hook is
introduced to allow this check to be specialized in the future if
necessary.

This patch also creates a helper function get_task_ioprio which handles the
access check in addition to retrieving the ioprio value for the task.

Signed-off-by: David Quigley <dpquigl@tycho.nsa.gov>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] SELinux: update USB code with new kill_proc_info_as_uid
David Quigley [Fri, 30 Jun 2006 08:55:48 +0000 (01:55 -0700)]
[PATCH] SELinux: update USB code with new kill_proc_info_as_uid

This patch updates the USB core to save and pass the sending task secid when
sending signals upon AIO completion so that proper security checking can be
applied by security modules.

Signed-off-by: David Quigley <dpquigl@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] SELinux: add security hook call to kill_proc_info_as_uid
David Quigley [Fri, 30 Jun 2006 08:55:47 +0000 (01:55 -0700)]
[PATCH] SELinux: add security hook call to kill_proc_info_as_uid

This patch adds a call to the extended security_task_kill hook introduced by
the prior patch to the kill_proc_info_as_uid function so that these signals
can be properly mediated by security modules.  It also updates the existing
hook call in check_kill_permission.

Signed-off-by: David Quigley <dpquigl@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] SELinux: extend task_kill hook to handle signals sent by AIO completion
David Quigley [Fri, 30 Jun 2006 08:55:46 +0000 (01:55 -0700)]
[PATCH] SELinux: extend task_kill hook to handle signals sent by AIO completion

This patch extends the security_task_kill hook to handle signals sent by AIO
completion.  In this case, the secid of the task responsible for the signal
needs to be obtained and saved earlier, so a security_task_getsecid() hook is
added, and then this saved value is passed subsequently to the extended
task_kill hook for use in checking.

Signed-off-by: David Quigley <dpquigl@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: consolidate code to free slabs from freelist
Christoph Lameter [Fri, 30 Jun 2006 08:55:45 +0000 (01:55 -0700)]
[PATCH] slab: consolidate code to free slabs from freelist

Post and discussion:
http://marc.theaimsgroup.com/?t=115074342800003&r=1&w=2

Code in __shrink_node() duplicates code in cache_reap()

Add a new function drain_freelist that removes slabs with objects that are
already free and use that in various places.

This eliminates the __node_shrink() function and provides the interrupt
holdoff reduction from slab_free to code that used to call __node_shrink.

[akpm@osdl.org: build fixes]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Light weight event counters
Christoph Lameter [Fri, 30 Jun 2006 08:55:45 +0000 (01:55 -0700)]
[PATCH] Light weight event counters

The remaining counters in page_state after the zoned VM counter patches
have been applied are all just for show in /proc/vmstat.  They have no
essential function for the VM.

We use a simple increment of per cpu variables.  In order to avoid the most
severe races we disable preempt.  Preempt does not prevent the race between
an increment and an interrupt handler incrementing the same statistics
counter.  However, that race is exceedingly rare, we may only loose one
increment or so and there is no requirement (at least not in kernel) that
the vm event counters have to be accurate.

In the non preempt case this results in a simple increment for each
counter.  For many architectures this will be reduced by the compiler to a
single instruction.  This single instruction is atomic for i386 and x86_64.
 And therefore even the rare race condition in an interrupt is avoided for
both architectures in most cases.

The patchset also adds an off switch for embedded systems that allows a
building of linux kernels without these counters.

The implementation of these counters is through inline code that hopefully
results in only a single instruction increment instruction being emitted
(i386, x86_64) or in the increment being hidden though instruction
concurrency (EPIC architectures such as ia64 can get that done).

Benefits:
- VM event counter operations usually reduce to a single inline instruction
  on i386 and x86_64.
- No interrupt disable, only preempt disable for the preempt case.
  Preempt disable can also be avoided by moving the counter into a spinlock.
- Handling is similar to zoned VM counters.
- Simple and easily extendable.
- Can be omitted to reduce memory use for embedded use.

References:

RFC http://marc.theaimsgroup.com/?l=linux-kernel&m=113512330605497&w=2
RFC http://marc.theaimsgroup.com/?l=linux-kernel&m=114988082814934&w=2
local_t http://marc.theaimsgroup.com/?l=linux-kernel&m=114991748606690&w=2
V2 http://marc.theaimsgroup.com/?t=115014808400007&r=1&w=2
V3 http://marc.theaimsgroup.com/?l=linux-kernel&m=115024767022346&w=2
V4 http://marc.theaimsgroup.com/?l=linux-kernel&m=115047968808926&w=2

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Use Zoned VM Counters for NUMA statistics
Christoph Lameter [Fri, 30 Jun 2006 08:55:44 +0000 (01:55 -0700)]
[PATCH] Use Zoned VM Counters for NUMA statistics

The numa statistics are really event counters.  But they are per node and
so we have had special treatment for these counters through additional
fields on the pcp structure.  We can now use the per zone nature of the
zoned VM counters to realize these.

This will shrink the size of the pcp structure on NUMA systems.  We will
have some room to add additional per zone counters that will all still fit
in the same cacheline.

 Bits Prior pcp size    Size after patch We can add
 ------------------------------------------------------------------
 64 128 bytes (16 words) 80 bytes (10 words) 48
 32  76 bytes (19 words) 56 bytes (14 words) 8 (64 byte cacheline)
72 (128 byte)

Remove the special statistics for numa and replace them with zoned vm
counters.  This has the side effect that global sums of these events now
show up in /proc/vmstat.

Also take the opportunity to move the zone_statistics() function from
page_alloc.c into vmstat.c.

Discussions:
V2 http://marc.theaimsgroup.com/?t=115048227000002&r=1&w=2

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned-vm-counters: remove read_page_state()
Andrew Morton [Fri, 30 Jun 2006 08:55:43 +0000 (01:55 -0700)]
[PATCH] zoned-vm-counters: remove read_page_state()

No callers.

Cc: Christoph Lameter <clameter@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: remove useless struct wbs
Christoph Lameter [Fri, 30 Jun 2006 08:55:42 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: remove useless struct wbs

Remove writeback state

We can remove some functions now that were needed to calculate the page state
for writeback control since these statistics are now directly available.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: conversion of nr_bounce to per zone counter
Christoph Lameter [Fri, 30 Jun 2006 08:55:41 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: conversion of nr_bounce to per zone counter

Conversion of nr_bounce to a per zone counter

nr_bounce is only used for proc output.  So it could be left as an event
counter.  However, the event counters may not be accurate and nr_bounce is
categorizing types of pages in a zone.  So we really need this to also be a
per zone counter.

[akpm@osdl.org: bugfix]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: conversion of nr_unstable to per zone counter
Christoph Lameter [Fri, 30 Jun 2006 08:55:40 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: conversion of nr_unstable to per zone counter

Conversion of nr_unstable to a per zone counter

We need to do some special modifications to the nfs code since there are
multiple cases of disposition and we need to have a page ref for proper
accounting.

This converts the last critical page state of the VM and therefore we need to
remove several functions that were depending on GET_PAGE_STATE_LAST in order
to make the kernel compile again.  We are only left with event type counters
in page state.

[akpm@osdl.org: bugfixes]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: conversion of nr_writeback to per zone counter
Christoph Lameter [Fri, 30 Jun 2006 08:55:40 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: conversion of nr_writeback to per zone counter

Conversion of nr_writeback to per zone counter.

This removes the last page_state counter from arch/i386/mm/pgtable.c so we
drop the page_state from there.

[akpm@osdl.org: bugfix]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: conversion of nr_dirty to per zone counter
Christoph Lameter [Fri, 30 Jun 2006 08:55:39 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: conversion of nr_dirty to per zone counter

This makes nr_dirty a per zone counter.  Looping over all processors is
avoided during writeback state determination.

The counter aggregation for nr_dirty had to be undone in the NFS layer since
we summed up the page counts from multiple zones.  Someone more familiar with
NFS should probably review what I have done.

[akpm@osdl.org: bugfix]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: conversion of nr_pagetables to per zone counter
Christoph Lameter [Fri, 30 Jun 2006 08:55:38 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: conversion of nr_pagetables to per zone counter

Conversion of nr_page_table_pages to a per zone counter

[akpm@osdl.org: bugfix]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: conversion of nr_slab to per zone counter
Christoph Lameter [Fri, 30 Jun 2006 08:55:38 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: conversion of nr_slab to per zone counter

- Allows reclaim to access counter without looping over processor counts.

- Allows accurate statistics on how many pages are used in a zone by
  the slab. This may become useful to balance slab allocations over
  various zones.

[akpm@osdl.org: bugfix]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: zone_reclaim: remove /proc/sys/vm/zone_reclaim_interval
Christoph Lameter [Fri, 30 Jun 2006 08:55:37 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: zone_reclaim: remove /proc/sys/vm/zone_reclaim_interval

The zone_reclaim_interval was necessary because we were not able to determine
how many unmapped pages exist in a zone.  Therefore we had to scan in
intervals to figure out if any pages were unmapped.

With the zoned counters and NR_ANON_PAGES we now know the number of pagecache
pages and the number of mapped pages in a zone.  So we can simply skip the
reclaim if there is an insufficient number of unmapped pages.  We use
SWAP_CLUSTER_MAX as the boundary.

Drop all support for /proc/sys/vm/zone_reclaim_interval.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: split NR_ANON_PAGES off from NR_FILE_MAPPED
Christoph Lameter [Fri, 30 Jun 2006 08:55:36 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: split NR_ANON_PAGES off from NR_FILE_MAPPED

The current NR_FILE_MAPPED is used by zone reclaim and the dirty load
calculation as the number of mapped pagecache pages.  However, that is not
true.  NR_FILE_MAPPED includes the mapped anonymous pages.  This patch
separates those and therefore allows an accurate tracking of the anonymous
pages per zone.

It then becomes possible to determine the number of unmapped pages per zone
and we can avoid scanning for unmapped pages if there are none.

Also it may now be possible to determine the mapped/unmapped ratio in
get_dirty_limit.  Isnt the number of anonymous pages irrelevant in that
calculation?

Note that this will change the meaning of the number of mapped pages reported
in /proc/vmstat /proc/meminfo and in the per node statistics.  This may affect
user space tools that monitor these counters!  NR_FILE_MAPPED works like
NR_FILE_DIRTY.  It is only valid for pagecache pages.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: remove NR_FILE_MAPPED from scan control structure
Christoph Lameter [Fri, 30 Jun 2006 08:55:36 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: remove NR_FILE_MAPPED from scan control structure

We can now access the number of pages in a mapped state in an inexpensive way
in shrink_active_list.  So drop the nr_mapped field from scan_control.

[akpm@osdl.org: bugfix]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: conversion of nr_pagecache to per zone counter
Christoph Lameter [Fri, 30 Jun 2006 08:55:35 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: conversion of nr_pagecache to per zone counter

Currently a single atomic variable is used to establish the size of the page
cache in the whole machine.  The zoned VM counters have the same method of
implementation as the nr_pagecache code but also allow the determination of
the pagecache size per zone.

Remove the special implementation for nr_pagecache and make it a zoned counter
named NR_FILE_PAGES.

Updates of the page cache counters are always performed with interrupts off.
We can therefore use the __ variant here.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: convert nr_mapped to per zone counter
Christoph Lameter [Fri, 30 Jun 2006 08:55:34 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: convert nr_mapped to per zone counter

nr_mapped is important because it allows a determination of how many pages of
a zone are not mapped, which would allow a more efficient means of determining
when we need to reclaim memory in a zone.

We take the nr_mapped field out of the page state structure and define a new
per zone counter named NR_FILE_MAPPED (the anonymous pages will be split off
from NR_MAPPED in the next patch).

We replace the use of nr_mapped in various kernel locations.  This avoids the
looping over all processors in try_to_free_pages(), writeback, reclaim (swap +
zone reclaim).

[akpm@osdl.org: bugfix]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: basic ZVC (zoned vm counter) implementation
Christoph Lameter [Fri, 30 Jun 2006 08:55:33 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: basic ZVC (zoned vm counter) implementation

Per zone counter infrastructure

The counters that we currently have for the VM are split per processor.  The
processor however has not much to do with the zone these pages belong to.  We
cannot tell f.e.  how many ZONE_DMA pages are dirty.

So we are blind to potentially inbalances in the usage of memory in various
zones.  F.e.  in a NUMA system we cannot tell how many pages are dirty on a
particular node.  If we knew then we could put measures into the VM to balance
the use of memory between different zones and different nodes in a NUMA
system.  For example it would be possible to limit the dirty pages per node so
that fast local memory is kept available even if a process is dirtying huge
amounts of pages.

Another example is zone reclaim.  We do not know how many unmapped pages exist
per zone.  So we just have to try to reclaim.  If it is not working then we
pause and try again later.  It would be better if we knew when it makes sense
to reclaim unmapped pages from a zone.  This patchset allows the determination
of the number of unmapped pages per zone.  We can remove the zone reclaim
interval with the counters introduced here.

Futhermore the ability to have various usage statistics available will allow
the development of new NUMA balancing algorithms that may be able to improve
the decision making in the scheduler of when to move a process to another node
and hopefully will also enable automatic page migration through a user space
program that can analyse the memory load distribution and then rebalance
memory use in order to increase performance.

The counter framework here implements differential counters for each processor
in struct zone.  The differential counters are consolidated when a threshold
is exceeded (like done in the current implementation for nr_pageache), when
slab reaping occurs or when a consolidation function is called.

Consolidation uses atomic operations and accumulates counters per zone in the
zone structure and also globally in the vm_stat array.  VM functions can
access the counts by simply indexing a global or zone specific array.

The arrangement of counters in an array also simplifies processing when output
has to be generated for /proc/*.

Counters can be updated by calling inc/dec_zone_page_state or
_inc/dec_zone_page_state analogous to *_page_state.  The second group of
functions can be called if it is known that interrupts are disabled.

Special optimized increment and decrement functions are provided.  These can
avoid certain checks and use increment or decrement instructions that an
architecture may provide.

We also add a new CONFIG_DMA_IS_NORMAL that signifies that an architecture can
do DMA to all memory and therefore ZONE_NORMAL will not be populated.  This is
only currently set for IA64 SGI SN2 and currently only affects
node_page_state().  In the best case node_page_state can be reduced to
retrieving a single counter for the one zone on the node.

[akpm@osdl.org: cleanups]
[akpm@osdl.org: export vm_stat[] for filesystems]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zoned vm counters: create vmstat.c/.h from page_alloc.c/.h
Christoph Lameter [Fri, 30 Jun 2006 08:55:32 +0000 (01:55 -0700)]
[PATCH] zoned vm counters: create vmstat.c/.h from page_alloc.c/.h

NOTE: ZVC are *not* the lightweight event counters.  ZVCs are reliable whereas
event counters do not need to be.

Zone based VM statistics are necessary to be able to determine what the state
of memory in one zone is.  In a NUMA system this can be helpful for local
reclaim and other memory optimizations that may be able to shift VM load in
order to get more balanced memory use.

It is also useful to know how the computing load affects the memory
allocations on various zones.  This patchset allows the retrieval of that data
from userspace.

The patchset introduces a framework for counters that is a cross between the
existing page_stats --which are simply global counters split per cpu-- and the
approach of deferred incremental updates implemented for nr_pagecache.

Small per cpu 8 bit counters are added to struct zone.  If the counter exceeds
certain thresholds then the counters are accumulated in an array of
atomic_long in the zone and in a global array that sums up all zone values.
The small 8 bit counters are next to the per cpu page pointers and so they
will be in high in the cpu cache when pages are allocated and freed.

Access to VM counter information for a zone and for the whole machine is then
possible by simply indexing an array (Thanks to Nick Piggin for pointing out
that approach).  The access to the total number of pages of various types does
no longer require the summing up of all per cpu counters.

Benefits of this patchset right now:

- Ability for UP and SMP configuration to determine how memory
  is balanced between the DMA, NORMAL and HIGHMEM zones.

- loops over all processors are avoided in writeback and
  reclaim paths. We can avoid caching the writeback information
  because the needed information is directly accessible.

- Special handling for nr_pagecache removed.

- zone_reclaim_interval vanishes since VM stats can now determine
  when it is worth to do local reclaim.

- Fast inline per node page state determination.

- Accurate counters in /sys/devices/system/node/node*/meminfo. Current
  counters are counting simply which processor allocated a page somewhere
  and guestimate based on that. So the counters were not useful to show
  the actual distribution of page use on a specific zone.

- The swap_prefetch patch requires per node statistics in order to
  figure out when processors of a node can prefetch. This patch provides
  some of the needed numbers.

- Detailed VM counters available in more /proc and /sys status files.

References to earlier discussions:
V1 http://marc.theaimsgroup.com/?l=linux-kernel&m=113511649910826&w=2
V2 http://marc.theaimsgroup.com/?l=linux-kernel&m=114980851924230&w=2
V3 http://marc.theaimsgroup.com/?l=linux-kernel&m=115014697910351&w=2
V4 http://marc.theaimsgroup.com/?l=linux-kernel&m=115024767318740&w=2

Performance tests with AIM7 did not show any regressions.  Seems to be a tad
faster even.  Tested on ia64/NUMA.  Builds fine on i386, SMP / UP.  Includes
fixes for s390/arm/uml arch code.

This patch:

Move counter code from page_alloc.c/page-flags.h to vmstat.c/h.

Create vmstat.c/vmstat.h by separating the counter code and the proc
functions.

Move the vm_stat_text array before zoneinfo_show.

[akpm@osdl.org: s390 build fix]
[akpm@osdl.org: HOTPLUG_CPU build fix]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>