25 Jul, 2008

3 commits

  • Memory may be hot-removed on a per-memory-block basis, particularly on
    POWER where the SPARSEMEM section size often matches the memory-block
    size. A user-level agent must be able to identify which sections of
    memory are likely to be removable before attempting the potentially
    expensive operation. This patch adds a file called "removable" to the
    memory directory in sysfs to help such an agent. In this patch, a memory
    block is considered removable if;

    o It contains only MOVABLE pageblocks
    o It contains only pageblocks with free pages regardless of pageblock type

    On the other hand, a memory block starting with a PageReserved() page will
    never be considered removable. Without this patch, the user-agent is
    forced to choose a memory block to remove randomly.

    Sample output of the sysfs files:

    ./memory/memory0/removable: 0
    ./memory/memory1/removable: 0
    ./memory/memory2/removable: 0
    ./memory/memory3/removable: 0
    ./memory/memory4/removable: 0
    ./memory/memory5/removable: 0
    ./memory/memory6/removable: 0
    ./memory/memory7/removable: 1
    ./memory/memory8/removable: 0
    ./memory/memory9/removable: 0
    ./memory/memory10/removable: 0
    ./memory/memory11/removable: 0
    ./memory/memory12/removable: 0
    ./memory/memory13/removable: 0
    ./memory/memory14/removable: 0
    ./memory/memory15/removable: 0
    ./memory/memory16/removable: 0
    ./memory/memory17/removable: 1
    ./memory/memory18/removable: 1
    ./memory/memory19/removable: 1
    ./memory/memory20/removable: 1
    ./memory/memory21/removable: 1
    ./memory/memory22/removable: 1

    Signed-off-by: Badari Pulavarty
    Signed-off-by: Mel Gorman
    Acked-by: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Badari Pulavarty
     
  • Provide new hugepages user APIs that are more suited to multiple hstates
    in sysfs. There is a new directory, /sys/kernel/hugepages. Underneath
    that directory there will be a directory per-supported hugepage size,
    e.g.:

    /sys/kernel/hugepages/hugepages-64kB
    /sys/kernel/hugepages/hugepages-16384kB
    /sys/kernel/hugepages/hugepages-16777216kB

    corresponding to 64k, 16m and 16g respectively. Within each
    hugepages-size directory there are a number of files, corresponding to the
    tracked counters in the hstate, e.g.:

    /sys/kernel/hugepages/hugepages-64/nr_hugepages
    /sys/kernel/hugepages/hugepages-64/nr_overcommit_hugepages
    /sys/kernel/hugepages/hugepages-64/free_hugepages
    /sys/kernel/hugepages/hugepages-64/resv_hugepages
    /sys/kernel/hugepages/hugepages-64/surplus_hugepages

    Of these files, the first two are read-write and the latter three are
    read-only. The size of the hugepage being manipulated is trivially
    deducible from the enclosing directory and is always expressed in kB (to
    match meminfo).

    [dave@linux.vnet.ibm.com: fix build]
    [nacc@us.ibm.com: hugetlb: hang off of /sys/kernel/mm rather than /sys/kernel]
    [nacc@us.ibm.com: hugetlb: remove CONFIG_SYSFS dependency]
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Nick Piggin
    Cc: Dave Hansen
    Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nishanth Aravamudan
     
  • Add a kobject to create /sys/kernel/mm when sysfs is mounted. The kobject
    will exist regardless. This will allow for the hugepage related sysfs
    directories to exist under the mm "subsystem" directory. Add an ABI file
    appropriately.

    [kosaki.motohiro@jp.fujitsu.com: fix build]
    Signed-off-by: Nishanth Aravamudan
    Cc: Nick Piggin
    Cc: Mel Gorman
    Signed-off-by: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nishanth Aravamudan
     

22 Jul, 2008

1 commit

  • Why?:
    There are occasions where userspace would like to access sysfs
    attributes for a device but it may not know how sysfs has named the
    device or the path. For example what is the sysfs path for
    /dev/disk/by-id/ata-ST3160827AS_5MT004CK? With this change a call to
    stat(2) returns the major:minor then userspace can see that
    /sys/dev/block/8:32 links to /sys/block/sdc.

    What are the alternatives?:
    1/ Add an ioctl to return the path: Doable, but sysfs is meant to reduce
    the need to proliferate ioctl interfaces into the kernel, so this
    seems counter productive.

    2/ Use udev to create these symlinks: Also doable, but it adds a
    udev dependency to utilities that might be running in a limited
    environment like an initramfs.

    3/ Do a full-tree search of sysfs.

    [kay.sievers@vrfy.org: fix duplicate registrations]
    [kay.sievers@vrfy.org: cleanup suggestions]

    Cc: Neil Brown
    Cc: Tejun Heo
    Acked-by: Kay Sievers
    Reviewed-by: SL Baur
    Acked-by: Kay Sievers
    Acked-by: Mark Lord
    Acked-by: H. Peter Anvin
    Signed-off-by: Dan Williams
    Signed-off-by: Greg Kroah-Hartman

    Dan Williams
     

