Skip to content
Snippets Groups Projects
  1. Jul 27, 2011
  2. Jul 26, 2011
    • Hugh Dickins's avatar
      panic: panic=-1 for immediate reboot · 4302fbc8
      Hugh Dickins authored
      
      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: default avatarHugh Dickins <hughd@chromium.org>
      Signed-off-by: default avatarMandeep 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4302fbc8
    • Michal Miroslaw's avatar
      Documentation/DMA-API-HOWTO.txt: fix misleading example · 3f0fb4e8
      Michal Miroslaw authored
      
      See: DMA-API.txt, part Id, DMA_FROM_DEVICE description.
      
      Signed-off-by: default avatarMichal Miroslaw <mirq-linux@rere.qmqm.pl>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3f0fb4e8
    • WANG Cong's avatar
      include/linux/dma-mapping.h: remove DMA_xxBIT_MASK macros · 91f6cdf8
      WANG Cong authored
      
      git grep shows there are no users in tree, so we can remove them safely.
      
      Signed-off-by: default avatarWANG Cong <xiyou.wangcong@gmail.com>
      Acked-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Acked-by: default avatarJiri Slaby <jslaby@suse.cz>
      Acked-by: default avatarVinod Koul <vinod.koul@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      91f6cdf8
    • Vasiliy Kulikov's avatar
      ipc: introduce shm_rmid_forced sysctl · b34a6b1d
      Vasiliy Kulikov authored
      
      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: default avatarVasiliy 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b34a6b1d
    • KAMEZAWA Hiroyuki's avatar
      memcg: add memory.vmscan_stat · 82f9d486
      KAMEZAWA Hiroyuki authored
      
      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: default avatarKAMEZAWA 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      82f9d486
    • Phillip Lougher's avatar
      Documentation: Exporting: update description of d_splice_alias · 5b9f4567
      Phillip Lougher authored
      
      Following commits a9049376 and 0c1aa9a9 update the d_splice_alias
      desciption.
      
      Signed-off-by: default avatarPhillip Lougher <phillip@squashfs.org.uk>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      5b9f4567
  3. Jul 25, 2011
  4. Jul 24, 2011
  5. Jul 23, 2011
  6. Jul 22, 2011
  7. Jul 21, 2011
    • Rusty Russell's avatar
      lguest: update comments · 9f54288d
      Rusty Russell authored
      
      Also removes a long-unused #define and an extraneous semicolon.
      
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      9f54288d
    • Rusty Russell's avatar
      lguest: Simplify device initialization. · 3c3ed482
      Rusty Russell authored
      
      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: default avatarRusty Russell <rusty@rustcorp.com.au>
      3c3ed482
    • Sakari Ailus's avatar
      lguest: Do not exit on non-fatal errors · e0377e25
      Sakari Ailus authored
      
      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: default avatarSakari Ailus <sakari.ailus@iki.fi>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      e0377e25
    • Phillip Lougher's avatar
    • Giuseppe CAVALLARO's avatar
      stmmac: improve and up-to-date the documentation · 557e2a39
      Giuseppe CAVALLARO authored
      
      This patch adds new information for the driver
      especially about its platform structure fields.
      
      Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      557e2a39
    • Per Forlin's avatar
      mmc: documentation of mmc non-blocking request usage and design. · 7937e878
      Per Forlin authored
      
      Documentation about the background and the design of mmc non-blocking.
      Host driver guidelines to minimize request preparation overhead.
      
      Signed-off-by: default avatarPer Forlin <per.forlin@linaro.org>
      Acked-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: default avatarChris Ball <cjb@laptop.org>
      7937e878
    • Phil Carmody's avatar
      treewide: fix potentially dangerous trailing ';' in #defined values/expressions · 497888cf
      Phil Carmody authored
      
      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: default avatarPhil Carmody <ext-phil.2.carmody@nokia.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      497888cf
  8. Jul 20, 2011
    • Josef Bacik's avatar
      fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers · 02c24a82
      Josef Bacik authored
      
      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: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      02c24a82
    • Josef Bacik's avatar
      fs: add SEEK_HOLE and SEEK_DATA flags · 982d8165
      Josef Bacik authored
      
      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: default avatarJosef Bacik <josef@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      982d8165
    • Dave Chinner's avatar
      vfs: increase shrinker batch size · 8ab47664
      Dave Chinner authored
      
      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: default avatarDave Chinner <dchinner@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      8ab47664
    • Dave Chinner's avatar
      superblock: add filesystem shrinker operations · 0e1fdafd
      Dave Chinner authored
      
      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: default avatarDave Chinner <dchinner@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      0e1fdafd
    • J. Bruce Fields's avatar
      locks: rename lock-manager ops · 8fb47a4f
      J. Bruce Fields authored
      
      Both the filesystem and the lock manager can associate operations with a
      lock.  Confusingly, one of them (fl_release_private) actually has the
      same name in both operation structures.
      
      It would save some confusion to give the lock-manager ops different
      names.
      
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      8fb47a4f
  9. Jul 19, 2011
Loading