1. 01 7月, 2015 1 次提交
  2. 26 6月, 2015 10 次提交
    • D
      libnvdimm: Non-Volatile Devices · bc30196f
      Dan Williams 提交于
      Maintainer information and documentation for drivers/nvdimm
      
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Boaz Harrosh <boaz@plexistor.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jens Axboe <axboe@fb.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Greg KH <gregkh@linuxfoundation.org>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      bc30196f
    • V
      nd_btt: atomic sector updates · 5212e11f
      Vishal Verma 提交于
      BTT stands for Block Translation Table, and is a way to provide power
      fail sector atomicity semantics for block devices that have the ability
      to perform byte granularity IO. It relies on the capability of libnvdimm
      namespace devices to do byte aligned IO.
      
      The BTT works as a stacked blocked device, and reserves a chunk of space
      from the backing device for its accounting metadata. It is a bio-based
      driver because all IO is done synchronously, and there is no queuing or
      asynchronous completions at either the device or the driver level.
      
      The BTT uses 'lanes' to index into various 'on-disk' data structures,
      and lanes also act as a synchronization mechanism in case there are more
      CPUs than available lanes. We did a comparison between two lane lock
      strategies - first where we kept an atomic counter around that tracked
      which was the last lane that was used, and 'our' lane was determined by
      atomically incrementing that. That way, for the nr_cpus > nr_lanes case,
      theoretically, no CPU would be blocked waiting for a lane. The other
      strategy was to use the cpu number we're scheduled on to and hash it to
      a lane number. Theoretically, this could block an IO that could've
      otherwise run using a different, free lane. But some fio workloads
      showed that the direct cpu -> lane hash performed faster than tracking
      'last lane' - my reasoning is the cache thrash caused by moving the
      atomic variable made that approach slower than simply waiting out the
      in-progress IO. This supports the conclusion that the driver can be a
      very simple bio-based one that does synchronous IOs instead of queuing.
      
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Boaz Harrosh <boaz@plexistor.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jens Axboe <axboe@fb.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Greg KH <gregkh@linuxfoundation.org>
      [jmoyer: fix nmi watchdog timeout in btt_map_init]
      [jmoyer: move btt initialization to module load path]
      [jmoyer: fix memory leak in the btt initialization path]
      [jmoyer: Don't overwrite corrupted arenas]
      Signed-off-by: NVishal Verma <vishal.l.verma@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      5212e11f
    • N
      coredump: use from_kuid/kgid when formatting corename · 5202efe5
      Nicolas Iooss 提交于
      When adding __printf attribute to cn_printf, gcc reports some issues:
      
        fs/coredump.c:213:5: warning: format '%d' expects argument of type
        'int', but argument 3 has type 'kuid_t' [-Wformat=]
             err = cn_printf(cn, "%d", cred->uid);
             ^
        fs/coredump.c:217:5: warning: format '%d' expects argument of type
        'int', but argument 3 has type 'kgid_t' [-Wformat=]
             err = cn_printf(cn, "%d", cred->gid);
             ^
      
      These warnings come from the fact that the value of uid/gid needs to be
      extracted from the kuid_t/kgid_t structure before being used as an
      integer.  More precisely, cred->uid and cred->gid need to be converted to
      either user-namespace uid/gid or to init_user_ns uid/gid.
      
      Use init_user_ns in order not to break existing ABI, and document this in
      Documentation/sysctl/kernel.txt.
      
      While at it, format uid and gid values with %u instead of %d because
      uid_t/__kernel_uid32_t and gid_t/__kernel_gid32_t are unsigned int.
      Signed-off-by: NNicolas Iooss <nicolas.iooss_linux@m4x.org>
      Acked-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5202efe5
    • T
      netconsole: implement extended console support · e2f15f9a
      Tejun Heo 提交于
      printk logbuf keeps various metadata and optional key=value dictionary for
      structured messages, both of which are stripped when messages are handed
      to regular console drivers.
      
      It can be useful to have this metadata and dictionary available to
      netconsole consumers.  This obviously makes logging via netconsole more
      complete and the sequence number in particular is useful in environments
      where messages may be lost or reordered in transit - e.g.  when netconsole
      is used to collect messages in a large cluster where packets may have to
      travel congested hops to reach the aggregator.  The lost and reordered
      messages can easily be identified and handled accordingly using the
      sequence numbers.
      
      printk recently added extended console support which can be selected by
      setting CON_EXTENDED flag.  From console driver side, not much changes.
      The only difference is that the text passed to the write callback is
      formatted the same way as /dev/kmsg.
      
      This patch implements extended console support for netconsole which can be
      enabled by either prepending "+" to a netconsole boot param entry or
      echoing 1 to "extended" file in configfs.  When enabled, netconsole
      transmits extended log messages with headers identical to /dev/kmsg
      output.
      
      There's one complication due to message fragments.  netconsole limits the
      maximum message size to 1k and messages longer than that are split into
      multiple fragments.  As all extended console messages should carry
      matching headers and be uniquely identifiable, each extended message
      fragment carries full copy of the metadata and an extra header field to
      identify the specific fragment.  The optional header is of the form
      "ncfrag=OFF/LEN" where OFF is the byte offset into the message body and
      LEN is the total length.
      
      To avoid unnecessarily making printk format extended messages, Extended
      netconsole is registered with printk when the first extended netconsole is
      configured.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Kay Sievers <kay@vrfy.org>
      Cc: Petr Mladek <pmladek@suse.cz>
      Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e2f15f9a
    • T
      printk: implement support for extended console drivers · 6fe29354
      Tejun Heo 提交于
      printk log_buf keeps various metadata for each message including its
      sequence number and timestamp.  The metadata is currently available only
      through /dev/kmsg and stripped out before passed onto console drivers.  We
      want this metadata to be available to console drivers too so that console
      consumers can get full information including the metadata and dictionary,
      which among other things can be used to detect whether messages got lost
      in transit.
      
      This patch implements support for extended console drivers.  Consoles can
      indicate that they want extended messages by setting the new CON_EXTENDED
      flag and they'll be fed messages formatted the same way as /dev/kmsg.
      
       "<level>,<sequnum>,<timestamp>,<contflag>;<message text>\n"
      
      If extended consoles exist, in-kernel fragment assembly is disabled.  This
      ensures that all messages emitted to consoles have full metadata including
      sequence number.  The contflag carries enough information to reassemble
      the fragments from the reader side trivially.  Note that this only affects
      /dev/kmsg.  Regular console and /proc/kmsg outputs are not affected by
      this change.
      
      * Extended message formatting for console drivers is enabled iff there
        are registered extended consoles.
      
      * Comment describing /dev/kmsg message format updated to add missing
        contflag field and help distinguishing variable from verbatim terms.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Kay Sievers <kay@vrfy.org>
      Reviewed-by: NPetr Mladek <pmladek@suse.cz>
      Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6fe29354
    • P
      Pratyush Anand has moved · e34cadde
      Pratyush Anand 提交于
      pratyush.anand@st.com email-id doesn't exist anymore as I have left the
      company.  Replace ST's id with pratyush.anand@gmail.com.
      Signed-off-by: NPratyush Anand <pratyush.anand@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e34cadde
    • D
      zswap: runtime enable/disable · c00ed16a
      Dan Streetman 提交于
      Change the "enabled" parameter to be configurable at runtime.  Remove the
      enabled check from init(), and move it to the frontswap store() function;
      when enabled, pages will be stored, and when disabled, pages won't be
      stored.
      
      This is almost identical to Seth's patch from 2 years ago:
      http://lkml.iu.edu/hypermail/linux/kernel/1307.2/04289.html
      
      [akpm@linux-foundation.org: tweak documentation]
      Signed-off-by: NDan Streetman <ddstreet@ieee.org>
      Suggested-by: NSeth Jennings <sjennings@variantweb.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c00ed16a
    • S
      zram: add dynamic device add/remove functionality · 6566d1a3
      Sergey Senozhatsky 提交于
      We currently don't support on-demand device creation.  The one and only
      way to have N zram devices is to specify num_devices module parameter
      (default value: 1).  IOW if, for some reason, at some point, user wants
      to have N + 1 devies he/she must umount all the existing devices, unload
      the module, load the module passing num_devices equals to N + 1.  And do
      this again, if needed.
      
      This patch introduces zram control sysfs class, which has two sysfs
      attrs:
      - hot_add      -- add a new zram device
      - hot_remove   -- remove a specific (device_id) zram device
      
      hot_add sysfs attr is read-only and has only automatic device id
      assignment mode (as requested by Minchan Kim).  read operation performed
      on this attr creates a new zram device and returns back its device_id or
      error status.
      
      Usage example:
      	# add a new specific zram device
      	cat /sys/class/zram-control/hot_add
      	2
      
      	# remove a specific zram device
      	echo 4 > /sys/class/zram-control/hot_remove
      
      Returning zram_add() error code back to user (-ENOMEM in this case)
      
      	cat /sys/class/zram-control/hot_add
      	cat: /sys/class/zram-control/hot_add: Cannot allocate memory
      
      NOTE, there might be users who already depend on the fact that at least
      zram0 device gets always created by zram_init(). Preserve this behavior.
      
      [minchan@kernel.org: use zram->claim to avoid lockdep splat]
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6566d1a3
    • S
      zram: remove max_num_devices limitation · c3cdb40e
      Sergey Senozhatsky 提交于
      Limiting the number of zram devices to 32 (default max_num_devices value)
      is confusing, let's drop it.  A user with 2TB or 4TB of RAM, for example,
      can request as many devices as he can handle.
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Acked-by: NMinchan Kim <minchan@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c3cdb40e
    • S
      zram: add `compact` sysfs entry to documentation · 3d8ed88b
      Sergey Senozhatsky 提交于
      We currently don't support zram on-demand device creation.  The only way
      to have N zram devices is to specify num_devices module parameter (default
      value 1).  That means that if, for some reason, at some point, user wants
      to have N + 1 devies he/she must umount all the existing devices, unload
      the module, load the module passing num_devices equals to N + 1.
      
      This patchset introduces zram-control sysfs class, which has two sysfs
      attrs:
      
       - hot_add     -- add a new zram device
       - hot_remove  -- remove a specific (device_id) zram device
      
          Usage example:
              # add a new specific zram device
              cat /sys/class/zram-control/hot_add
              1
      
              # remove a specific zram device
              echo 4 > /sys/class/zram-control/hot_remove
      
      This patch (of 10):
      
      Briefly describe missing `compact` sysfs entry.
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Acked-by: NMinchan Kim <minchan@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3d8ed88b
  3. 25 6月, 2015 9 次提交
  4. 23 6月, 2015 19 次提交
  5. 22 6月, 2015 1 次提交