17 Jul, 2008

1 commit

  • Allow users to enable/disable/clear a specific & valid GPE/Fixed Event
    in user space.

    This is useful for debugging, especially for some
    interrupt storm issues.

    All wakeup GPEs are disabled and they can not be enabled at runtime,
    and we mark them as invalid.

    All GPEs that don't have a _Lxx/_Exx method are marked as invalid.

    All Fixed Events that don't have an event handler are marked as invalid
    and they can't be enabled until an event handler is registered.

    Signed-off-by: Zhang Rui
    Signed-off-by: Ling Ming
    Signed-off-by: Len Brown
    Signed-off-by: Andi Kleen

    Zhang Rui
     

15 Jul, 2008

2 commits

  • * 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (821 commits)
    x86: make 64bit hpet_set_mapping to use ioremap too, v2
    x86: get x86_phys_bits early
    x86: max_low_pfn_mapped fix #4
    x86: change _node_to_cpumask_ptr to return const ptr
    x86: I/O APIC: remove an IRQ2-mask hack
    x86: fix numaq_tsc_disable calling
    x86, e820: remove end_user_pfn
    x86: max_low_pfn_mapped fix, #3
    x86: max_low_pfn_mapped fix, #2
    x86: max_low_pfn_mapped fix, #1
    x86_64: fix delayed signals
    x86: remove conflicting nx6325 and nx6125 quirks
    x86: Recover timer_ack lost in the merge of the NMI watchdog
    x86: I/O APIC: Never configure IRQ2
    x86: L-APIC: Always fully configure IRQ0
    x86: L-APIC: Set IRQ0 as edge-triggered
    x86: merge dwarf2 headers
    x86: use AS_CFI instead of UNWIND_INFO
    x86: use ignore macro instead of hash comment
    x86: use matching CFI_ENDPROC
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (71 commits)
    [S390] sclp_tty: Fix scheduling while atomic bug.
    [S390] sclp_tty: remove ioctl interface.
    [S390] Remove P390 support.
    [S390] Cleanup vmcp printk messages.
    [S390] Cleanup lcs printk messages.
    [S390] Cleanup kprobes printk messages.
    [S390] Cleanup vmwatch printk messages.
    [S390] Cleanup dcssblk printk messages.
    [S390] Cleanup zfcp dumper printk messages.
    [S390] Cleanup vmlogrdr printk messages.
    [S390] Cleanup s390 debug feature print messages.
    [S390] Cleanup monreader printk messages.
    [S390] Cleanup appldata printk messages.
    [S390] Cleanup smsgiucv printk messages.
    [S390] Cleanup cpacf printk messages.
    [S390] Cleanup qeth print messages.
    [S390] Cleanup netiucv printk messages.
    [S390] Cleanup iucv printk messages.
    [S390] Cleanup sclp printk messages.
    [S390] Cleanup zcrypt printk messages.
    ...

    Linus Torvalds
     

14 Jul, 2008

1 commit

  • Add modalias and subchannel type attributes for all subchannels.
    I/O subchannel specific attributes are now created in
    io_subchannel_probe(). modalias and subchannel type are also
    added to the uevent for the css bus. Also make the css modalias
    known.

    Signed-off-by: Cornelia Huck
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Cornelia Huck
     

08 Jul, 2008

