1. 02 8月, 2011 2 次提交
  2. 28 7月, 2011 2 次提交
  3. 27 7月, 2011 6 次提交
    • H
      panic: panic=-1 for immediate reboot · 4302fbc8
      Hugh Dickins 提交于
      When a kernel BUG or oops occurs, ChromeOS intends to panic and
      immediately reboot, with stacktrace and other messages preserved in RAM
      across reboot.
      
      But the longer we delay, the more likely the user is to poweroff and
      lose the info.
      
      panic_timeout (seconds before rebooting) is set by panic= boot option or
      sysctl or /proc/sys/kernel/panic; but 0 means wait forever, so at
      present we have to delay at least 1 second.
      
      Let a negative number mean reboot immediately (with the small cosmetic
      benefit of suppressing that newline-less "Rebooting in %d seconds.."
      message).
      Signed-off-by: NHugh Dickins <hughd@chromium.org>
      Signed-off-by: NMandeep Singh Baines <msb@chromium.org>
      Cc: Huang Ying <ying.huang@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Olaf Hering <olaf@aepfle.de>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4302fbc8
    • M
      Documentation/DMA-API-HOWTO.txt: fix misleading example · 3f0fb4e8
      Michal Miroslaw 提交于
      See: DMA-API.txt, part Id, DMA_FROM_DEVICE description.
      Signed-off-by: NMichal Miroslaw <mirq-linux@rere.qmqm.pl>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3f0fb4e8
    • W
      include/linux/dma-mapping.h: remove DMA_xxBIT_MASK macros · 91f6cdf8
      WANG Cong 提交于
      git grep shows there are no users in tree, so we can remove them safely.
      Signed-off-by: NWANG Cong <xiyou.wangcong@gmail.com>
      Acked-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Acked-by: NJiri Slaby <jslaby@suse.cz>
      Acked-by: NVinod Koul <vinod.koul@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      91f6cdf8
    • V
      ipc: introduce shm_rmid_forced sysctl · b34a6b1d
      Vasiliy Kulikov 提交于
      Add support for the shm_rmid_forced sysctl.  If set to 1, all shared
      memory objects in current ipc namespace will be automatically forced to
      use IPC_RMID.
      
      The POSIX way of handling shmem allows one to create shm objects and
      call shmdt(), leaving shm object associated with no process, thus
      consuming memory not counted via rlimits.
      
      With shm_rmid_forced=1 the shared memory object is counted at least for
      one process, so OOM killer may effectively kill the fat process holding
      the shared memory.
      
      It obviously breaks POSIX - some programs relying on the feature would
      stop working.  So set shm_rmid_forced=1 only if you're sure nobody uses
      "orphaned" memory.  Use shm_rmid_forced=0 by default for compatability
      reasons.
      
      The feature was previously impemented in -ow as a configure option.
      
      [akpm@linux-foundation.org: fix documentation, per Randy]
      [akpm@linux-foundation.org: fix warning]
      [akpm@linux-foundation.org: readability/conventionality tweaks]
      [akpm@linux-foundation.org: fix shm_rmid_forced/shm_forced_rmid confusion, use standard comment layout]
      Signed-off-by: NVasiliy Kulikov <segoon@openwall.com>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: "Serge E. Hallyn" <serge.hallyn@canonical.com>
      Cc: Daniel Lezcano <daniel.lezcano@free.fr>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Solar Designer <solar@openwall.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b34a6b1d
    • K
      memcg: add memory.vmscan_stat · 82f9d486
      KAMEZAWA Hiroyuki 提交于
      The commit log of 0ae5e89c ("memcg: count the soft_limit reclaim
      in...") says it adds scanning stats to memory.stat file.  But it doesn't
      because we considered we needed to make a concensus for such new APIs.
      
      This patch is a trial to add memory.scan_stat. This shows
        - the number of scanned pages(total, anon, file)
        - the number of rotated pages(total, anon, file)
        - the number of freed pages(total, anon, file)
        - the number of elaplsed time (including sleep/pause time)
      
        for both of direct/soft reclaim.
      
      The biggest difference with oringinal Ying's one is that this file
      can be reset by some write, as
      
        # echo 0 ...../memory.scan_stat
      
      Example of output is here. This is a result after make -j 6 kernel
      under 300M limit.
      
        [kamezawa@bluextal ~]$ cat /cgroup/memory/A/memory.scan_stat
        [kamezawa@bluextal ~]$ cat /cgroup/memory/A/memory.vmscan_stat
        scanned_pages_by_limit 9471864
        scanned_anon_pages_by_limit 6640629
        scanned_file_pages_by_limit 2831235
        rotated_pages_by_limit 4243974
        rotated_anon_pages_by_limit 3971968
        rotated_file_pages_by_limit 272006
        freed_pages_by_limit 2318492
        freed_anon_pages_by_limit 962052
        freed_file_pages_by_limit 1356440
        elapsed_ns_by_limit 351386416101
        scanned_pages_by_system 0
        scanned_anon_pages_by_system 0
        scanned_file_pages_by_system 0
        rotated_pages_by_system 0
        rotated_anon_pages_by_system 0
        rotated_file_pages_by_system 0
        freed_pages_by_system 0
        freed_anon_pages_by_system 0
        freed_file_pages_by_system 0
        elapsed_ns_by_system 0
        scanned_pages_by_limit_under_hierarchy 9471864
        scanned_anon_pages_by_limit_under_hierarchy 6640629
        scanned_file_pages_by_limit_under_hierarchy 2831235
        rotated_pages_by_limit_under_hierarchy 4243974
        rotated_anon_pages_by_limit_under_hierarchy 3971968
        rotated_file_pages_by_limit_under_hierarchy 272006
        freed_pages_by_limit_under_hierarchy 2318492
        freed_anon_pages_by_limit_under_hierarchy 962052
        freed_file_pages_by_limit_under_hierarchy 1356440
        elapsed_ns_by_limit_under_hierarchy 351386416101
        scanned_pages_by_system_under_hierarchy 0
        scanned_anon_pages_by_system_under_hierarchy 0
        scanned_file_pages_by_system_under_hierarchy 0
        rotated_pages_by_system_under_hierarchy 0
        rotated_anon_pages_by_system_under_hierarchy 0
        rotated_file_pages_by_system_under_hierarchy 0
        freed_pages_by_system_under_hierarchy 0
        freed_anon_pages_by_system_under_hierarchy 0
        freed_file_pages_by_system_under_hierarchy 0
        elapsed_ns_by_system_under_hierarchy 0
      
      total_xxxx is for hierarchy management.
      
      This will be useful for further memcg developments and need to be
      developped before we do some complicated rework on LRU/softlimit
      management.
      
      This patch adds a new struct memcg_scanrecord into scan_control struct.
      sc->nr_scanned at el is not designed for exporting information.  For
      example, nr_scanned is reset frequentrly and incremented +2 at scanning
      mapped pages.
      
      To avoid complexity, I added a new param in scan_control which is for
      exporting scanning score.
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Ying Han <yinghan@google.com>
      Cc: Andrew Bresticker <abrestic@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      82f9d486
    • P
      Documentation: Exporting: update description of d_splice_alias · 5b9f4567
      Phillip Lougher 提交于
      Following commits a9049376 and 0c1aa9a9 update the d_splice_alias
      desciption.
      Signed-off-by: NPhillip Lougher <phillip@squashfs.org.uk>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      5b9f4567
  4. 26 7月, 2011 8 次提交
  5. 25 7月, 2011 3 次提交
    • W
      ext3.txt: update the links in the section "useful links" to the latest ones · 2b76aa07
      Wang Sheng-Hui 提交于
      In Documentation/filesystems/ext3.txt, the section "useful links"
      provides two links which link to ibm developerworks articles. While
      the second one can be redirected to the latest one, the first one
         http://www.ibm.com/developerworks/library/l-fs7.html
      fails to be redirected.
      
      Update the 2 links to the latest ones.
      Signed-off-by: NWang Sheng-Hui <shhuiw@gmail.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      2b76aa07
    • R
      DRM: clean up and document parsing of video= parameter · 04fee895
      Rolf Eike Beer 提交于
      The video= parameter of the DRM drivers supports some additional flags that
      the normal fb drivers do not have. They also allow to limit these flags to
      specific outputs. Both things were previously undocumented.
      
      Also the parsing of the line had some oddities:
      -A lot of misplaced options were silently ignored or partly rejected instead
       of stopping the parsing immediately
      -The 'R' option is documented to follow the 'M' option if specified. It is not
       documented that 'M' is needed to specify 'R' (also this is the case for normal
       fb drivers). In fact the code is correct for normal fb drivers but wrong for
       DRM ones.
       The old code allowed 'R' only _before_ 'M' (since it parses backwards) and only
       if 'M' is given at all which is not needed for the DRM drivers.
      -the margins option ('m') was parsed but later ignored even if the later
       functions support it.
      -specifying multiple enable options at the same time did not lead to an error.
      -specifying something bogus for horizontal resolution (i.e. other things as
       digits) did not lead to an error but an invalid resolution was used.
      
      If any errors are encountered the position of the faulting string is now
      printed to the user and the complete mode is ignored. This gives much
      more consistent error behaviour.
      
      I also removed some useless assignments and changed the local flag variables
      to be bool.
      Signed-off-by: NRolf Eike Beer <eike-kernel@sf-tec.de>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      04fee895
    • S
      Documentation: Update augmented rbtree documentation · 2f175074
      Sasha Levin 提交于
      Current documentation referred to the old method of handling augmented
      trees.  Update documentation to correspond with the changes done in
      commit b945d6b2 ("rbtree: Undo augmented trees performance damage
      and regression").
      
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: David Woodhouse <David.Woodhouse@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NSasha Levin <levinsasha928@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2f175074
  6. 24 7月, 2011 7 次提交
  7. 23 7月, 2011 1 次提交
  8. 22 7月, 2011 5 次提交
    • R
      lguest: update comments · 9f54288d
      Rusty Russell 提交于
      Also removes a long-unused #define and an extraneous semicolon.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      9f54288d
    • R
      lguest: Simplify device initialization. · 3c3ed482
      Rusty Russell 提交于
      We used to notify the Host every time we updated a device's status.  However,
      it only really needs to know when we're resetting the device, or failed to
      initialize it, or when we've finished our feature negotiation.
      
      In particular, we used to wait for VIRTIO_CONFIG_S_DRIVER_OK in the
      status byte before starting the device service threads.  But this
      corresponds to the successful finish of device initialization, which
      might (like virtio_blk's partition scanning) use the device.  So we
      had a hack, if they used the device before we expected we started the
      threads anyway.
      
      Now we hook into the finalize_features hook in the Guest: at that
      point we tell the Launcher that it can rely on the features we have
      acked.  On the Launcher side, we look at the status at that point, and
      start servicing the device.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      3c3ed482
    • S
      lguest: Do not exit on non-fatal errors · e0377e25
      Sakari Ailus 提交于
      Do not exit on some non-fatal errors:
      
      - writev() fails in net_output(). The result is a lost packet or packets.
      - writev() fails in console_output(). The result is partially lost console
      output.
      - readv() fails in net_input(). The result is a lost packet or packets.
      
      Rather than bringing the guest down, this patch ignores e.g. an allocation
      failure on the host side. Example:
      
      lguest: page allocation failure. order:4, mode:0x4d0
      Pid: 4045, comm: lguest Tainted: G        W   2.6.36 #1
      Call Trace:
       [<c138d614>] ? printk+0x18/0x1c
       [<c106a4e2>] __alloc_pages_nodemask+0x4d2/0x570
       [<c1087954>] cache_alloc_refill+0x2a4/0x4d0
       [<c1305149>] ? __netif_receive_skb+0x189/0x270
       [<c1087c5a>] __kmalloc+0xda/0xf0
       [<c12fffa5>] __alloc_skb+0x55/0x100
       [<c1305519>] ? net_rx_action+0x79/0x100
       [<c12fafed>] sock_alloc_send_pskb+0x18d/0x280
       [<c11fda25>] ? _copy_from_user+0x35/0x130
       [<c13010b6>] ? memcpy_fromiovecend+0x56/0x80
       [<c12a74dc>] tun_chr_aio_write+0x1cc/0x500
       [<c108a125>] do_sync_readv_writev+0x95/0xd0
       [<c11fda25>] ? _copy_from_user+0x35/0x130
       [<c1089fa8>] ? rw_copy_check_uvector+0x58/0x100
       [<c108a7bc>] do_readv_writev+0x9c/0x1d0
       [<c12a7310>] ? tun_chr_aio_write+0x0/0x500
       [<c108a93a>] vfs_writev+0x4a/0x60
       [<c108aa21>] sys_writev+0x41/0x80
       [<c138f061>] syscall_call+0x7/0xb
      Mem-Info:
      DMA per-cpu:
      CPU    0: hi:    0, btch:   1 usd:   0
      Normal per-cpu:
      CPU    0: hi:  186, btch:  31 usd:   0
      HighMem per-cpu:
      CPU    0: hi:  186, btch:  31 usd:   0
      active_anon:134651 inactive_anon:50543 isolated_anon:0
       active_file:96881 inactive_file:132007 isolated_file:0
       unevictable:0 dirty:3 writeback:0 unstable:0
       free:91374 slab_reclaimable:6300 slab_unreclaimable:2802
       mapped:2281 shmem:9 pagetables:330 bounce:0
      DMA free:3524kB min:64kB low:80kB high:96kB active_anon:0kB inactive_anon:8kB active_file:8760kB inactive_file:2760kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15868kB mlocked:0kB dirty:0kB writeback:0kB mapped:16kB shmem:0kB slab_reclaimable:88kB slab_unreclaimable:148kB kernel_stack:40kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
      lowmem_reserve[]: 0 865 2016 2016
      Normal free:150100kB min:3728kB low:4660kB high:5592kB active_anon:6224kB inactive_anon:15772kB active_file:324084kB inactive_file:325944kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:885944kB mlocked:0kB dirty:12kB writeback:0kB mapped:1520kB shmem:0kB slab_reclaimable:25112kB slab_unreclaimable:11060kB kernel_stack:1888kB pagetables:1320kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
      lowmem_reserve[]: 0 0 9207 9207
      HighMem free:211872kB min:512kB low:1752kB high:2992kB active_anon:532380kB inactive_anon:186392kB active_file:54680kB inactive_file:199324kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:1178504kB mlocked:0kB dirty:0kB writeback:0kB mapped:7588kB shmem:36kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
      lowmem_reserve[]: 0 0 0 0
      DMA: 3*4kB 65*8kB 35*16kB 18*32kB 11*64kB 9*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 3524kB
      Normal: 35981*4kB 344*8kB 158*16kB 28*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 150100kB
      HighMem: 5732*4kB 5462*8kB 2826*16kB 1598*32kB 84*64kB 10*128kB 7*256kB 1*512kB 1*1024kB 1*2048kB 9*4096kB = 211872kB
      231237 total pagecache pages
      2340 pages in swap cache
      Swap cache stats: add 160060, delete 157720, find 189017/194106
      Free swap  = 4179840kB
      Total swap = 4194300kB
      524271 pages RAM
      296946 pages HighMem
      5668 pages reserved
      867664 pages shared
      82155 pages non-shared
      Signed-off-by: NSakari Ailus <sakari.ailus@iki.fi>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      e0377e25
    • P
    • G
      stmmac: improve and up-to-date the documentation · 557e2a39
      Giuseppe CAVALLARO 提交于
      This patch adds new information for the driver
      especially about its platform structure fields.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      557e2a39
  9. 21 7月, 2011 6 次提交
    • P
      mmc: documentation of mmc non-blocking request usage and design. · 7937e878
      Per Forlin 提交于
      Documentation about the background and the design of mmc non-blocking.
      Host driver guidelines to minimize request preparation overhead.
      Signed-off-by: NPer Forlin <per.forlin@linaro.org>
      Acked-by: NRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      7937e878
    • P
      treewide: fix potentially dangerous trailing ';' in #defined values/expressions · 497888cf
      Phil Carmody 提交于
      All these are instances of
        #define NAME value;
      or
        #define NAME(params_opt) value;
      
      These of course fail to build when used in contexts like
        if(foo $OP NAME)
        while(bar $OP NAME)
      and may silently generate the wrong code in contexts such as
        foo = NAME + 1;    /* foo = value; + 1; */
        bar = NAME - 1;    /* bar = value; - 1; */
        baz = NAME & quux; /* baz = value; & quux; */
      
      Reported on comp.lang.c,
      Message-ID: <ab0d55fe-25e5-482b-811e-c475aa6065c3@c29g2000yqd.googlegroups.com>
      Initial analysis of the dangers provided by Keith Thompson in that thread.
      
      There are many more instances of more complicated macros having unnecessary
      trailing semicolons, but this pile seems to be all of the cases of simple
      values suffering from the problem. (Thus things that are likely to be found
      in one of the contexts above, more complicated ones aren't.)
      Signed-off-by: NPhil Carmody <ext-phil.2.carmody@nokia.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      497888cf
    • J
      fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers · 02c24a82
      Josef Bacik 提交于
      Btrfs needs to be able to control how filemap_write_and_wait_range() is called
      in fsync to make it less of a painful operation, so push down taking i_mutex and
      the calling of filemap_write_and_wait() down into the ->fsync() handlers.  Some
      file systems can drop taking the i_mutex altogether it seems, like ext3 and
      ocfs2.  For correctness sake I just pushed everything down in all cases to make
      sure that we keep the current behavior the same for everybody, and then each
      individual fs maintainer can make up their mind about what to do from there.
      Thanks,
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      02c24a82
    • J
      fs: add SEEK_HOLE and SEEK_DATA flags · 982d8165
      Josef Bacik 提交于
      This just gets us ready to support the SEEK_HOLE and SEEK_DATA flags.  Turns out
      using fiemap in things like cp cause more problems than it solves, so lets try
      and give userspace an interface that doesn't suck.  We need to match solaris
      here, and the definitions are
      
      *o* If /whence/ is SEEK_HOLE, the offset of the start of the
      next hole greater than or equal to the supplied offset
      is returned. The definition of a hole is provided near
      the end of the DESCRIPTION.
      
      *o* If /whence/ is SEEK_DATA, the file pointer is set to the
      start of the next non-hole file region greater than or
      equal to the supplied offset.
      
      So in the generic case the entire file is data and there is a virtual hole at
      the end.  That means we will just return i_size for SEEK_HOLE and will return
      the same offset for SEEK_DATA.  This is how Solaris does it so we have to do it
      the same way.
      
      Thanks,
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      982d8165
    • D
      vfs: increase shrinker batch size · 8ab47664
      Dave Chinner 提交于
      Now that the per-sb shrinker is responsible for shrinking 2 or more
      caches, increase the batch size to keep econmies of scale for
      shrinking each cache.  Increase the shrinker batch size to 1024
      objects.
      
      To allow for a large increase in batch size, add a conditional
      reschedule to prune_icache_sb() so that we don't hold the LRU spin
      lock for too long. This mirrors the behaviour of the
      __shrink_dcache_sb(), and allows us to increase the batch size
      without needing to worry about problems caused by long lock hold
      times.
      
      To ensure that filesystems using the per-sb shrinker callouts don't
      cause problems, document that the object freeing method must
      reschedule appropriately inside loops.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      8ab47664
    • D
      superblock: add filesystem shrinker operations · 0e1fdafd
      Dave Chinner 提交于
      Now we have a per-superblock shrinker implementation, we can add a
      filesystem specific callout to it to allow filesystem internal
      caches to be shrunk by the superblock shrinker.
      
      Rather than perpetuate the multipurpose shrinker callback API (i.e.
      nr_to_scan == 0 meaning "tell me how many objects freeable in the
      cache), two operations will be added. The first will return the
      number of objects that are freeable, the second is the actual
      shrinker call.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      0e1fdafd