[PATCH v5 0/5] dax: handling media errors (clear-on-zero only)
by Vishal Verma
Until now, dax has been disabled if media errors were found on
any device. This series attempts to address that.
The first two patches from Dan re-enable dax even when media
errors are present.
The third patch from Matthew removes the zeroout path from dax
entirely, making zeroout operations always go through the driver
(The motivation is that if a backing device has media errors,
and we create a sparse file on it, we don't want the initial
zeroing to happen via dax, we want to give the block driver a
chance to clear the errors).
Patch 4 reduces our calls to clear_pmem from dax in the
truncate/hole-punch cases. We check if the range being truncated
is sector aligned/sized, and if so, send blkdev_issue_zeroout
instead of clear_pmem so that errors can be handled better by
the driver.
Patch 5 fixes a redundant comment in DAX and is mostly unrelated
to the rest of this series.
This series also depends on/is based on Jan Kara's DAX Locking
fixes series [1].
[1]: http://www.spinics.net/lists/linux-mm/msg105819.html
v5:
- Drop the patch that attempts to clear-errors-on-write till we
reach consensus on how to handle that.
- Don't pass blk_dax_ctl to direct_access, instead pass in all the
required arguments individually (Christoph, Dan)
v4:
- Remove the dax->direct_IO fallbacks entirely. Instead, go through
the usual direct_IO path when we're in O_DIRECT, and use dax_IO
for other, non O_DIRECT IO. (Dan, Christoph)
v3:
- Wrapper-ize the direct_IO fallback again and make an exception
for -EIOCBQUEUED (Jeff, Dan)
- Reduce clear_pmem usage in DAX to the minimum
Dan Williams (2):
dax: fallback from pmd to pte on error
dax: enable dax in the presence of known media errors (badblocks)
Matthew Wilcox (1):
dax: use sb_issue_zerout instead of calling dax_clear_sectors
Vishal Verma (2):
dax: for truncate/hole-punch, do zeroing through the driver if
possible
dax: fix a comment in dax_zero_page_range and dax_truncate_page
Documentation/filesystems/dax.txt | 32 ++++++++++++++++
arch/powerpc/sysdev/axonram.c | 2 +-
block/ioctl.c | 9 -----
drivers/block/brd.c | 2 +-
drivers/nvdimm/pmem.c | 10 ++++-
drivers/s390/block/dcssblk.c | 2 +-
fs/block_dev.c | 2 +-
fs/dax.c | 78 ++++++++++++++-------------------------
fs/ext2/inode.c | 7 ++--
fs/xfs/xfs_bmap_util.c | 15 ++------
include/linux/blkdev.h | 2 +-
include/linux/dax.h | 1 -
12 files changed, 80 insertions(+), 82 deletions(-)
--
2.5.5
4 years, 8 months
[PATCH v3 0/5] Add alignment check for DAX mount
by Toshi Kani
When a partition is not aligned by 4KB, mount -o dax succeeds,
but any read/write access to the filesystem fails, except for
metadata update. Add alignment check to ext4, ext2, and xfs.
- Patch 1-2 add bdev_supports_dax() which performs all the checks
necessary for dax mount.
- Patch 3-5 change fillesystems to call bdev_supports_dax().
v3:
- Remove boilerplate code from filesytems (Christoph Hellwig)
- Add a helper function to perform all checks (Dave Chinner)
v2:
- Use a helper function via ->direct_access for the check.
(Christoph Hellwig)
- Call bdev_direct_access() with sector 0 for the check.
(Boaz Harrosh)
---
Toshi Kani (5):
1/5 block: Add vfs_msg() interface
2/5 block: Add bdev_supports_dax() for dax mount checks
3/5 ext4: Add alignment check for DAX mount
4/5 ext2: Add alignment check for DAX mount
5/5 xfs: Add alignment check for DAX mount
---
fs/block_dev.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
fs/ext2/super.c | 11 ++--------
fs/ext4/super.c | 11 ++--------
fs/xfs/xfs_super.c | 12 +++++------
include/linux/blkdev.h | 12 +++++++++++
5 files changed, 75 insertions(+), 25 deletions(-)
4 years, 8 months
[PATCH 0/7] "Device DAX" for persistent memory
by Dan Williams
Device DAX is the device-centric analogue of Filesystem DAX
(CONFIG_FS_DAX). It allows memory ranges to be allocated and mapped
without need of an intervening file system or being bound to block
device semantics. Device DAX is strict and predictable. Specifically
this interface:
1/ Guarantees fault granularity with respect to a given page size (pte,
pmd, or pud) set at configuration time.
2/ Enforces deterministic behavior by being strict about what fault
scenarios are supported.
This first implementation, for persistent memory, is targeted at
applications like hypervisors and some databases that only need an
allocate + map mechanism from the kernel. Later this mechanism can be
used to enable direct access to other performance/feature differentiated
memory ranges.
This series is built on "[PATCH 00/13] prep for device-dax, untangle
pfn-device setup" [1], posted at the end of March.
A libnvdimm pmem namespace can be switched from its default /dev/pmemX
(block device) interface to /dev/daxX.Y with the ndctl utility:
ndctl create-namespace -m dax -e namespace0.0 -f
This implementation passes a basic setup, map, fault, and shutdown
sequence.
[1]: https://lists.01.org/pipermail/linux-nvdimm/2016-March/005086.html
---
Dan Williams (7):
libnvdimm: cleanup nvdimm_namespace_common_probe(), kill 'host'
libnvdimm, dax: introduce device-dax infrastructure
libnvdimm, dax: reserve space to store labels for device-dax
libnvdimm, dax: record the specified alignment of a dax-device instance
/dev/dax, pmem: direct access to persistent memory
/dev/dax, core: file operations and dax-mmap
Revert "block: enable dax for raw block devices"
block/ioctl.c | 32 --
drivers/Kconfig | 2
drivers/Makefile | 1
drivers/dax/Kconfig | 25 ++
drivers/dax/Makefile | 4
drivers/dax/dax.c | 543 +++++++++++++++++++++++++++++++++++
drivers/dax/dax.h | 24 ++
drivers/dax/pmem.c | 168 +++++++++++
drivers/nvdimm/Kconfig | 13 +
drivers/nvdimm/Makefile | 1
drivers/nvdimm/bus.c | 4
drivers/nvdimm/claim.c | 2
drivers/nvdimm/dax_devs.c | 99 ++++++
drivers/nvdimm/namespace_devs.c | 38 ++
drivers/nvdimm/nd-core.h | 1
drivers/nvdimm/nd.h | 25 ++
drivers/nvdimm/pfn.h | 4
drivers/nvdimm/pfn_devs.c | 116 +++++--
drivers/nvdimm/region.c | 2
drivers/nvdimm/region_devs.c | 29 ++
fs/block_dev.c | 96 ++----
include/linux/fs.h | 8 -
include/uapi/linux/fs.h | 1
include/uapi/linux/ndctl.h | 2
mm/huge_memory.c | 1
mm/hugetlb.c | 1
tools/testing/nvdimm/Kbuild | 10 +
tools/testing/nvdimm/config_check.c | 2
28 files changed, 1094 insertions(+), 160 deletions(-)
create mode 100644 drivers/dax/Kconfig
create mode 100644 drivers/dax/Makefile
create mode 100644 drivers/dax/dax.c
create mode 100644 drivers/dax/dax.h
create mode 100644 drivers/dax/pmem.c
create mode 100644 drivers/nvdimm/dax_devs.c
4 years, 8 months
[ndctl PATCH] ndctl: switch to ndctl-VERSION tag format
by Dan Williams
As Jeff notes, tarballs with names like v52.tar.gz are awful because
they are not very descriptive. Switch to a 'package-version' format,
i.e. ndctl-52.tar.gz.
Reported-by: Jeff Moyer <jmoyer(a)redhat.com>
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
git-version | 25 +++++++++++++++----------
make-git-snapshot.sh | 4 ++--
ndctl.spec.in | 4 ++--
3 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/git-version b/git-version
index 629f6d4a213d..ea6e26880aea 100755
--- a/git-version
+++ b/git-version
@@ -1,15 +1,25 @@
#!/bin/bash
+to_ver() {
+ VN=$1
+ #drop leading 'ndctl-' out of the version so its a pure number
+ if [ ${VN:0:6} = "ndctl-" ]; then
+ VN=${VN:6}
+ fi
+ echo $VN
+}
+
dirty() {
+ VN=$(to_ver $1)
git update-index -q --refresh
if test -z "$(git diff-index --name-only HEAD --)"; then
- echo "$1"
+ echo "$VN"
else
- echo "${1}.dirty"
+ echo "${VN}.dirty"
fi
}
-DEF_VER=v52
+DEF_VER=52
LF='
'
@@ -19,10 +29,10 @@ LF='
if test -f version; then
VN=$(cat version) || VN="$DEF_VER"
elif test -d ${GIT_DIR:-.git} -o -f .git &&
- VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
+ VN=$(git describe --match "ndctl-[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
case "$VN" in
*$LF*) (exit 1) ;;
- v[0-9]*)
+ ndctl-[0-9]*)
VN="$(dirty $VN)"
esac; then
VN=$(echo "$VN" | sed -e 's/-/./g');
@@ -33,9 +43,4 @@ EOF
VN="$(dirty ${DEF_VER}.git$COMMIT)"
fi
-#drop leading 'v' out of the version so its a pure number
-if [ ${VN:0:1} = v ]; then
- VN=${VN:1}
-fi
-
echo $VN
diff --git a/make-git-snapshot.sh b/make-git-snapshot.sh
index 2825ac4321cd..142419d623fe 100755
--- a/make-git-snapshot.sh
+++ b/make-git-snapshot.sh
@@ -16,6 +16,6 @@ git clone $REFERENCE "$UPSTREAM" "$WORKDIR"
VERSION=$(./git-version)
DIRNAME="ndctl-${VERSION}"
-git archive --remote="$WORKDIR" --format=tar --prefix="$DIRNAME/" HEAD | gzip > $OUTDIR/"v${VERSION}.tar.gz"
+git archive --remote="$WORKDIR" --format=tar --prefix="$DIRNAME/" HEAD | gzip > $OUTDIR/"ndctl-${VERSION}.tar.gz"
-echo "Written $OUTDIR/v${VERSION}.tar.gz"
+echo "Written $OUTDIR/ndctl-${VERSION}.tar.gz"
diff --git a/ndctl.spec.in b/ndctl.spec.in
index 0bdd2463698c..b8129e533e13 100644
--- a/ndctl.spec.in
+++ b/ndctl.spec.in
@@ -5,7 +5,7 @@ Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
License: GPLv2
Group: System Environment/Base
Url: https://github.com/pmem/ndctl
-Source0: https://github.com/pmem/ndctl/archive/v%{version}.tar.gz
+Source0: https://github.com/pmem/ndctl/archive/ndctl-%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: asciidoc
@@ -45,7 +45,7 @@ Group: System Environment/Libraries
Libraries for %{name}.
%prep
-%setup -q v%{version}
+%setup -q ndctl-%{version}
%build
echo "VERSION" > version
4 years, 8 months
如何掌握提升团队配合度、凝聚力、执行力和领导力的技巧
by 山管伟
0g77on5emdesvcbjofflm8efnealansws84y9kuey8lcvrkufimvwr
中高层管理者的职业化修炼
课程背景
团队管理的本质就是打造一支“招之即来,来之能战,战之能胜的团队”。 “招之即来”是下属忠诚度与上司领导力层面的问题,而“战之能胜”则是能力层面的问题。本课程也是针对如何修炼自我、如何打造团队与如何提高领导力而设置的。
通过《职业心态》的讲述引导学员如何树立正确的职业观念,如何提升主动性、积极性、责任感以及为什么要爱上自己的工作?
通过《企业经营哲学》的讲述,引导学员站在经营者的角度去看待企业管理,站在企业的高度去明确自己的角色和定位。
通过《自我修炼》、《管理修炼》、《领导力提升》、《标准化实施技巧》和《绩效管理与提升技巧》等章节的讲述指引学员如何修炼成为一个德才兼备的职场高手。
本课程的讲师一直在思考解决的一个问题就是如何解决学员“上课听听很激动,课后想想很感动,但随后还是一动不动”的问题,这也是将《思维碰撞》放在第一章节的原因。本章节将引导学员改变观念,保持空杯的心态,并自愿、自发、积极的学习与工作,这个章节的目的是为后面章节的学习效果做铺垫,也是整个课程成功以及课后培训效果转化成功的关键一环。
本课程视角独特,逻辑清晰,案例经典,工具实用,将指引学员进入一个全新的思维世界。
课程简介
培训对象:中高层管理人员、技术、生产、质量管理工程师
授课形式:讲师讲授 + 视频演绎 + 案例研讨 +角色扮演 + 讲师点评 + 落地工具。
课程时间:2天 ( 2016年05月13-14日上海、08月28-29日上海 )
课程费用:3800元/人/2天
咨询方式:0512-68700652 (0)18015596353
课程收益&特点
课程收益1.打开学员心门,引发学员自我反省和深入思考
2.触发学员思维方式的转变
3.激发学员工作和学习的激情、责任感和主动性
4.掌握提升团队配合度、凝聚力、执行力和领导力的技巧
5.掌握标准化和绩效管理提升的设计及实施的技巧
课程特点1.课堂所讲授的工具,大部分来自于世界500强公司使用最广泛、最高效的方法
2.把本期学员最关注问题,作为课堂的实例练习,能够使学员更好的“学以致用”
课程大纲
第一部分:思维碰撞之意识改变
A: 管理者的挑战
B: 成功和失败的哲学
C:学以致用
D:职业意识转变
第二部分:自我修炼
A:三项修炼
B:改变命运唯一的机会——学习
C:职业化修炼
D:人生反思
第三部分:企业的经营哲学
A:做事的哲学
B:企业永恒的目标
C:企业管理六要素
第四部分:管理修炼
A:做事最重要的前提
B:管理修炼
第五部分:职业心态
A:职业观念
B:职场成功的秘诀
C:改变从心开始
第六部分:标准化实施技巧
A:标准化的解析
B:管理之路
C:标准化实施的技巧
D:标准化的软件工具
E:流程优化技巧
第七部分:绩效管理与提升技巧
A:管理的核心
B:绩效考核
C:绩效系统构建绩效
第八部分:领导力提升
A:团队解析
B:沟通技巧
C:领导力提升
D:主动性提升
4 years, 8 months
[ndctl PATCH 0/2] ndctl: dax device support
by Dan Williams
Enable the "dax" mode of a pfn device to allow persistent memory to be
accessed through /dev/daxX.Y rather than /dev/pmemX.
---
Dan Williams (2):
ndctl: add library support for 'dax' devices
ndctl: utility support for dax devices
Documentation/ndctl-create-namespace.txt | 12 +
builtin-xaction-namespace.c | 33 ++-
configure.ac | 26 ++
lib/libndctl.c | 367 ++++++++++++++++++++++++++++--
lib/libndctl.sym | 25 ++
lib/ndctl/libndctl.h.in | 38 +++
util/json.c | 17 +
7 files changed, 494 insertions(+), 24 deletions(-)
4 years, 8 months
[PATCH v4 0/7] dax: handling media errors
by Vishal Verma
Until now, dax has been disabled if media errors were found on
any device. This series attempts to address that.
The first three patches from Dan re-enable dax even when media
errors are present.
The fourth patch from Matthew removes the zeroout path from dax
entirely, making zeroout operations always go through the driver
(The motivation is that if a backing device has media errors,
and we create a sparse file on it, we don't want the initial
zeroing to happen via dax, we want to give the block driver a
chance to clear the errors).
The fifth patch changes how DAX IO is re-routed as direct IO.
We add a new iocb flag for DAX to distinguish it from actual
direct IO, and if we're in O_DIRECT, use the regular direct_IO
path instead of DAX. This gives us an opportunity to do recovery
by doing O_DIRECT writes that will go through the driver to clear
errors from bad sectors.
Patch 6 reduces our calls to clear_pmem from dax in the
truncate/hole-punch cases. We check if the range being truncated
is sector aligned/sized, and if so, send blkdev_issue_zeroout
instead of clear_pmem so that errors can be handled better by
the driver.
Patch 7 fixes a redundant comment in DAX and is mostly unrelated
to the rest of this series.
This series also depends on/is based on Jan Kara's DAX Locking
fixes series [1].
[1]: http://www.spinics.net/lists/linux-mm/msg105819.html
v4:
- Remove the dax->direct_IO fallbacks entirely. Instead, go through
the usual direct_IO path when we're in O_DIRECT, and use dax_IO
for other, non O_DIRECT IO. (Dan, Christoph)
v3:
- Wrapper-ize the direct_IO fallback again and make an exception
for -EIOCBQUEUED (Jeff, Dan)
- Reduce clear_pmem usage in DAX to the minimum
Dan Williams (3):
block, dax: pass blk_dax_ctl through to drivers
dax: fallback from pmd to pte on error
dax: enable dax in the presence of known media errors (badblocks)
Matthew Wilcox (1):
dax: use sb_issue_zerout instead of calling dax_clear_sectors
Vishal Verma (3):
fs: prioritize and separate direct_io from dax_io
dax: for truncate/hole-punch, do zeroing through the driver if
possible
dax: fix a comment in dax_zero_page_range and dax_truncate_page
arch/powerpc/sysdev/axonram.c | 10 +++---
block/ioctl.c | 9 -----
drivers/block/brd.c | 9 ++---
drivers/block/loop.c | 2 +-
drivers/nvdimm/pmem.c | 17 +++++++---
drivers/s390/block/dcssblk.c | 12 +++----
fs/block_dev.c | 19 ++++++++---
fs/dax.c | 78 +++++++++++++++----------------------------
fs/ext2/inode.c | 23 ++++++++-----
fs/ext4/file.c | 2 +-
fs/ext4/inode.c | 19 +++++++----
fs/xfs/xfs_aops.c | 20 +++++++----
fs/xfs/xfs_bmap_util.c | 15 +++------
fs/xfs/xfs_file.c | 4 +--
include/linux/blkdev.h | 3 +-
include/linux/dax.h | 1 -
include/linux/fs.h | 15 +++++++--
mm/filemap.c | 4 +--
18 files changed, 134 insertions(+), 128 deletions(-)
--
2.5.5
4 years, 8 months