1 commit

  • This patch adds /sys/firmware/memmap interface that represents the BIOS
    (or Firmware) provided memory map. The tree looks like:

    /sys/firmware/memmap/0/start (hex number)
    end (hex number)
    type (string)
    ... /1/start
    end
    type

    With the following shell snippet one can print the memory map in the same form
    the kernel prints itself when booting on x86 (the E820 map).

    --------- 8< --------------------------
    #!/bin/sh
    cd /sys/firmware/memmap
    for dir in * ; do
    start=$(cat $dir/start)
    end=$(cat $dir/end)
    type=$(cat $dir/type)
    printf "%016x-%016x (%s)\n" $start $[ $end +1] "$type"
    done
    --------- >8 --------------------------

    That patch only provides the needed interface:

    1. The sysfs interface.
    2. The structure and enumeration definition.
    3. The function firmware_map_add() and firmware_map_add_early()
    that should be called from architecture code (E820/EFI, for
    example) to add the contents to the interface.

    If the kernel is compiled without CONFIG_FIRMWARE_MEMMAP, the interface does
    nothing without cluttering the architecture-specific code with #ifdef's.

    The purpose of the new interface is kexec: While /proc/iomem represents
    the *used* memory map (e.g. modified via kernel parameters like 'memmap'
    and 'mem'), the /sys/firmware/memmap tree represents the unmodified memory
    map provided via the firmware. So kexec can:

    - use the original memory map for rebooting,
    - use the /proc/iomem for setting up the ELF core headers for kdump
    case that should only represent the memory of the system.

    The patch has been tested on i386 and x86_64.

    Signed-off-by: Bernhard Walle
    Acked-by: Greg KH
    Acked-by: Vivek Goyal
    Cc: kexec@lists.infradead.org
    Cc: yhlu.kernel@gmail.com
    Signed-off-by: Ingo Molnar

    Bernhard Walle
     

03 Jul, 2008

1 commit


25 May, 2008

1 commit

  • Fuse allocates a separate bdi for each filesystem, and registers them
    in sysfs with "MAJOR:MINOR" of sb->s_dev (st_dev). This works fine for
    anon devices normally used by fuse, but can conflict with an already
    registered BDI for "fuseblk" filesystems, where sb->s_dev represents a
    real block device. In particularl this happens if a non-partitioned
    device is being mounted.

    Fix by registering with a different name for "fuseblk" filesystems.

    Thanks to Ioan Ionita for the bug report.

    Signed-off-by: Miklos Szeredi
    Reported-by: Ioan Ionita
    Tested-by: Ioan Ionita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     

30 Apr, 2008

4 commits

  • Move BDI statistics to debugfs:

    /sys/kernel/debug/bdi//stats

    Use postcore_initcall() to initialize the sysfs class and debugfs,
    because debugfs is initialized in core_initcall().

    Update descriptions in ABI documentation.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Add "max_ratio" to /sys/class/bdi. This indicates the maximum percentage of
    the global dirty threshold allocated to this bdi.

    [mszeredi@suse.cz]

    - fix parsing in max_ratio_store().
    - export bdi_set_max_ratio() to modules
    - limit bdi_dirty with bdi->max_ratio
    - document new sysfs attribute

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Under normal circumstances each device is given a part of the total write-back
    cache that relates to its current avg writeout speed in relation to the other
    devices.

    min_ratio - allows one to assign a minimum portion of the write-back cache to
    a particular device. This is useful in situations where you might want to
    provide a minimum QoS. (One request for this feature came from flash based
    storage people who wanted to avoid writing out at all costs - they of course
    needed some pdflush hacks as well)

    max_ratio - allows one to assign a maximum portion of the dirty limit to a
    particular device. This is useful in situations where you want to avoid one
    device taking all or most of the write-back cache. Eg. an NFS mount that is
    prone to get stuck, or a FUSE mount which you don't trust to play fair.

    Add "min_ratio" to /sys/class/bdi. This indicates the minimum percentage of
    the global dirty threshold allocated to this bdi.

    [mszeredi@suse.cz]

    - fix parsing in min_ratio_store()
    - document new sysfs attribute

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Provide a place in sysfs (/sys/class/bdi) for the backing_dev_info object.
    This allows us to see and set the various BDI specific variables.

    In particular this properly exposes the read-ahead window for all relevant
    users and /sys/block//queue/read_ahead_kb should be deprecated.

    With patient help from Kay Sievers and Greg KH

    [mszeredi@suse.cz]

    - split off NFS and FUSE changes into separate patches
    - document new sysfs attributes under Documentation/ABI
    - do bdi_class_init as a core_initcall, otherwise the "default" BDI
    won't be initialized
    - remove bdi_init_fmt macro, it's not used very much

    [akpm@linux-foundation.org: fix ia64 warning]
    Signed-off-by: Peter Zijlstra
    Cc: Kay Sievers
    Acked-by: Greg KH
    Cc: Trond Myklebust
    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

22 Apr, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: (42 commits)
    PCI: Change PCI subsystem MAINTAINER
    PCI: pci-iommu-iotlb-flushing-speedup
    PCI: pci_setup_bridge() mustn't be __devinit
    PCI: pci_bus_size_cardbus() mustn't be __devinit
    PCI: pci_scan_device() mustn't be __devinit
    PCI: pci_alloc_child_bus() mustn't be __devinit
    PCI: replace remaining __FUNCTION__ occurrences
    PCI: Hotplug: fakephp: Return success, not ENODEV, when bus rescan is triggered
    PCI: Hotplug: Fix leaks in IBM Hot Plug Controller Driver - ibmphp_init_devno()
    PCI: clean up resource alignment management
    PCI: aerdrv_acpi.c: remove unneeded NULL check
    PCI: Update VIA CX700 quirk
    PCI: Expose PCI VPD through sysfs
    PCI: iommu: iotlb flushing
    PCI: simplify quirk debug output
    PCI: iova RB tree setup tweak
    PCI: parisc: use generic pci_enable_resources()
    PCI: ppc: use generic pci_enable_resources()
    PCI: powerpc: use generic pci_enable_resources()
    PCI: ia64: use generic pci_enable_resources()
    ...

    Linus Torvalds
     

21 Apr, 2008

1 commit

  • Vital Product Data (VPD) may be exposed by PCI devices in several
    ways. It is generally unsafe to read this information through the
    existing interfaces to user-land because of stateful interfaces.

    This adds:
    - abstract operations for VPD access (struct pci_vpd_ops)
    - VPD state information in struct pci_dev (struct pci_vpd)
    - an implementation of the VPD access method specified in PCI 2.2
    (in access.c)
    - a 'vpd' binary file in sysfs directories for PCI devices with VPD
    operations defined

    It adds a probe for PCI 2.2 VPD in pci_scan_device() and release of
    VPD state in pci_release_dev().

    Signed-off-by: Ben Hutchings
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     

20 Apr, 2008

1 commit

  • Add /sysfs/firmware/ibft/[initiator|targetX|ethernetX] directories along with
    text properties which export the the iSCSI Boot Firmware Table (iBFT)
    structure.

    What is iSCSI Boot Firmware Table? It is a mechanism for the iSCSI tools to
    extract from the machine NICs the iSCSI connection information so that they
    can automagically mount the iSCSI share/target. Currently the iSCSI
    information is hard-coded in the initrd. The /sysfs entries are read-only
    one-name-and-value fields.

    The usual set of data exposed is:

    # for a in `find /sys/firmware/ibft/ -type f -print`; do echo -n "$a: "; cat $a; done
    /sys/firmware/ibft/target0/target-name: iqn.2007.com.intel-sbx44:storage-10gb
    /sys/firmware/ibft/target0/nic-assoc: 0
    /sys/firmware/ibft/target0/chap-type: 0
    /sys/firmware/ibft/target0/lun: 00000000
    /sys/firmware/ibft/target0/port: 3260
    /sys/firmware/ibft/target0/ip-addr: 192.168.79.116
    /sys/firmware/ibft/target0/flags: 3
    /sys/firmware/ibft/target0/index: 0
    /sys/firmware/ibft/ethernet0/mac: 00:11:25:9d:8b:01
    /sys/firmware/ibft/ethernet0/vlan: 0
    /sys/firmware/ibft/ethernet0/gateway: 192.168.79.254
    /sys/firmware/ibft/ethernet0/origin: 0
    /sys/firmware/ibft/ethernet0/subnet-mask: 255.255.252.0
    /sys/firmware/ibft/ethernet0/ip-addr: 192.168.77.41
    /sys/firmware/ibft/ethernet0/flags: 7
    /sys/firmware/ibft/ethernet0/index: 0
    /sys/firmware/ibft/initiator/initiator-name: iqn.2007-07.com:konrad.initiator
    /sys/firmware/ibft/initiator/flags: 3
    /sys/firmware/ibft/initiator/index: 0

    For full details of the IBFT structure please take a look at:
    ftp://ftp.software.ibm.com/systems/support/system_x_pdf/ibm_iscsi_boot_firmware_table_v1.02.pdf

    [akpm@linux-foundation.org: fix build]
    Signed-off-by: Konrad Rzeszutek
    Cc: Mike Christie
    Cc: Peter Jones
    Cc: James Bottomley
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Konrad Rzeszutek
     

18 Apr, 2008

1 commit

  • Add ABI documentation for these files:

    /sys/fs/ocfs2/max_locking_protocol
    /sys/fs/ocfs2/loaded_cluster_plugins
    /sys/fs/ocfs2/active_cluster_plugin
    /sys/fs/ocfs2/cluster_stack

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     

08 Feb, 2008

3 commits

  • Update the documentation to reflect the change in userspace interface.

    Signed-off-by: Jerome Marchand
    Signed-off-by: Jens Axboe

    Jerome Marchand
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (112 commits)
    ACPI: fix build warning
    Revert "cpuidle: build fix for non-x86"
    ACPI: update intrd DSDT override console messages
    ACPI: update DSDT override documentation
    ACPI: Add "acpi_no_initrd_override" kernel parameter
    ACPI: its a directory not a folder....
    ACPI: misc cleanups
    ACPI: add missing prink prefix strings
    ACPI: cleanup acpi.h
    ACPICA: fix CONFIG_ACPI_DEBUG_FUNC_TRACE build
    ACPI: video: Ignore ACPI video devices that aren't present in hardware
    ACPI: video: reset brightness on resume
    ACPI: video: call ACPI notifier chain for ACPI video notifications
    ACPI: create notifier chain to get hotkey events to graphics driver
    ACPI: video: delete unused display switch on hotkey event code
    ACPI: video: create "brightness_switch_enabled" modparam
    cpuidle: Add a poll_idle method
    ACPI: cpuidle: Support C1 idle time accounting
    ACPI: enable MWAIT for C1 idle
    ACPI: idle: Fix acpi_safe_halt usages and interrupt enabling/disabling
    ...

    Linus Torvalds
     
  • The top-level Documentation/ directory is unmanageably large, so we
    should take any obvious opportunities to move stuff into subdirectories.
    These sched-*.txt files seem an obvious easy case.

    Signed-off-by: J. Bruce Fields
    Cc: Ingo Molnar
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J. Bruce Fields
     

07 Feb, 2008

1 commit


02 Feb, 2008

1 commit

  • This documents two newly created files:
    /sys/bus/usb/device/.../power/connected_duration
    /sys/bus/usb/device/.../power/active_duration

    Documentation was placed in Documentation/ABI/testing, since that's where the
    documentation is for the other USB sysfs power files.

    Signed-off-by: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Sarah Sharp
     

18 Dec, 2007

1 commit


13 Jul, 2007

1 commit

  • This patch (as920) adds an extra level of protection to the
    USB-Persist facility. Now it will apply by default only to hubs; for
    all other devices the user must enable it explicitly by setting the
    power/persist device attribute.

    The disconnect_all_children() routine in hub.c has been removed and
    its code placed inline. This is the way it was originally as part of
    hub_pre_reset(); the revised usage in hub_reset_resume() is
    sufficiently different that the code can no longer be shared.
    Likewise, mark_children_for_reset() is now inline as part of
    hub_reset_resume(). The end result looks much cleaner than before.

    The sysfs interface is updated to add the new attribute file, and
    there are corresponding documentation updates.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

28 Apr, 2007

2 commits

  • This patch (as874) adds another piece to the user-visible part of the
    USB autosuspend interface. The new power/level sysfs attribute allows
    users to force the device on (with autosuspend off), force the device
    to sleep (with autoresume off), or return to normal automatic operation.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as867) adds an entry for the new power/autosuspend
    attribute in Documentation/ABI/testing, and it changes the behavior of
    the delay value. Now a delay of 0 means to autosuspend as soon as
    possible, and negative values will prevent autosuspend.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

12 Feb, 2007

1 commit

  • - update documentation

    - use clear_bdi_congested/set_bdi_congested functions directly instead of
    old wrappers

    - removed DECLARE_BUF_AS_STRING macro

    Signed-off-by: Thomas Maier
    Cc: Peter Osterlund
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Maier
     

09 Dec, 2006

1 commit


04 Nov, 2006

1 commit

  • Add a swsusp debugging mode. This does everything that's needed for a suspend
    except for actually suspending. So we can look in the log messages and work
    out a) what code is being slow and b) which drivers are misbehaving.

    (1)
    # echo testproc > /sys/power/disk
    # echo disk > /sys/power/state

    This should turn off the non-boot CPU, freeze all processes, wait for 5
    seconds and then thaw the processes and the CPU.

    (2)
    # echo test > /sys/power/disk
    # echo disk > /sys/power/state

    This should turn off the non-boot CPU, freeze all processes, shrink
    memory, suspend all devices, wait for 5 seconds, resume the devices etc.

    Cc: Pavel Machek
    Cc: Stefan Seyfried
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

26 Sep, 2006

1 commit


22 Jun, 2006

1 commit