linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
@ 2013-07-25 17:50 Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 01/33] iov_iter: move into its own file Dave Kleikamp
                   ` (37 more replies)
  0 siblings, 38 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

This patch series adds a kernel interface to fs/aio.c so that kernel code can
issue concurrent asynchronous IO to file systems.  It adds an aio command and
file system methods which specify io memory with pages instead of userspace
addresses.

This series was written to reduce the current overhead loop imposes by
performing synchronus buffered file system IO from a kernel thread.  These
patches turn loop into a light weight layer that translates bios into iocbs.

It introduces new file ops, read_iter() and write_iter(), that replace the
aio_read() and aio_write() operations. The iov_iter structure can now contain
either a user-space iovec or a kernel-space bio_vec. Since it would be
overly complicated to replace every instance of aio_read() and aio_write(),
the old operations are not removed, but file systems implementing the new
ones need not keep the old ones.

Verion 8 is little changed from Version 7 that I send out in March, just
updated to the latest kernel. These patches apply to 3.11-rc2 and can
also be found at:

git://github.com/kleikamp/linux-shaggy.git aio_loop

Asias He (1):
  block_dev: add support for read_iter, write_iter

Dave Kleikamp (22):
  iov_iter: iov_iter_copy_from_user() should use non-atomic copy
  iov_iter: add __iovec_copy_to_user()
  fuse: convert fuse to use iov_iter_copy_[to|from]_user
  iov_iter: ii_iovec_copy_to_user should pre-fault user pages
  dio: Convert direct_IO to use iov_iter
  dio: add bio_vec support to __blockdev_direct_IO()
  aio: add aio_kernel_() interface
  aio: add aio support for iov_iter arguments
  fs: create file_readable() and file_writable() functions
  fs: use read_iter and write_iter rather than aio_read and aio_write
  fs: add read_iter and write_iter to several file systems
  ocfs2: add support for read_iter and  write_iter
  ext4: add support for read_iter and write_iter
  nfs: add support for read_iter, write_iter
  nfs: simplify swap
  btrfs: add support for read_iter and write_iter
  xfs: add support for read_iter and write_iter
  gfs2: Convert aio_read/write ops to read/write_iter
  udf: convert file ops from aio_read/write to read/write_iter
  afs: add support for read_iter and write_iter
  ecrpytfs: Convert aio_read/write ops to read/write_iter
  ubifs: convert file ops from aio_read/write to read/write_iter

Hugh Dickins (1):
  tmpfs: add support for read_iter and write_iter

Zach Brown (9):
  iov_iter: move into its own file
  iov_iter: add copy_to_user support
  iov_iter: hide iovec details behind ops function pointers
  iov_iter: add bvec support
  iov_iter: add a shorten call
  iov_iter: let callers extract iovecs and bio_vecs
  fs: pull iov_iter use higher up the stack
  bio: add bvec_length(), like iov_length()
  loop: use aio to perform io on the underlying file

 Documentation/filesystems/Locking   |   6 +-
 Documentation/filesystems/vfs.txt   |  12 +-
 drivers/block/loop.c                | 148 ++++++++----
 drivers/char/raw.c                  |   4 +-
 drivers/mtd/nand/nandsim.c          |   4 +-
 drivers/usb/gadget/storage_common.c |   4 +-
 fs/9p/vfs_addr.c                    |  12 +-
 fs/9p/vfs_file.c                    |   8 +-
 fs/Makefile                         |   2 +-
 fs/adfs/file.c                      |   4 +-
 fs/affs/file.c                      |   4 +-
 fs/afs/file.c                       |   4 +-
 fs/afs/internal.h                   |   3 +-
 fs/afs/write.c                      |   9 +-
 fs/aio.c                            | 152 ++++++++++++-
 fs/bad_inode.c                      |  14 ++
 fs/bfs/file.c                       |   4 +-
 fs/block_dev.c                      |  27 ++-
 fs/btrfs/file.c                     |  42 ++--
 fs/btrfs/inode.c                    |  63 +++---
 fs/ceph/addr.c                      |   3 +-
 fs/cifs/file.c                      |   4 +-
 fs/direct-io.c                      | 223 +++++++++++++------
 fs/ecryptfs/file.c                  |  15 +-
 fs/exofs/file.c                     |   4 +-
 fs/ext2/file.c                      |   4 +-
 fs/ext2/inode.c                     |   8 +-
 fs/ext3/file.c                      |   4 +-
 fs/ext3/inode.c                     |  15 +-
 fs/ext4/ext4.h                      |   3 +-
 fs/ext4/file.c                      |  34 +--
 fs/ext4/indirect.c                  |  16 +-
 fs/ext4/inode.c                     |  23 +-
 fs/f2fs/data.c                      |   4 +-
 fs/f2fs/file.c                      |   4 +-
 fs/fat/file.c                       |   4 +-
 fs/fat/inode.c                      |  10 +-
 fs/fuse/cuse.c                      |  10 +-
 fs/fuse/file.c                      |  90 ++++----
 fs/fuse/fuse_i.h                    |   5 +-
 fs/gfs2/aops.c                      |   7 +-
 fs/gfs2/file.c                      |  21 +-
 fs/hfs/inode.c                      |  11 +-
 fs/hfsplus/inode.c                  |  10 +-
 fs/hostfs/hostfs_kern.c             |   4 +-
 fs/hpfs/file.c                      |   4 +-
 fs/internal.h                       |   4 +
 fs/iov-iter.c                       | 411 ++++++++++++++++++++++++++++++++++
 fs/jffs2/file.c                     |   8 +-
 fs/jfs/file.c                       |   4 +-
 fs/jfs/inode.c                      |   7 +-
 fs/logfs/file.c                     |   4 +-
 fs/minix/file.c                     |   4 +-
 fs/nfs/direct.c                     | 302 ++++++++++++++++---------
 fs/nfs/file.c                       |  33 ++-
 fs/nfs/internal.h                   |   4 +-
 fs/nfs/nfs4file.c                   |   4 +-
 fs/nilfs2/file.c                    |   4 +-
 fs/nilfs2/inode.c                   |   8 +-
 fs/ocfs2/aops.c                     |   8 +-
 fs/ocfs2/aops.h                     |   2 +-
 fs/ocfs2/file.c                     |  55 ++---
 fs/ocfs2/ocfs2_trace.h              |   6 +-
 fs/omfs/file.c                      |   4 +-
 fs/ramfs/file-mmu.c                 |   4 +-
 fs/ramfs/file-nommu.c               |   4 +-
 fs/read_write.c                     |  78 +++++--
 fs/reiserfs/file.c                  |   4 +-
 fs/reiserfs/inode.c                 |   7 +-
 fs/romfs/mmap-nommu.c               |   2 +-
 fs/sysv/file.c                      |   4 +-
 fs/ubifs/file.c                     |  12 +-
 fs/udf/file.c                       |  13 +-
 fs/udf/inode.c                      |  10 +-
 fs/ufs/file.c                       |   4 +-
 fs/xfs/xfs_aops.c                   |  13 +-
 fs/xfs/xfs_file.c                   |  51 ++---
 include/linux/aio.h                 |  20 +-
 include/linux/bio.h                 |   8 +
 include/linux/blk_types.h           |   2 -
 include/linux/fs.h                  | 165 ++++++++++++--
 include/linux/nfs_fs.h              |  13 +-
 include/uapi/linux/aio_abi.h        |   2 +
 include/uapi/linux/loop.h           |   1 +
 mm/filemap.c                        | 433 ++++++++++++++----------------------
 mm/page_io.c                        |  15 +-
 mm/shmem.c                          |  61 ++---
 87 files changed, 1862 insertions(+), 1002 deletions(-)
 create mode 100644 fs/iov-iter.c

-- 
1.8.3.4


^ permalink raw reply	[flat|nested] 72+ messages in thread

* [PATCH V8 01/33] iov_iter: move into its own file
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 02/33] iov_iter: iov_iter_copy_from_user() should use non-atomic copy Dave Kleikamp
                   ` (36 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

From: Zach Brown <zab@zabbo.net>

This moves the iov_iter functions in to their own file.  We're going to
be working on them in upcoming patches.  They become sufficiently large,
and remain self-contained, to justify seperating them from the rest of
the huge mm/filemap.c.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Cc: Zach Brown <zab@zabbo.net>
---
 fs/Makefile   |   2 +-
 fs/iov-iter.c | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 mm/filemap.c  | 144 -------------------------------------------------------
 3 files changed, 152 insertions(+), 145 deletions(-)
 create mode 100644 fs/iov-iter.c

diff --git a/fs/Makefile b/fs/Makefile
index 4fe6df3..1afa0e0 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -11,7 +11,7 @@ obj-y :=	open.o read_write.o file_table.o super.o \
 		attr.o bad_inode.o file.o filesystems.o namespace.o \
 		seq_file.o xattr.o libfs.o fs-writeback.o \
 		pnode.o splice.o sync.o utimes.o \
-		stack.o fs_struct.o statfs.o
+		stack.o fs_struct.o statfs.o iov-iter.o
 
 ifeq ($(CONFIG_BLOCK),y)
 obj-y +=	buffer.o bio.o block_dev.o direct-io.o mpage.o ioprio.o
diff --git a/fs/iov-iter.c b/fs/iov-iter.c
new file mode 100644
index 0000000..52c23d9
--- /dev/null
+++ b/fs/iov-iter.c
@@ -0,0 +1,151 @@
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/uaccess.h>
+#include <linux/uio.h>
+#include <linux/hardirq.h>
+#include <linux/highmem.h>
+#include <linux/pagemap.h>
+
+static size_t __iovec_copy_from_user_inatomic(char *vaddr,
+			const struct iovec *iov, size_t base, size_t bytes)
+{
+	size_t copied = 0, left = 0;
+
+	while (bytes) {
+		char __user *buf = iov->iov_base + base;
+		int copy = min(bytes, iov->iov_len - base);
+
+		base = 0;
+		left = __copy_from_user_inatomic(vaddr, buf, copy);
+		copied += copy;
+		bytes -= copy;
+		vaddr += copy;
+		iov++;
+
+		if (unlikely(left))
+			break;
+	}
+	return copied - left;
+}
+
+/*
+ * Copy as much as we can into the page and return the number of bytes which
+ * were successfully copied.  If a fault is encountered then return the number
+ * of bytes which were copied.
+ */
+size_t iov_iter_copy_from_user_atomic(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes)
+{
+	char *kaddr;
+	size_t copied;
+
+	BUG_ON(!in_atomic());
+	kaddr = kmap_atomic(page);
+	if (likely(i->nr_segs == 1)) {
+		int left;
+		char __user *buf = i->iov->iov_base + i->iov_offset;
+		left = __copy_from_user_inatomic(kaddr + offset, buf, bytes);
+		copied = bytes - left;
+	} else {
+		copied = __iovec_copy_from_user_inatomic(kaddr + offset,
+						i->iov, i->iov_offset, bytes);
+	}
+	kunmap_atomic(kaddr);
+
+	return copied;
+}
+EXPORT_SYMBOL(iov_iter_copy_from_user_atomic);
+
+/*
+ * This has the same sideeffects and return value as
+ * iov_iter_copy_from_user_atomic().
+ * The difference is that it attempts to resolve faults.
+ * Page must not be locked.
+ */
+size_t iov_iter_copy_from_user(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes)
+{
+	char *kaddr;
+	size_t copied;
+
+	kaddr = kmap(page);
+	if (likely(i->nr_segs == 1)) {
+		int left;
+		char __user *buf = i->iov->iov_base + i->iov_offset;
+		left = __copy_from_user(kaddr + offset, buf, bytes);
+		copied = bytes - left;
+	} else {
+		copied = __iovec_copy_from_user_inatomic(kaddr + offset,
+						i->iov, i->iov_offset, bytes);
+	}
+	kunmap(page);
+	return copied;
+}
+EXPORT_SYMBOL(iov_iter_copy_from_user);
+
+void iov_iter_advance(struct iov_iter *i, size_t bytes)
+{
+	BUG_ON(i->count < bytes);
+
+	if (likely(i->nr_segs == 1)) {
+		i->iov_offset += bytes;
+		i->count -= bytes;
+	} else {
+		const struct iovec *iov = i->iov;
+		size_t base = i->iov_offset;
+		unsigned long nr_segs = i->nr_segs;
+
+		/*
+		 * The !iov->iov_len check ensures we skip over unlikely
+		 * zero-length segments (without overruning the iovec).
+		 */
+		while (bytes || unlikely(i->count && !iov->iov_len)) {
+			int copy;
+
+			copy = min(bytes, iov->iov_len - base);
+			BUG_ON(!i->count || i->count < copy);
+			i->count -= copy;
+			bytes -= copy;
+			base += copy;
+			if (iov->iov_len == base) {
+				iov++;
+				nr_segs--;
+				base = 0;
+			}
+		}
+		i->iov = iov;
+		i->iov_offset = base;
+		i->nr_segs = nr_segs;
+	}
+}
+EXPORT_SYMBOL(iov_iter_advance);
+
+/*
+ * Fault in the first iovec of the given iov_iter, to a maximum length
+ * of bytes. Returns 0 on success, or non-zero if the memory could not be
+ * accessed (ie. because it is an invalid address).
+ *
+ * writev-intensive code may want this to prefault several iovecs -- that
+ * would be possible (callers must not rely on the fact that _only_ the
+ * first iovec will be faulted with the current implementation).
+ */
+int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes)
+{
+	char __user *buf = i->iov->iov_base + i->iov_offset;
+	bytes = min(bytes, i->iov->iov_len - i->iov_offset);
+	return fault_in_pages_readable(buf, bytes);
+}
+EXPORT_SYMBOL(iov_iter_fault_in_readable);
+
+/*
+ * Return the count of just the current iov_iter segment.
+ */
+size_t iov_iter_single_seg_count(const struct iov_iter *i)
+{
+	const struct iovec *iov = i->iov;
+	if (i->nr_segs == 1)
+		return i->count;
+	else
+		return min(i->count, iov->iov_len - i->iov_offset);
+}
+EXPORT_SYMBOL(iov_iter_single_seg_count);
diff --git a/mm/filemap.c b/mm/filemap.c
index 4b51ac1..11ebe36 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1941,150 +1941,6 @@ struct page *read_cache_page(struct address_space *mapping,
 }
 EXPORT_SYMBOL(read_cache_page);
 
-static size_t __iovec_copy_from_user_inatomic(char *vaddr,
-			const struct iovec *iov, size_t base, size_t bytes)
-{
-	size_t copied = 0, left = 0;
-
-	while (bytes) {
-		char __user *buf = iov->iov_base + base;
-		int copy = min(bytes, iov->iov_len - base);
-
-		base = 0;
-		left = __copy_from_user_inatomic(vaddr, buf, copy);
-		copied += copy;
-		bytes -= copy;
-		vaddr += copy;
-		iov++;
-
-		if (unlikely(left))
-			break;
-	}
-	return copied - left;
-}
-
-/*
- * Copy as much as we can into the page and return the number of bytes which
- * were successfully copied.  If a fault is encountered then return the number of
- * bytes which were copied.
- */
-size_t iov_iter_copy_from_user_atomic(struct page *page,
-		struct iov_iter *i, unsigned long offset, size_t bytes)
-{
-	char *kaddr;
-	size_t copied;
-
-	BUG_ON(!in_atomic());
-	kaddr = kmap_atomic(page);
-	if (likely(i->nr_segs == 1)) {
-		int left;
-		char __user *buf = i->iov->iov_base + i->iov_offset;
-		left = __copy_from_user_inatomic(kaddr + offset, buf, bytes);
-		copied = bytes - left;
-	} else {
-		copied = __iovec_copy_from_user_inatomic(kaddr + offset,
-						i->iov, i->iov_offset, bytes);
-	}
-	kunmap_atomic(kaddr);
-
-	return copied;
-}
-EXPORT_SYMBOL(iov_iter_copy_from_user_atomic);
-
-/*
- * This has the same sideeffects and return value as
- * iov_iter_copy_from_user_atomic().
- * The difference is that it attempts to resolve faults.
- * Page must not be locked.
- */
-size_t iov_iter_copy_from_user(struct page *page,
-		struct iov_iter *i, unsigned long offset, size_t bytes)
-{
-	char *kaddr;
-	size_t copied;
-
-	kaddr = kmap(page);
-	if (likely(i->nr_segs == 1)) {
-		int left;
-		char __user *buf = i->iov->iov_base + i->iov_offset;
-		left = __copy_from_user(kaddr + offset, buf, bytes);
-		copied = bytes - left;
-	} else {
-		copied = __iovec_copy_from_user_inatomic(kaddr + offset,
-						i->iov, i->iov_offset, bytes);
-	}
-	kunmap(page);
-	return copied;
-}
-EXPORT_SYMBOL(iov_iter_copy_from_user);
-
-void iov_iter_advance(struct iov_iter *i, size_t bytes)
-{
-	BUG_ON(i->count < bytes);
-
-	if (likely(i->nr_segs == 1)) {
-		i->iov_offset += bytes;
-		i->count -= bytes;
-	} else {
-		const struct iovec *iov = i->iov;
-		size_t base = i->iov_offset;
-		unsigned long nr_segs = i->nr_segs;
-
-		/*
-		 * The !iov->iov_len check ensures we skip over unlikely
-		 * zero-length segments (without overruning the iovec).
-		 */
-		while (bytes || unlikely(i->count && !iov->iov_len)) {
-			int copy;
-
-			copy = min(bytes, iov->iov_len - base);
-			BUG_ON(!i->count || i->count < copy);
-			i->count -= copy;
-			bytes -= copy;
-			base += copy;
-			if (iov->iov_len == base) {
-				iov++;
-				nr_segs--;
-				base = 0;
-			}
-		}
-		i->iov = iov;
-		i->iov_offset = base;
-		i->nr_segs = nr_segs;
-	}
-}
-EXPORT_SYMBOL(iov_iter_advance);
-
-/*
- * Fault in the first iovec of the given iov_iter, to a maximum length
- * of bytes. Returns 0 on success, or non-zero if the memory could not be
- * accessed (ie. because it is an invalid address).
- *
- * writev-intensive code may want this to prefault several iovecs -- that
- * would be possible (callers must not rely on the fact that _only_ the
- * first iovec will be faulted with the current implementation).
- */
-int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes)
-{
-	char __user *buf = i->iov->iov_base + i->iov_offset;
-	bytes = min(bytes, i->iov->iov_len - i->iov_offset);
-	return fault_in_pages_readable(buf, bytes);
-}
-EXPORT_SYMBOL(iov_iter_fault_in_readable);
-
-/*
- * Return the count of just the current iov_iter segment.
- */
-size_t iov_iter_single_seg_count(const struct iov_iter *i)
-{
-	const struct iovec *iov = i->iov;
-	if (i->nr_segs == 1)
-		return i->count;
-	else
-		return min(i->count, iov->iov_len - i->iov_offset);
-}
-EXPORT_SYMBOL(iov_iter_single_seg_count);
-
 /*
  * Performs necessary checks before doing a write
  *
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 02/33] iov_iter: iov_iter_copy_from_user() should use non-atomic copy
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 01/33] iov_iter: move into its own file Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 03/33] iov_iter: add copy_to_user support Dave Kleikamp
                   ` (35 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
---
 fs/iov-iter.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/fs/iov-iter.c b/fs/iov-iter.c
index 52c23d9..563a6ba 100644
--- a/fs/iov-iter.c
+++ b/fs/iov-iter.c
@@ -6,8 +6,8 @@
 #include <linux/highmem.h>
 #include <linux/pagemap.h>
 
-static size_t __iovec_copy_from_user_inatomic(char *vaddr,
-			const struct iovec *iov, size_t base, size_t bytes)
+static size_t __iovec_copy_from_user(char *vaddr, const struct iovec *iov,
+				     size_t base, size_t bytes, int atomic)
 {
 	size_t copied = 0, left = 0;
 
@@ -16,7 +16,10 @@ static size_t __iovec_copy_from_user_inatomic(char *vaddr,
 		int copy = min(bytes, iov->iov_len - base);
 
 		base = 0;
-		left = __copy_from_user_inatomic(vaddr, buf, copy);
+		if (atomic)
+			left = __copy_from_user_inatomic(vaddr, buf, copy);
+		else
+			left = __copy_from_user(vaddr, buf, copy);
 		copied += copy;
 		bytes -= copy;
 		vaddr += copy;
@@ -47,8 +50,8 @@ size_t iov_iter_copy_from_user_atomic(struct page *page,
 		left = __copy_from_user_inatomic(kaddr + offset, buf, bytes);
 		copied = bytes - left;
 	} else {
-		copied = __iovec_copy_from_user_inatomic(kaddr + offset,
-						i->iov, i->iov_offset, bytes);
+		copied = __iovec_copy_from_user(kaddr + offset, i->iov,
+						i->iov_offset, bytes, 1);
 	}
 	kunmap_atomic(kaddr);
 
@@ -75,8 +78,8 @@ size_t iov_iter_copy_from_user(struct page *page,
 		left = __copy_from_user(kaddr + offset, buf, bytes);
 		copied = bytes - left;
 	} else {
-		copied = __iovec_copy_from_user_inatomic(kaddr + offset,
-						i->iov, i->iov_offset, bytes);
+		copied = __iovec_copy_from_user(kaddr + offset, i->iov,
+						i->iov_offset, bytes, 0);
 	}
 	kunmap(page);
 	return copied;
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 03/33] iov_iter: add copy_to_user support
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 01/33] iov_iter: move into its own file Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 02/33] iov_iter: iov_iter_copy_from_user() should use non-atomic copy Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 04/33] iov_iter: add __iovec_copy_to_user() Dave Kleikamp
                   ` (34 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

From: Zach Brown <zab@zabbo.net>

This adds iov_iter wrappers around copy_to_user() to match the existing
wrappers around copy_from_user().

This will be used by the generic file system buffered read path.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
---
 fs/iov-iter.c      | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/fs.h |  4 +++
 2 files changed, 84 insertions(+)

diff --git a/fs/iov-iter.c b/fs/iov-iter.c
index 563a6ba..0b2407e 100644
--- a/fs/iov-iter.c
+++ b/fs/iov-iter.c
@@ -6,6 +6,86 @@
 #include <linux/highmem.h>
 #include <linux/pagemap.h>
 
+static size_t __iovec_copy_to_user(char *vaddr, const struct iovec *iov,
+				   size_t base, size_t bytes, int atomic)
+{
+	size_t copied = 0, left = 0;
+
+	while (bytes) {
+		char __user *buf = iov->iov_base + base;
+		int copy = min(bytes, iov->iov_len - base);
+
+		base = 0;
+		if (atomic)
+			left = __copy_to_user_inatomic(buf, vaddr, copy);
+		else
+			left = copy_to_user(buf, vaddr, copy);
+		copied += copy;
+		bytes -= copy;
+		vaddr += copy;
+		iov++;
+
+		if (unlikely(left))
+			break;
+	}
+	return copied - left;
+}
+
+/*
+ * Copy as much as we can into the page and return the number of bytes which
+ * were sucessfully copied.  If a fault is encountered then return the number of
+ * bytes which were copied.
+ */
+size_t iov_iter_copy_to_user_atomic(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes)
+{
+	char *kaddr;
+	size_t copied;
+
+	BUG_ON(!in_atomic());
+	kaddr = kmap_atomic(page);
+	if (likely(i->nr_segs == 1)) {
+		int left;
+		char __user *buf = i->iov->iov_base + i->iov_offset;
+		left = __copy_to_user_inatomic(buf, kaddr + offset, bytes);
+		copied = bytes - left;
+	} else {
+		copied = __iovec_copy_to_user(kaddr + offset, i->iov,
+					      i->iov_offset, bytes, 1);
+	}
+	kunmap_atomic(kaddr);
+
+	return copied;
+}
+EXPORT_SYMBOL(iov_iter_copy_to_user_atomic);
+
+/*
+ * This has the same sideeffects and return value as
+ * iov_iter_copy_to_user_atomic().
+ * The difference is that it attempts to resolve faults.
+ * Page must not be locked.
+ */
+size_t iov_iter_copy_to_user(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes)
+{
+	char *kaddr;
+	size_t copied;
+
+	kaddr = kmap(page);
+	if (likely(i->nr_segs == 1)) {
+		int left;
+		char __user *buf = i->iov->iov_base + i->iov_offset;
+		left = copy_to_user(buf, kaddr + offset, bytes);
+		copied = bytes - left;
+	} else {
+		copied = __iovec_copy_to_user(kaddr + offset, i->iov,
+					      i->iov_offset, bytes, 0);
+	}
+	kunmap(page);
+	return copied;
+}
+EXPORT_SYMBOL(iov_iter_copy_to_user);
+
 static size_t __iovec_copy_from_user(char *vaddr, const struct iovec *iov,
 				     size_t base, size_t bytes, int atomic)
 {
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9818747..80f71df 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -296,6 +296,10 @@ struct iov_iter {
 	size_t count;
 };
 
+size_t iov_iter_copy_to_user_atomic(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes);
+size_t iov_iter_copy_to_user(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes);
 size_t iov_iter_copy_from_user_atomic(struct page *page,
 		struct iov_iter *i, unsigned long offset, size_t bytes);
 size_t iov_iter_copy_from_user(struct page *page,
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 04/33] iov_iter: add __iovec_copy_to_user()
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (2 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 03/33] iov_iter: add copy_to_user support Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
       [not found] ` <1374774659-13121-1-git-send-email-dave.kleikamp-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
                   ` (33 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

This patch adds __iovec_copy_to_user() which doesn't verify write access
to the user memory to be called from code where that verification has
already been done.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
---
 fs/iov-iter.c      | 14 ++++++++++++--
 include/linux/fs.h |  4 +++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/fs/iov-iter.c b/fs/iov-iter.c
index 0b2407e..6cecab4 100644
--- a/fs/iov-iter.c
+++ b/fs/iov-iter.c
@@ -19,7 +19,7 @@ static size_t __iovec_copy_to_user(char *vaddr, const struct iovec *iov,
 		if (atomic)
 			left = __copy_to_user_inatomic(buf, vaddr, copy);
 		else
-			left = copy_to_user(buf, vaddr, copy);
+			left = __copy_to_user(buf, vaddr, copy);
 		copied += copy;
 		bytes -= copy;
 		vaddr += copy;
@@ -65,7 +65,7 @@ EXPORT_SYMBOL(iov_iter_copy_to_user_atomic);
  * The difference is that it attempts to resolve faults.
  * Page must not be locked.
  */
-size_t iov_iter_copy_to_user(struct page *page,
+size_t __iov_iter_copy_to_user(struct page *page,
 		struct iov_iter *i, unsigned long offset, size_t bytes)
 {
 	char *kaddr;
@@ -84,6 +84,16 @@ size_t iov_iter_copy_to_user(struct page *page,
 	kunmap(page);
 	return copied;
 }
+EXPORT_SYMBOL(__iov_iter_copy_to_user);
+
+size_t iov_iter_copy_to_user(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes)
+{
+	might_sleep();
+	if (generic_segment_checks(i->iov, &i->nr_segs, &bytes, VERIFY_WRITE))
+		return 0;
+	return __iov_iter_copy_to_user(page, i, offset, bytes);
+}
 EXPORT_SYMBOL(iov_iter_copy_to_user);
 
 static size_t __iovec_copy_from_user(char *vaddr, const struct iovec *iov,
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 80f71df..bfc6eb0 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -296,7 +296,9 @@ struct iov_iter {
 	size_t count;
 };
 
-size_t iov_iter_copy_to_user_atomic(struct page *page,
+size_t __iov_iter_copy_to_user_atomic(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes);
+size_t __iov_iter_copy_to_user(struct page *page,
 		struct iov_iter *i, unsigned long offset, size_t bytes);
 size_t iov_iter_copy_to_user(struct page *page,
 		struct iov_iter *i, unsigned long offset, size_t bytes);
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 05/33] fuse: convert fuse to use iov_iter_copy_[to|from]_user
       [not found] ` <1374774659-13121-1-git-send-email-dave.kleikamp-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2013-07-25 17:50   ` Dave Kleikamp
  0 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: fuse-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Dave Kleikamp,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA, Andrew Morton, Zach Brown,
	Maxim V. Patlasov

A future patch hides the internals of struct iov_iter, so fuse should
be using the supported interface.

Signed-off-by: Dave Kleikamp <dave.kleikamp-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Acked-by: Miklos Szeredi <mszeredi-AlSwsSmVLrQ@public.gmane.org>
Cc: fuse-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
---
 fs/fuse/file.c | 29 ++++++++---------------------
 1 file changed, 8 insertions(+), 21 deletions(-)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 5c121fe..633766c 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1861,30 +1861,17 @@ static int fuse_ioctl_copy_user(struct page **pages, struct iovec *iov,
 	while (iov_iter_count(&ii)) {
 		struct page *page = pages[page_idx++];
 		size_t todo = min_t(size_t, PAGE_SIZE, iov_iter_count(&ii));
-		void *kaddr;
+		size_t left;
 
-		kaddr = kmap(page);
-
-		while (todo) {
-			char __user *uaddr = ii.iov->iov_base + ii.iov_offset;
-			size_t iov_len = ii.iov->iov_len - ii.iov_offset;
-			size_t copy = min(todo, iov_len);
-			size_t left;
-
-			if (!to_user)
-				left = copy_from_user(kaddr, uaddr, copy);
-			else
-				left = copy_to_user(uaddr, kaddr, copy);
-
-			if (unlikely(left))
-				return -EFAULT;
+		if (!to_user)
+			left = iov_iter_copy_from_user(page, &ii, 0, todo);
+		else
+			left = iov_iter_copy_to_user(page, &ii, 0, todo);
 
-			iov_iter_advance(&ii, copy);
-			todo -= copy;
-			kaddr += copy;
-		}
+		if (unlikely(left))
+			return -EFAULT;
 
-		kunmap(page);
+		iov_iter_advance(&ii, todo);
 	}
 
 	return 0;
-- 
1.8.3.4


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 06/33] iov_iter: hide iovec details behind ops function pointers
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (4 preceding siblings ...)
       [not found] ` <1374774659-13121-1-git-send-email-dave.kleikamp-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 07/33] iov_iter: ii_iovec_copy_to_user should pre-fault user pages Dave Kleikamp
                   ` (31 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

From: Zach Brown <zab@zabbo.net>

This moves the current iov_iter functions behind an ops struct of
function pointers.  The current iov_iter functions all work with memory
which is specified by iovec arrays of user space pointers.

This patch is part of a series that lets us specify memory with bio_vec
arrays of page pointers.  By moving to an iov_iter operation struct we
can add that support in later patches in this series by adding another
set of function pointers.

I only came to this after having initialy tried to teach the current
iov_iter functions about bio_vecs by introducing conditional branches
that dealt with bio_vecs in all the functions.  It wasn't pretty.  This
approach seems to be the lesser evil.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
---
 fs/cifs/file.c     |  4 +--
 fs/fuse/file.c     |  5 ++--
 fs/iov-iter.c      | 86 +++++++++++++++++++++++++++++-------------------------
 include/linux/fs.h | 77 ++++++++++++++++++++++++++++++++++++++----------
 4 files changed, 114 insertions(+), 58 deletions(-)

diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 1e57f36..b5f9d3d 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -2733,8 +2733,8 @@ cifs_readdata_to_iov(struct cifs_readdata *rdata, const struct iovec *iov,
 		/* go while there's data to be copied and no errors */
 		if (copy && !rc) {
 			pdata = kmap(page);
-			rc = memcpy_toiovecend(ii.iov, pdata, ii.iov_offset,
-						(int)copy);
+			rc = memcpy_toiovecend(iov_iter_iovec(&ii), pdata,
+					       ii.iov_offset, (int)copy);
 			kunmap(page);
 			if (!rc) {
 				*copied += copy;
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 633766c..77865d1 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1172,9 +1172,10 @@ static inline void fuse_page_descs_length_init(struct fuse_req *req,
 			req->page_descs[i].offset;
 }
 
-static inline unsigned long fuse_get_user_addr(const struct iov_iter *ii)
+static inline unsigned long fuse_get_user_addr(struct iov_iter *ii)
 {
-	return (unsigned long)ii->iov->iov_base + ii->iov_offset;
+	struct iovec *iov = iov_iter_iovec(ii);
+	return (unsigned long)iov->iov_base + ii->iov_offset;
 }
 
 static inline size_t fuse_get_frag_size(const struct iov_iter *ii,
diff --git a/fs/iov-iter.c b/fs/iov-iter.c
index 6cecab4..6cb6be0 100644
--- a/fs/iov-iter.c
+++ b/fs/iov-iter.c
@@ -36,9 +36,10 @@ static size_t __iovec_copy_to_user(char *vaddr, const struct iovec *iov,
  * were sucessfully copied.  If a fault is encountered then return the number of
  * bytes which were copied.
  */
-size_t iov_iter_copy_to_user_atomic(struct page *page,
+static size_t ii_iovec_copy_to_user_atomic(struct page *page,
 		struct iov_iter *i, unsigned long offset, size_t bytes)
 {
+	struct iovec *iov = (struct iovec *)i->data;
 	char *kaddr;
 	size_t copied;
 
@@ -46,55 +47,52 @@ size_t iov_iter_copy_to_user_atomic(struct page *page,
 	kaddr = kmap_atomic(page);
 	if (likely(i->nr_segs == 1)) {
 		int left;
-		char __user *buf = i->iov->iov_base + i->iov_offset;
+		char __user *buf = iov->iov_base + i->iov_offset;
 		left = __copy_to_user_inatomic(buf, kaddr + offset, bytes);
 		copied = bytes - left;
 	} else {
-		copied = __iovec_copy_to_user(kaddr + offset, i->iov,
+		copied = __iovec_copy_to_user(kaddr + offset, iov,
 					      i->iov_offset, bytes, 1);
 	}
 	kunmap_atomic(kaddr);
 
 	return copied;
 }
-EXPORT_SYMBOL(iov_iter_copy_to_user_atomic);
 
 /*
  * This has the same sideeffects and return value as
- * iov_iter_copy_to_user_atomic().
+ * ii_iovec_copy_to_user_atomic().
  * The difference is that it attempts to resolve faults.
  * Page must not be locked.
  */
-size_t __iov_iter_copy_to_user(struct page *page,
-		struct iov_iter *i, unsigned long offset, size_t bytes)
+static size_t ii_iovec_copy_to_user(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes,
+		int check_access)
 {
+	struct iovec *iov = (struct iovec *)i->data;
 	char *kaddr;
 	size_t copied;
 
+	if (check_access) {
+		might_sleep();
+		if (generic_segment_checks(iov, &i->nr_segs, &bytes,
+					   VERIFY_WRITE))
+			return 0;
+	}
+
 	kaddr = kmap(page);
 	if (likely(i->nr_segs == 1)) {
 		int left;
-		char __user *buf = i->iov->iov_base + i->iov_offset;
+		char __user *buf = iov->iov_base + i->iov_offset;
 		left = copy_to_user(buf, kaddr + offset, bytes);
 		copied = bytes - left;
 	} else {
-		copied = __iovec_copy_to_user(kaddr + offset, i->iov,
+		copied = __iovec_copy_to_user(kaddr + offset, iov,
 					      i->iov_offset, bytes, 0);
 	}
 	kunmap(page);
 	return copied;
 }
-EXPORT_SYMBOL(__iov_iter_copy_to_user);
-
-size_t iov_iter_copy_to_user(struct page *page,
-		struct iov_iter *i, unsigned long offset, size_t bytes)
-{
-	might_sleep();
-	if (generic_segment_checks(i->iov, &i->nr_segs, &bytes, VERIFY_WRITE))
-		return 0;
-	return __iov_iter_copy_to_user(page, i, offset, bytes);
-}
-EXPORT_SYMBOL(iov_iter_copy_to_user);
 
 static size_t __iovec_copy_from_user(char *vaddr, const struct iovec *iov,
 				     size_t base, size_t bytes, int atomic)
@@ -126,9 +124,10 @@ static size_t __iovec_copy_from_user(char *vaddr, const struct iovec *iov,
  * were successfully copied.  If a fault is encountered then return the number
  * of bytes which were copied.
  */
-size_t iov_iter_copy_from_user_atomic(struct page *page,
+static size_t ii_iovec_copy_from_user_atomic(struct page *page,
 		struct iov_iter *i, unsigned long offset, size_t bytes)
 {
+	struct iovec *iov = (struct iovec *)i->data;
 	char *kaddr;
 	size_t copied;
 
@@ -136,11 +135,11 @@ size_t iov_iter_copy_from_user_atomic(struct page *page,
 	kaddr = kmap_atomic(page);
 	if (likely(i->nr_segs == 1)) {
 		int left;
-		char __user *buf = i->iov->iov_base + i->iov_offset;
+		char __user *buf = iov->iov_base + i->iov_offset;
 		left = __copy_from_user_inatomic(kaddr + offset, buf, bytes);
 		copied = bytes - left;
 	} else {
-		copied = __iovec_copy_from_user(kaddr + offset, i->iov,
+		copied = __iovec_copy_from_user(kaddr + offset, iov,
 						i->iov_offset, bytes, 1);
 	}
 	kunmap_atomic(kaddr);
@@ -151,32 +150,32 @@ EXPORT_SYMBOL(iov_iter_copy_from_user_atomic);
 
 /*
  * This has the same sideeffects and return value as
- * iov_iter_copy_from_user_atomic().
+ * ii_iovec_copy_from_user_atomic().
  * The difference is that it attempts to resolve faults.
  * Page must not be locked.
  */
-size_t iov_iter_copy_from_user(struct page *page,
+static size_t ii_iovec_copy_from_user(struct page *page,
 		struct iov_iter *i, unsigned long offset, size_t bytes)
 {
+	struct iovec *iov = (struct iovec *)i->data;
 	char *kaddr;
 	size_t copied;
 
 	kaddr = kmap(page);
 	if (likely(i->nr_segs == 1)) {
 		int left;
-		char __user *buf = i->iov->iov_base + i->iov_offset;
+		char __user *buf = iov->iov_base + i->iov_offset;
 		left = __copy_from_user(kaddr + offset, buf, bytes);
 		copied = bytes - left;
 	} else {
-		copied = __iovec_copy_from_user(kaddr + offset, i->iov,
+		copied = __iovec_copy_from_user(kaddr + offset, iov,
 						i->iov_offset, bytes, 0);
 	}
 	kunmap(page);
 	return copied;
 }
-EXPORT_SYMBOL(iov_iter_copy_from_user);
 
-void iov_iter_advance(struct iov_iter *i, size_t bytes)
+static void ii_iovec_advance(struct iov_iter *i, size_t bytes)
 {
 	BUG_ON(i->count < bytes);
 
@@ -184,7 +183,7 @@ void iov_iter_advance(struct iov_iter *i, size_t bytes)
 		i->iov_offset += bytes;
 		i->count -= bytes;
 	} else {
-		const struct iovec *iov = i->iov;
+		struct iovec *iov = (struct iovec *)i->data;
 		size_t base = i->iov_offset;
 		unsigned long nr_segs = i->nr_segs;
 
@@ -206,12 +205,11 @@ void iov_iter_advance(struct iov_iter *i, size_t bytes)
 				base = 0;
 			}
 		}
-		i->iov = iov;
+		i->data = (unsigned long)iov;
 		i->iov_offset = base;
 		i->nr_segs = nr_segs;
 	}
 }
-EXPORT_SYMBOL(iov_iter_advance);
 
 /*
  * Fault in the first iovec of the given iov_iter, to a maximum length
@@ -222,23 +220,33 @@ EXPORT_SYMBOL(iov_iter_advance);
  * would be possible (callers must not rely on the fact that _only_ the
  * first iovec will be faulted with the current implementation).
  */
-int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes)
+static int ii_iovec_fault_in_readable(struct iov_iter *i, size_t bytes)
 {
-	char __user *buf = i->iov->iov_base + i->iov_offset;
-	bytes = min(bytes, i->iov->iov_len - i->iov_offset);
+	struct iovec *iov = (struct iovec *)i->data;
+	char __user *buf = iov->iov_base + i->iov_offset;
+	bytes = min(bytes, iov->iov_len - i->iov_offset);
 	return fault_in_pages_readable(buf, bytes);
 }
-EXPORT_SYMBOL(iov_iter_fault_in_readable);
 
 /*
  * Return the count of just the current iov_iter segment.
  */
-size_t iov_iter_single_seg_count(const struct iov_iter *i)
+static size_t ii_iovec_single_seg_count(const struct iov_iter *i)
 {
-	const struct iovec *iov = i->iov;
+	const struct iovec *iov = (struct iovec *)i->data;
 	if (i->nr_segs == 1)
 		return i->count;
 	else
 		return min(i->count, iov->iov_len - i->iov_offset);
 }
-EXPORT_SYMBOL(iov_iter_single_seg_count);
+
+struct iov_iter_ops ii_iovec_ops = {
+	.ii_copy_to_user_atomic = ii_iovec_copy_to_user_atomic,
+	.ii_copy_to_user = ii_iovec_copy_to_user,
+	.ii_copy_from_user_atomic = ii_iovec_copy_from_user_atomic,
+	.ii_copy_from_user = ii_iovec_copy_from_user,
+	.ii_advance = ii_iovec_advance,
+	.ii_fault_in_readable = ii_iovec_fault_in_readable,
+	.ii_single_seg_count = ii_iovec_single_seg_count,
+};
+EXPORT_SYMBOL(ii_iovec_ops);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index bfc6eb0..96120d5 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -290,31 +290,73 @@ struct address_space;
 struct writeback_control;
 
 struct iov_iter {
-	const struct iovec *iov;
+	struct iov_iter_ops *ops;
+	unsigned long data;
 	unsigned long nr_segs;
 	size_t iov_offset;
 	size_t count;
 };
 
-size_t __iov_iter_copy_to_user_atomic(struct page *page,
-		struct iov_iter *i, unsigned long offset, size_t bytes);
-size_t __iov_iter_copy_to_user(struct page *page,
-		struct iov_iter *i, unsigned long offset, size_t bytes);
-size_t iov_iter_copy_to_user(struct page *page,
-		struct iov_iter *i, unsigned long offset, size_t bytes);
-size_t iov_iter_copy_from_user_atomic(struct page *page,
-		struct iov_iter *i, unsigned long offset, size_t bytes);
-size_t iov_iter_copy_from_user(struct page *page,
-		struct iov_iter *i, unsigned long offset, size_t bytes);
-void iov_iter_advance(struct iov_iter *i, size_t bytes);
-int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes);
-size_t iov_iter_single_seg_count(const struct iov_iter *i);
+struct iov_iter_ops {
+	size_t (*ii_copy_to_user_atomic)(struct page *, struct iov_iter *,
+					 unsigned long, size_t);
+	size_t (*ii_copy_to_user)(struct page *, struct iov_iter *,
+				  unsigned long, size_t, int);
+	size_t (*ii_copy_from_user_atomic)(struct page *, struct iov_iter *,
+					   unsigned long, size_t);
+	size_t (*ii_copy_from_user)(struct page *, struct iov_iter *,
+					  unsigned long, size_t);
+	void (*ii_advance)(struct iov_iter *, size_t);
+	int (*ii_fault_in_readable)(struct iov_iter *, size_t);
+	size_t (*ii_single_seg_count)(const struct iov_iter *);
+};
+
+static inline size_t iov_iter_copy_to_user_atomic(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes)
+{
+	return i->ops->ii_copy_to_user_atomic(page, i, offset, bytes);
+}
+static inline size_t __iov_iter_copy_to_user(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes)
+{
+	return i->ops->ii_copy_to_user(page, i, offset, bytes, 0);
+}
+static inline size_t iov_iter_copy_to_user(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes)
+{
+	return i->ops->ii_copy_to_user(page, i, offset, bytes, 1);
+}
+static inline size_t iov_iter_copy_from_user_atomic(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes)
+{
+	return i->ops->ii_copy_from_user_atomic(page, i, offset, bytes);
+}
+static inline size_t iov_iter_copy_from_user(struct page *page,
+		struct iov_iter *i, unsigned long offset, size_t bytes)
+{
+	return i->ops->ii_copy_from_user(page, i, offset, bytes);
+}
+static inline void iov_iter_advance(struct iov_iter *i, size_t bytes)
+{
+	return i->ops->ii_advance(i, bytes);
+}
+static inline int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes)
+{
+	return i->ops->ii_fault_in_readable(i, bytes);
+}
+static inline size_t iov_iter_single_seg_count(const struct iov_iter *i)
+{
+	return i->ops->ii_single_seg_count(i);
+}
+
+extern struct iov_iter_ops ii_iovec_ops;
 
 static inline void iov_iter_init(struct iov_iter *i,
 			const struct iovec *iov, unsigned long nr_segs,
 			size_t count, size_t written)
 {
-	i->iov = iov;
+	i->ops = &ii_iovec_ops;
+	i->data = (unsigned long)iov;
 	i->nr_segs = nr_segs;
 	i->iov_offset = 0;
 	i->count = count + written;
@@ -322,6 +364,11 @@ static inline void iov_iter_init(struct iov_iter *i,
 	iov_iter_advance(i, written);
 }
 
+static inline struct iovec *iov_iter_iovec(struct iov_iter *i)
+{
+	return (struct iovec *)i->data;
+}
+
 static inline size_t iov_iter_count(struct iov_iter *i)
 {
 	return i->count;
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 07/33] iov_iter: ii_iovec_copy_to_user should pre-fault user pages
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (5 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 06/33] iov_iter: hide iovec details behind ops function pointers Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 08/33] iov_iter: add bvec support Dave Kleikamp
                   ` (30 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

This duplicates the optimization in file_read_actor as a later patch
will replace it with a call to __iov_iter_copy_to_user().

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
---
 fs/iov-iter.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/fs/iov-iter.c b/fs/iov-iter.c
index 6cb6be0..59f9556 100644
--- a/fs/iov-iter.c
+++ b/fs/iov-iter.c
@@ -80,17 +80,32 @@ static size_t ii_iovec_copy_to_user(struct page *page,
 			return 0;
 	}
 
-	kaddr = kmap(page);
 	if (likely(i->nr_segs == 1)) {
 		int left;
 		char __user *buf = iov->iov_base + i->iov_offset;
+		/*
+		 * Faults on the destination of a read are common, so do it
+		 * before taking the kmap.
+		 */
+		if (!fault_in_pages_writeable(buf, bytes)) {
+			kaddr = kmap_atomic(page);
+			left = __copy_to_user_inatomic(buf, kaddr + offset,
+						     bytes);
+			kunmap_atomic(kaddr);
+			if (left == 0)
+				goto success;
+		}
+		kaddr = kmap(page);
 		left = copy_to_user(buf, kaddr + offset, bytes);
+		kunmap(page);
+success:
 		copied = bytes - left;
 	} else {
+		kaddr = kmap(page);
 		copied = __iovec_copy_to_user(kaddr + offset, iov,
 					      i->iov_offset, bytes, 0);
+		kunmap(page);
 	}
-	kunmap(page);
 	return copied;
 }
 
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 08/33] iov_iter: add bvec support
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (6 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 07/33] iov_iter: ii_iovec_copy_to_user should pre-fault user pages Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 09/33] iov_iter: add a shorten call Dave Kleikamp
                   ` (29 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

From: Zach Brown <zab@zabbo.net>

This adds a set of iov_iter_ops calls which work with memory which is
specified by an array of bio_vec structs instead of an array of iovec
structs.

The big difference is that the pages referenced by the bio_vec elements
are pinned.  They don't need to be faulted in and we can always use
kmap_atomic() to map them one at a time.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
---
 fs/iov-iter.c      | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/fs.h |  19 ++++++++
 2 files changed, 148 insertions(+)

diff --git a/fs/iov-iter.c b/fs/iov-iter.c
index 59f9556..5624e36 100644
--- a/fs/iov-iter.c
+++ b/fs/iov-iter.c
@@ -5,6 +5,7 @@
 #include <linux/hardirq.h>
 #include <linux/highmem.h>
 #include <linux/pagemap.h>
+#include <linux/bio.h>
 
 static size_t __iovec_copy_to_user(char *vaddr, const struct iovec *iov,
 				   size_t base, size_t bytes, int atomic)
@@ -109,6 +110,134 @@ success:
 	return copied;
 }
 
+#ifdef CONFIG_BLOCK
+/*
+ * As an easily verifiable first pass, we implement all the methods that
+ * copy data to and from bvec pages with one function.  We implement it
+ * all with kmap_atomic().
+ */
+static size_t bvec_copy_tofrom_page(struct iov_iter *iter, struct page *page,
+				    unsigned long page_offset, size_t bytes,
+				    int topage)
+{
+	struct bio_vec *bvec = (struct bio_vec *)iter->data;
+	size_t bvec_offset = iter->iov_offset;
+	size_t remaining = bytes;
+	void *bvec_map;
+	void *page_map;
+	size_t copy;
+
+	page_map = kmap_atomic(page);
+
+	BUG_ON(bytes > iter->count);
+	while (remaining) {
+		BUG_ON(bvec->bv_len == 0);
+		BUG_ON(bvec_offset >= bvec->bv_len);
+		copy = min(remaining, bvec->bv_len - bvec_offset);
+		bvec_map = kmap_atomic(bvec->bv_page);
+		if (topage)
+			memcpy(page_map + page_offset,
+			       bvec_map + bvec->bv_offset + bvec_offset,
+			       copy);
+		else
+			memcpy(bvec_map + bvec->bv_offset + bvec_offset,
+			       page_map + page_offset,
+			       copy);
+		kunmap_atomic(bvec_map);
+		remaining -= copy;
+		bvec_offset += copy;
+		page_offset += copy;
+		if (bvec_offset == bvec->bv_len) {
+			bvec_offset = 0;
+			bvec++;
+		}
+	}
+
+	kunmap_atomic(page_map);
+
+	return bytes;
+}
+
+static size_t ii_bvec_copy_to_user_atomic(struct page *page, struct iov_iter *i,
+					  unsigned long offset, size_t bytes)
+{
+	return bvec_copy_tofrom_page(i, page, offset, bytes, 0);
+}
+static size_t ii_bvec_copy_to_user(struct page *page, struct iov_iter *i,
+				   unsigned long offset, size_t bytes,
+				   int check_access)
+{
+	return bvec_copy_tofrom_page(i, page, offset, bytes, 0);
+}
+static size_t ii_bvec_copy_from_user_atomic(struct page *page,
+					    struct iov_iter *i,
+					    unsigned long offset, size_t bytes)
+{
+	return bvec_copy_tofrom_page(i, page, offset, bytes, 1);
+}
+static size_t ii_bvec_copy_from_user(struct page *page, struct iov_iter *i,
+				     unsigned long offset, size_t bytes)
+{
+	return bvec_copy_tofrom_page(i, page, offset, bytes, 1);
+}
+
+/*
+ * bio_vecs have a stricter structure than iovecs that might have
+ * come from userspace.  There are no zero length bio_vec elements.
+ */
+static void ii_bvec_advance(struct iov_iter *i, size_t bytes)
+{
+	struct bio_vec *bvec = (struct bio_vec *)i->data;
+	size_t offset = i->iov_offset;
+	size_t delta;
+
+	BUG_ON(i->count < bytes);
+	while (bytes) {
+		BUG_ON(bvec->bv_len == 0);
+		BUG_ON(bvec->bv_len <= offset);
+		delta = min(bytes, bvec->bv_len - offset);
+		offset += delta;
+		i->count -= delta;
+		bytes -= delta;
+		if (offset == bvec->bv_len) {
+			bvec++;
+			offset = 0;
+		}
+	}
+
+	i->data = (unsigned long)bvec;
+	i->iov_offset = offset;
+}
+
+/*
+ * pages pointed to by bio_vecs are always pinned.
+ */
+static int ii_bvec_fault_in_readable(struct iov_iter *i, size_t bytes)
+{
+	return 0;
+}
+
+static size_t ii_bvec_single_seg_count(const struct iov_iter *i)
+{
+	const struct bio_vec *bvec = (struct bio_vec *)i->data;
+	if (i->nr_segs == 1)
+		return i->count;
+	else
+		return min(i->count, bvec->bv_len - i->iov_offset);
+}
+
+struct iov_iter_ops ii_bvec_ops = {
+	.ii_copy_to_user_atomic = ii_bvec_copy_to_user_atomic,
+	.ii_copy_to_user = ii_bvec_copy_to_user,
+	.ii_copy_from_user_atomic = ii_bvec_copy_from_user_atomic,
+	.ii_copy_from_user = ii_bvec_copy_from_user,
+	.ii_advance = ii_bvec_advance,
+	.ii_fault_in_readable = ii_bvec_fault_in_readable,
+	.ii_single_seg_count = ii_bvec_single_seg_count,
+};
+EXPORT_SYMBOL(ii_bvec_ops);
+#endif	/* CONFIG_BLOCK */
+
 static size_t __iovec_copy_from_user(char *vaddr, const struct iovec *iov,
 				     size_t base, size_t bytes, int atomic)
 {
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 96120d5..c2cd17c 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -349,6 +349,25 @@ static inline size_t iov_iter_single_seg_count(const struct iov_iter *i)
 	return i->ops->ii_single_seg_count(i);
 }
 
+#ifdef CONFIG_BLOCK
+extern struct iov_iter_ops ii_bvec_ops;
+
+struct bio_vec;
+static inline void iov_iter_init_bvec(struct iov_iter *i,
+				      struct bio_vec *bvec,
+				      unsigned long nr_segs,
+				      size_t count, size_t written)
+{
+	i->ops = &ii_bvec_ops;
+	i->data = (unsigned long)bvec;
+	i->nr_segs = nr_segs;
+	i->iov_offset = 0;
+	i->count = count + written;
+
+	iov_iter_advance(i, written);
+}
+#endif
+
 extern struct iov_iter_ops ii_iovec_ops;
 
 static inline void iov_iter_init(struct iov_iter *i,
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 09/33] iov_iter: add a shorten call
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (7 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 08/33] iov_iter: add bvec support Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 10/33] iov_iter: let callers extract iovecs and bio_vecs Dave Kleikamp
                   ` (28 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

From: Zach Brown <zab@zabbo.net>

The generic direct write path wants to shorten its memory vector.  It
does this when it finds that it has to perform a partial write due to
LIMIT_FSIZE.  .direct_IO() always performs IO on all of the referenced
memory because it doesn't have an argument to specify the length of the
IO.

We add an iov_iter operation for this so that the generic path can ask
to shorten the memory vector without having to know what kind it is.
We're happy to shorten the kernel copy of the iovec array, but we refuse
to shorten the bio_vec array and return an error in this case.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
---
 fs/iov-iter.c      | 15 +++++++++++++++
 include/linux/fs.h |  5 +++++
 2 files changed, 20 insertions(+)

diff --git a/fs/iov-iter.c b/fs/iov-iter.c
index 5624e36..ec461c8 100644
--- a/fs/iov-iter.c
+++ b/fs/iov-iter.c
@@ -226,6 +226,11 @@ static size_t ii_bvec_single_seg_count(const struct iov_iter *i)
 		return min(i->count, bvec->bv_len - i->iov_offset);
 }
 
+static int ii_bvec_shorten(struct iov_iter *i, size_t count)
+{
+	return -EINVAL;
+}
+
 struct iov_iter_ops ii_bvec_ops = {
 	.ii_copy_to_user_atomic = ii_bvec_copy_to_user_atomic,
 	.ii_copy_to_user = ii_bvec_copy_to_user,
@@ -234,6 +239,7 @@ struct iov_iter_ops ii_bvec_ops = {
 	.ii_advance = ii_bvec_advance,
 	.ii_fault_in_readable = ii_bvec_fault_in_readable,
 	.ii_single_seg_count = ii_bvec_single_seg_count,
+	.ii_shorten = ii_bvec_shorten,
 };
 EXPORT_SYMBOL(ii_bvec_ops);
 #endif	/* CONFIG_BLOCK */
@@ -384,6 +390,14 @@ static size_t ii_iovec_single_seg_count(const struct iov_iter *i)
 		return min(i->count, iov->iov_len - i->iov_offset);
 }
 
+static int ii_iovec_shorten(struct iov_iter *i, size_t count)
+{
+	struct iovec *iov = (struct iovec *)i->data;
+	i->nr_segs = iov_shorten(iov, i->nr_segs, count);
+	i->count = min(i->count, count);
+	return 0;
+}
+
 struct iov_iter_ops ii_iovec_ops = {
 	.ii_copy_to_user_atomic = ii_iovec_copy_to_user_atomic,
 	.ii_copy_to_user = ii_iovec_copy_to_user,
@@ -392,5 +406,6 @@ struct iov_iter_ops ii_iovec_ops = {
 	.ii_advance = ii_iovec_advance,
 	.ii_fault_in_readable = ii_iovec_fault_in_readable,
 	.ii_single_seg_count = ii_iovec_single_seg_count,
+	.ii_shorten = ii_iovec_shorten,
 };
 EXPORT_SYMBOL(ii_iovec_ops);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index c2cd17c..a89bcb9 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -309,6 +309,7 @@ struct iov_iter_ops {
 	void (*ii_advance)(struct iov_iter *, size_t);
 	int (*ii_fault_in_readable)(struct iov_iter *, size_t);
 	size_t (*ii_single_seg_count)(const struct iov_iter *);
+	int (*ii_shorten)(struct iov_iter *, size_t);
 };
 
 static inline size_t iov_iter_copy_to_user_atomic(struct page *page,
@@ -348,6 +349,10 @@ static inline size_t iov_iter_single_seg_count(const struct iov_iter *i)
 {
 	return i->ops->ii_single_seg_count(i);
 }
+static inline int iov_iter_shorten(struct iov_iter *i, size_t count)
+{
+	return i->ops->ii_shorten(i, count);
+}
 
 #ifdef CONFIG_BLOCK
 extern struct iov_iter_ops ii_bvec_ops;
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 10/33] iov_iter: let callers extract iovecs and bio_vecs
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (8 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 09/33] iov_iter: add a shorten call Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 11/33] dio: Convert direct_IO to use iov_iter Dave Kleikamp
                   ` (27 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

From: Zach Brown <zab@zabbo.net>

direct IO treats memory from user iovecs and memory from arrays of
kernel pages very differently.  User memory is pinned and worked with in
batches while kernel pages are always pinned and don't require
additional processing.

Rather than try and provide an abstraction that includes these
different behaviours we let direct IO extract the memory structs and
hand them to the existing code.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
---
 include/linux/fs.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index a89bcb9..322d585 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -371,6 +371,17 @@ static inline void iov_iter_init_bvec(struct iov_iter *i,
 
 	iov_iter_advance(i, written);
 }
+
+static inline int iov_iter_has_bvec(struct iov_iter *i)
+{
+	return i->ops == &ii_bvec_ops;
+}
+
+static inline struct bio_vec *iov_iter_bvec(struct iov_iter *i)
+{
+	BUG_ON(!iov_iter_has_bvec(i));
+	return (struct bio_vec *)i->data;
+}
 #endif
 
 extern struct iov_iter_ops ii_iovec_ops;
@@ -388,8 +399,14 @@ static inline void iov_iter_init(struct iov_iter *i,
 	iov_iter_advance(i, written);
 }
 
+static inline int iov_iter_has_iovec(struct iov_iter *i)
+{
+	return i->ops == &ii_iovec_ops;
+}
+
 static inline struct iovec *iov_iter_iovec(struct iov_iter *i)
 {
+	BUG_ON(!iov_iter_has_iovec(i));
 	return (struct iovec *)i->data;
 }
 
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 11/33] dio: Convert direct_IO to use iov_iter
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (9 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 10/33] iov_iter: let callers extract iovecs and bio_vecs Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-08-23 15:48   ` Geert Uytterhoeven
  2013-07-25 17:50 ` [PATCH V8 12/33] dio: add bio_vec support to __blockdev_direct_IO() Dave Kleikamp
                   ` (26 subsequent siblings)
  37 siblings, 1 reply; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

Change the direct_IO aop to take an iov_iter argument rather than an iovec.
This will get passed down through most filesystems so that only the
__blockdev_direct_IO helper need be aware of whether user or kernel memory
is being passed to the function.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
---
 Documentation/filesystems/Locking |  4 +--
 Documentation/filesystems/vfs.txt |  4 +--
 fs/9p/vfs_addr.c                  |  8 ++---
 fs/block_dev.c                    |  8 ++---
 fs/btrfs/inode.c                  | 63 +++++++++++++++++++++++----------------
 fs/ceph/addr.c                    |  3 +-
 fs/direct-io.c                    | 19 ++++++------
 fs/ext2/inode.c                   |  8 ++---
 fs/ext3/inode.c                   | 15 ++++------
 fs/ext4/ext4.h                    |  3 +-
 fs/ext4/indirect.c                | 16 +++++-----
 fs/ext4/inode.c                   | 23 +++++++-------
 fs/f2fs/data.c                    |  4 +--
 fs/fat/inode.c                    | 10 +++----
 fs/fuse/cuse.c                    | 10 +++++--
 fs/fuse/file.c                    | 56 +++++++++++++++++-----------------
 fs/fuse/fuse_i.h                  |  5 ++--
 fs/gfs2/aops.c                    |  7 ++---
 fs/hfs/inode.c                    |  7 ++---
 fs/hfsplus/inode.c                |  6 ++--
 fs/jfs/inode.c                    |  7 ++---
 fs/nfs/direct.c                   | 13 ++++----
 fs/nilfs2/inode.c                 |  8 ++---
 fs/ocfs2/aops.c                   |  8 ++---
 fs/reiserfs/inode.c               |  7 ++---
 fs/udf/file.c                     |  3 +-
 fs/udf/inode.c                    | 10 +++----
 fs/xfs/xfs_aops.c                 | 13 ++++----
 include/linux/fs.h                | 18 +++++------
 include/linux/nfs_fs.h            |  3 +-
 mm/filemap.c                      | 13 ++++++--
 mm/page_io.c                      |  8 +++--
 32 files changed, 196 insertions(+), 194 deletions(-)

diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index fe7afe2..ff1e311 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -192,8 +192,8 @@ prototypes:
 	void (*invalidatepage) (struct page *, unsigned int, unsigned int);
 	int (*releasepage) (struct page *, int);
 	void (*freepage)(struct page *);
-	int (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
-			loff_t offset, unsigned long nr_segs);
+	int (*direct_IO)(int, struct kiocb *, struct iov_iter *iter,
+			loff_t offset);
 	int (*get_xip_mem)(struct address_space *, pgoff_t, int, void **,
 				unsigned long *);
 	int (*migratepage)(struct address_space *, struct page *, struct page *);
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index f93a882..461bee1 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -573,8 +573,8 @@ struct address_space_operations {
 	void (*invalidatepage) (struct page *, unsigned int, unsigned int);
 	int (*releasepage) (struct page *, int);
 	void (*freepage)(struct page *);
-	ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
-			loff_t offset, unsigned long nr_segs);
+	ssize_t (*direct_IO)(int, struct kiocb *, struct iov_iter *iter,
+			loff_t offset);
 	struct page* (*get_xip_page)(struct address_space *, sector_t,
 			int);
 	/* migrate the contents of a page to the specified target */
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
index 9ff073f..5581415 100644
--- a/fs/9p/vfs_addr.c
+++ b/fs/9p/vfs_addr.c
@@ -241,9 +241,8 @@ static int v9fs_launder_page(struct page *page)
  * v9fs_direct_IO - 9P address space operation for direct I/O
  * @rw: direction (read or write)
  * @iocb: target I/O control block
- * @iov: array of vectors that define I/O buffer
+ * @iter: array of vectors that define I/O buffer
  * @pos: offset in file to begin the operation
- * @nr_segs: size of iovec array
  *
  * The presence of v9fs_direct_IO() in the address space ops vector
  * allowes open() O_DIRECT flags which would have failed otherwise.
@@ -257,8 +256,7 @@ static int v9fs_launder_page(struct page *page)
  *
  */
 static ssize_t
-v9fs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
-	       loff_t pos, unsigned long nr_segs)
+v9fs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
 {
 	/*
 	 * FIXME
@@ -267,7 +265,7 @@ v9fs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
 	 */
 	p9_debug(P9_DEBUG_VFS, "v9fs_direct_IO: v9fs_direct_IO (%s) off/no(%lld/%lu) EINVAL\n",
 		 iocb->ki_filp->f_path.dentry->d_name.name,
-		 (long long)pos, nr_segs);
+		 (long long)pos, iter->nr_segs);
 
 	return -EINVAL;
 }
diff --git a/fs/block_dev.c b/fs/block_dev.c
index c7bda5c..6f8c9e4 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -165,14 +165,14 @@ blkdev_get_block(struct inode *inode, sector_t iblock,
 }
 
 static ssize_t
-blkdev_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
-			loff_t offset, unsigned long nr_segs)
+blkdev_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
+			loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_mapping->host;
 
-	return __blockdev_direct_IO(rw, iocb, inode, I_BDEV(inode), iov, offset,
-				    nr_segs, blkdev_get_block, NULL, NULL, 0);
+	return __blockdev_direct_IO(rw, iocb, inode, I_BDEV(inode), iter,
+				    offset, blkdev_get_block, NULL, NULL, 0);
 }
 
 int __sync_blockdev(struct block_device *bdev, int wait)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 6d1b93c..fe59386 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7194,8 +7194,7 @@ free_ordered:
 }
 
 static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *iocb,
-			const struct iovec *iov, loff_t offset,
-			unsigned long nr_segs)
+			struct iov_iter *iter, loff_t offset)
 {
 	int seg;
 	int i;
@@ -7209,35 +7208,50 @@ static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *io
 		goto out;
 
 	/* Check the memory alignment.  Blocks cannot straddle pages */
-	for (seg = 0; seg < nr_segs; seg++) {
-		addr = (unsigned long)iov[seg].iov_base;
-		size = iov[seg].iov_len;
-		end += size;
-		if ((addr & blocksize_mask) || (size & blocksize_mask))
-			goto out;
+	if (iov_iter_has_iovec(iter)) {
+		const struct iovec *iov = iov_iter_iovec(iter);
+
+		for (seg = 0; seg < iter->nr_segs; seg++) {
+			addr = (unsigned long)iov[seg].iov_base;
+			size = iov[seg].iov_len;
+			end += size;
+			if ((addr & blocksize_mask) || (size & blocksize_mask))
+				goto out;
 
-		/* If this is a write we don't need to check anymore */
-		if (rw & WRITE)
-			continue;
+			/* If this is a write we don't need to check anymore */
+			if (rw & WRITE)
+				continue;
 
-		/*
-		 * Check to make sure we don't have duplicate iov_base's in this
-		 * iovec, if so return EINVAL, otherwise we'll get csum errors
-		 * when reading back.
-		 */
-		for (i = seg + 1; i < nr_segs; i++) {
-			if (iov[seg].iov_base == iov[i].iov_base)
+			/*
+			* Check to make sure we don't have duplicate iov_base's
+			* in this iovec, if so return EINVAL, otherwise we'll
+			* get csum errors when reading back.
+			*/
+			for (i = seg + 1; i < iter->nr_segs; i++) {
+				if (iov[seg].iov_base == iov[i].iov_base)
+					goto out;
+			}
+		}
+	} else if (iov_iter_has_bvec(iter)) {
+		struct bio_vec *bvec = iov_iter_bvec(iter);
+
+		for (seg = 0; seg < iter->nr_segs; seg++) {
+			addr = (unsigned long)bvec[seg].bv_offset;
+			size = bvec[seg].bv_len;
+			end += size;
+			if ((addr & blocksize_mask) || (size & blocksize_mask))
 				goto out;
 		}
-	}
+	} else
+		BUG();
+
 	retval = 0;
 out:
 	return retval;
 }
 
 static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb,
-			const struct iovec *iov, loff_t offset,
-			unsigned long nr_segs)
+			struct iov_iter *iter, loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_mapping->host;
@@ -7247,8 +7261,7 @@ static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb,
 	bool relock = false;
 	ssize_t ret;
 
-	if (check_direct_IO(BTRFS_I(inode)->root, rw, iocb, iov,
-			    offset, nr_segs))
+	if (check_direct_IO(BTRFS_I(inode)->root, rw, iocb, iter, offset))
 		return 0;
 
 	atomic_inc(&inode->i_dio_count);
@@ -7260,7 +7273,7 @@ static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb,
 	 * call btrfs_wait_ordered_range to make absolutely sure that any
 	 * outstanding dirty pages are on disk.
 	 */
-	count = iov_length(iov, nr_segs);
+	count = iov_iter_count(iter);
 	btrfs_wait_ordered_range(inode, offset, count);
 
 	if (rw & WRITE) {
@@ -7285,7 +7298,7 @@ static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb,
 
 	ret = __blockdev_direct_IO(rw, iocb, inode,
 			BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev,
-			iov, offset, nr_segs, btrfs_get_blocks_direct, NULL,
+			iter, offset, btrfs_get_blocks_direct, NULL,
 			btrfs_submit_direct, flags);
 	if (rw & WRITE) {
 		if (ret < 0 && ret != -EIOCBQUEUED)
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 5318a3b..dd6dc25 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -1169,8 +1169,7 @@ static int ceph_write_end(struct file *file, struct address_space *mapping,
  * never get called.
  */
 static ssize_t ceph_direct_io(int rw, struct kiocb *iocb,
-			      const struct iovec *iov,
-			      loff_t pos, unsigned long nr_segs)
+			      struct iov_iter *iter, loff_t pos)
 {
 	WARN_ON(1);
 	return -EINVAL;
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 7ab90f5..a81366c 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -1043,9 +1043,9 @@ static inline int drop_refcount(struct dio *dio)
  */
 static inline ssize_t
 do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
-	struct block_device *bdev, const struct iovec *iov, loff_t offset, 
-	unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
-	dio_submit_t submit_io,	int flags)
+	struct block_device *bdev, struct iov_iter *iter, loff_t offset,
+	get_block_t get_block, dio_iodone_t end_io, dio_submit_t submit_io,
+	int flags)
 {
 	int seg;
 	size_t size;
@@ -1061,6 +1061,8 @@ do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
 	size_t bytes;
 	struct buffer_head map_bh = { 0, };
 	struct blk_plug plug;
+	const struct iovec *iov = iov_iter_iovec(iter);
+	unsigned long nr_segs = iter->nr_segs;
 
 	if (rw & WRITE)
 		rw = WRITE_ODIRECT;
@@ -1279,9 +1281,9 @@ out:
 
 ssize_t
 __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
-	struct block_device *bdev, const struct iovec *iov, loff_t offset,
-	unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
-	dio_submit_t submit_io,	int flags)
+	struct block_device *bdev, struct iov_iter *iter, loff_t offset,
+	get_block_t get_block, dio_iodone_t end_io, dio_submit_t submit_io,
+	int flags)
 {
 	/*
 	 * The block device state is needed in the end to finally
@@ -1295,9 +1297,8 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
 	prefetch(bdev->bd_queue);
 	prefetch((char *)bdev->bd_queue + SMP_CACHE_BYTES);
 
-	return do_blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
-				     nr_segs, get_block, end_io,
-				     submit_io, flags);
+	return do_blockdev_direct_IO(rw, iocb, inode, bdev, iter, offset,
+				     get_block, end_io, submit_io, flags);
 }
 
 EXPORT_SYMBOL(__blockdev_direct_IO);
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 0a87bb1..e3e8e3b 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -848,18 +848,16 @@ static sector_t ext2_bmap(struct address_space *mapping, sector_t block)
 }
 
 static ssize_t
-ext2_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
-			loff_t offset, unsigned long nr_segs)
+ext2_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct address_space *mapping = file->f_mapping;
 	struct inode *inode = mapping->host;
 	ssize_t ret;
 
-	ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
-				 ext2_get_block);
+	ret = blockdev_direct_IO(rw, iocb, inode, iter, offset, ext2_get_block);
 	if (ret < 0 && (rw & WRITE))
-		ext2_write_failed(mapping, offset + iov_length(iov, nr_segs));
+		ext2_write_failed(mapping, offset + iov_iter_count(iter));
 	return ret;
 }
 
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 2bd8548..85bd13b 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -1862,8 +1862,7 @@ static int ext3_releasepage(struct page *page, gfp_t wait)
  * VFS code falls back into buffered path in that case so we are safe.
  */
 static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb,
-			const struct iovec *iov, loff_t offset,
-			unsigned long nr_segs)
+			struct iov_iter *iter, loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_mapping->host;
@@ -1871,10 +1870,10 @@ static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb,
 	handle_t *handle;
 	ssize_t ret;
 	int orphan = 0;
-	size_t count = iov_length(iov, nr_segs);
+	size_t count = iov_iter_count(iter);
 	int retries = 0;
 
-	trace_ext3_direct_IO_enter(inode, offset, iov_length(iov, nr_segs), rw);
+	trace_ext3_direct_IO_enter(inode, offset, count, rw);
 
 	if (rw == WRITE) {
 		loff_t final_size = offset + count;
@@ -1898,15 +1897,14 @@ static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb,
 	}
 
 retry:
-	ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
-				 ext3_get_block);
+	ret = blockdev_direct_IO(rw, iocb, inode, iter, offset, ext3_get_block);
 	/*
 	 * In case of error extending write may have instantiated a few
 	 * blocks outside i_size. Trim these off again.
 	 */
 	if (unlikely((rw & WRITE) && ret < 0)) {
 		loff_t isize = i_size_read(inode);
-		loff_t end = offset + iov_length(iov, nr_segs);
+		loff_t end = offset + count;
 
 		if (end > isize)
 			ext3_truncate_failed_direct_write(inode);
@@ -1949,8 +1947,7 @@ retry:
 			ret = err;
 	}
 out:
-	trace_ext3_direct_IO_exit(inode, offset,
-				iov_length(iov, nr_segs), rw, ret);
+	trace_ext3_direct_IO_exit(inode, offset, count, rw, ret);
 	return ret;
 }
 
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index b577e45..afa7741 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2111,8 +2111,7 @@ extern void ext4_da_update_reserve_space(struct inode *inode,
 extern int ext4_ind_map_blocks(handle_t *handle, struct inode *inode,
 				struct ext4_map_blocks *map, int flags);
 extern ssize_t ext4_ind_direct_IO(int rw, struct kiocb *iocb,
-				const struct iovec *iov, loff_t offset,
-				unsigned long nr_segs);
+				struct iov_iter *iter, loff_t offset);
 extern int ext4_ind_calc_metadata_amount(struct inode *inode, sector_t lblock);
 extern int ext4_ind_trans_blocks(struct inode *inode, int nrblocks);
 extern void ext4_ind_truncate(handle_t *, struct inode *inode);
diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c
index 87b30cd..b6eb453 100644
--- a/fs/ext4/indirect.c
+++ b/fs/ext4/indirect.c
@@ -640,8 +640,7 @@ out:
  * VFS code falls back into buffered path in that case so we are safe.
  */
 ssize_t ext4_ind_direct_IO(int rw, struct kiocb *iocb,
-			   const struct iovec *iov, loff_t offset,
-			   unsigned long nr_segs)
+			   struct iov_iter *iter, loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_mapping->host;
@@ -649,7 +648,7 @@ ssize_t ext4_ind_direct_IO(int rw, struct kiocb *iocb,
 	handle_t *handle;
 	ssize_t ret;
 	int orphan = 0;
-	size_t count = iov_length(iov, nr_segs);
+	size_t count = iov_iter_count(iter);
 	int retries = 0;
 
 	if (rw == WRITE) {
@@ -688,18 +687,17 @@ retry:
 			goto locked;
 		}
 		ret = __blockdev_direct_IO(rw, iocb, inode,
-				 inode->i_sb->s_bdev, iov,
-				 offset, nr_segs,
-				 ext4_get_block, NULL, NULL, 0);
+				 inode->i_sb->s_bdev, iter,
+				 offset, ext4_get_block, NULL, NULL, 0);
 		inode_dio_done(inode);
 	} else {
 locked:
-		ret = blockdev_direct_IO(rw, iocb, inode, iov,
-				 offset, nr_segs, ext4_get_block);
+		ret = blockdev_direct_IO(rw, iocb, inode, iter,
+				 offset, ext4_get_block);
 
 		if (unlikely((rw & WRITE) && ret < 0)) {
 			loff_t isize = i_size_read(inode);
-			loff_t end = offset + iov_length(iov, nr_segs);
+			loff_t end = offset + iov_iter_count(iter);
 
 			if (end > isize)
 				ext4_truncate_failed_write(inode);
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index ba33c67..1380108 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3043,13 +3043,12 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
  *
  */
 static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb,
-			      const struct iovec *iov, loff_t offset,
-			      unsigned long nr_segs)
+			      struct iov_iter *iter, loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_mapping->host;
 	ssize_t ret;
-	size_t count = iov_length(iov, nr_segs);
+	size_t count = iov_iter_count(iter);
 	int overwrite = 0;
 	get_block_t *get_block_func = NULL;
 	int dio_flags = 0;
@@ -3058,7 +3057,7 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb,
 
 	/* Use the old path for reads and writes beyond i_size. */
 	if (rw != WRITE || final_size > inode->i_size)
-		return ext4_ind_direct_IO(rw, iocb, iov, offset, nr_segs);
+		return ext4_ind_direct_IO(rw, iocb, iter, offset);
 
 	BUG_ON(iocb->private == NULL);
 
@@ -3126,8 +3125,8 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb,
 		dio_flags = DIO_LOCKING;
 	}
 	ret = __blockdev_direct_IO(rw, iocb, inode,
-				   inode->i_sb->s_bdev, iov,
-				   offset, nr_segs,
+				   inode->i_sb->s_bdev, iter,
+				   offset,
 				   get_block_func,
 				   ext4_end_io_dio,
 				   NULL,
@@ -3188,8 +3187,7 @@ retake_lock:
 }
 
 static ssize_t ext4_direct_IO(int rw, struct kiocb *iocb,
-			      const struct iovec *iov, loff_t offset,
-			      unsigned long nr_segs)
+			      struct iov_iter *iter, loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_mapping->host;
@@ -3205,13 +3203,12 @@ static ssize_t ext4_direct_IO(int rw, struct kiocb *iocb,
 	if (ext4_has_inline_data(inode))
 		return 0;
 
-	trace_ext4_direct_IO_enter(inode, offset, iov_length(iov, nr_segs), rw);
+	trace_ext4_direct_IO_enter(inode, offset, iov_iter_count(iter), rw);
 	if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))
-		ret = ext4_ext_direct_IO(rw, iocb, iov, offset, nr_segs);
+		ret = ext4_ext_direct_IO(rw, iocb, iter, offset);
 	else
-		ret = ext4_ind_direct_IO(rw, iocb, iov, offset, nr_segs);
-	trace_ext4_direct_IO_exit(inode, offset,
-				iov_length(iov, nr_segs), rw, ret);
+		ret = ext4_ind_direct_IO(rw, iocb, iter, offset);
+	trace_ext4_direct_IO_exit(inode, offset, iov_iter_count(iter), rw, ret);
 	return ret;
 }
 
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 035f9a3..c40a0af 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -723,7 +723,7 @@ static int f2fs_write_end(struct file *file,
 }
 
 static ssize_t f2fs_direct_IO(int rw, struct kiocb *iocb,
-		const struct iovec *iov, loff_t offset, unsigned long nr_segs)
+		struct iov_iter *iter, loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_mapping->host;
@@ -732,7 +732,7 @@ static ssize_t f2fs_direct_IO(int rw, struct kiocb *iocb,
 		return 0;
 
 	/* Needs synchronization with the cleaner */
-	return blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
+	return blockdev_direct_IO(rw, iocb, inode, iter, offset,
 						  get_data_block_ro);
 }
 
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 11b51bb..70a218d 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -185,8 +185,7 @@ static int fat_write_end(struct file *file, struct address_space *mapping,
 }
 
 static ssize_t fat_direct_IO(int rw, struct kiocb *iocb,
-			     const struct iovec *iov,
-			     loff_t offset, unsigned long nr_segs)
+			     struct iov_iter *iter, loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct address_space *mapping = file->f_mapping;
@@ -203,7 +202,7 @@ static ssize_t fat_direct_IO(int rw, struct kiocb *iocb,
 		 *
 		 * Return 0, and fallback to normal buffered write.
 		 */
-		loff_t size = offset + iov_length(iov, nr_segs);
+		loff_t size = offset + iov_iter_count(iter);
 		if (MSDOS_I(inode)->mmu_private < size)
 			return 0;
 	}
@@ -212,10 +211,9 @@ static ssize_t fat_direct_IO(int rw, struct kiocb *iocb,
 	 * FAT need to use the DIO_LOCKING for avoiding the race
 	 * condition of fat_get_block() and ->truncate().
 	 */
-	ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
-				 fat_get_block);
+	ret = blockdev_direct_IO(rw, iocb, inode, iter, offset, fat_get_block);
 	if (ret < 0 && (rw & WRITE))
-		fat_write_failed(mapping, offset + iov_length(iov, nr_segs));
+		fat_write_failed(mapping, offset + iov_iter_count(iter));
 
 	return ret;
 }
diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c
index aef34b1..014ccc5 100644
--- a/fs/fuse/cuse.c
+++ b/fs/fuse/cuse.c
@@ -94,8 +94,11 @@ static ssize_t cuse_read(struct file *file, char __user *buf, size_t count,
 	loff_t pos = 0;
 	struct iovec iov = { .iov_base = buf, .iov_len = count };
 	struct fuse_io_priv io = { .async = 0, .file = file };
+	struct iov_iter ii;
 
-	return fuse_direct_io(&io, &iov, 1, count, &pos, 0);
+	iov_iter_init(&ii, &iov, 1, count, 0);
+
+	return fuse_direct_io(&io, &ii, count, &pos, 0);
 }
 
 static ssize_t cuse_write(struct file *file, const char __user *buf,
@@ -104,12 +107,15 @@ static ssize_t cuse_write(struct file *file, const char __user *buf,
 	loff_t pos = 0;
 	struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = count };
 	struct fuse_io_priv io = { .async = 0, .file = file };
+	struct iov_iter ii;
+
+	iov_iter_init(&ii, &iov, 1, count, 0);
 
 	/*
 	 * No locking or generic_write_checks(), the server is
 	 * responsible for locking and sanity checks.
 	 */
-	return fuse_direct_io(&io, &iov, 1, count, &pos, 1);
+	return fuse_direct_io(&io, &ii, count, &pos, 1);
 }
 
 static int cuse_open(struct inode *inode, struct file *file)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 77865d1..d429c01 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1264,9 +1264,8 @@ static inline int fuse_iter_npages(const struct iov_iter *ii_p)
 	return min(npages, FUSE_MAX_PAGES_PER_REQ);
 }
 
-ssize_t fuse_direct_io(struct fuse_io_priv *io, const struct iovec *iov,
-		       unsigned long nr_segs, size_t count, loff_t *ppos,
-		       int write)
+ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *ii,
+		       size_t count, loff_t *ppos, int write)
 {
 	struct file *file = io->file;
 	struct fuse_file *ff = file->private_data;
@@ -1275,14 +1274,11 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, const struct iovec *iov,
 	loff_t pos = *ppos;
 	ssize_t res = 0;
 	struct fuse_req *req;
-	struct iov_iter ii;
-
-	iov_iter_init(&ii, iov, nr_segs, count, 0);
 
 	if (io->async)
-		req = fuse_get_req_for_background(fc, fuse_iter_npages(&ii));
+		req = fuse_get_req_for_background(fc, fuse_iter_npages(ii));
 	else
-		req = fuse_get_req(fc, fuse_iter_npages(&ii));
+		req = fuse_get_req(fc, fuse_iter_npages(ii));
 	if (IS_ERR(req))
 		return PTR_ERR(req);
 
@@ -1290,7 +1286,7 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, const struct iovec *iov,
 		size_t nres;
 		fl_owner_t owner = current->files;
 		size_t nbytes = min(count, nmax);
-		int err = fuse_get_user_pages(req, &ii, &nbytes, write);
+		int err = fuse_get_user_pages(req, ii, &nbytes, write);
 		if (err) {
 			res = err;
 			break;
@@ -1320,9 +1316,9 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, const struct iovec *iov,
 			fuse_put_request(fc, req);
 			if (io->async)
 				req = fuse_get_req_for_background(fc,
-					fuse_iter_npages(&ii));
+					fuse_iter_npages(ii));
 			else
-				req = fuse_get_req(fc, fuse_iter_npages(&ii));
+				req = fuse_get_req(fc, fuse_iter_npages(ii));
 			if (IS_ERR(req))
 				break;
 		}
@@ -1336,10 +1332,8 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, const struct iovec *iov,
 }
 EXPORT_SYMBOL_GPL(fuse_direct_io);
 
-static ssize_t __fuse_direct_read(struct fuse_io_priv *io,
-				  const struct iovec *iov,
-				  unsigned long nr_segs, loff_t *ppos,
-				  size_t count)
+static ssize_t __fuse_direct_read(struct fuse_io_priv *io, struct iov_iter *ii,
+				  loff_t *ppos, size_t count)
 {
 	ssize_t res;
 	struct file *file = io->file;
@@ -1348,7 +1342,7 @@ static ssize_t __fuse_direct_read(struct fuse_io_priv *io,
 	if (is_bad_inode(inode))
 		return -EIO;
 
-	res = fuse_direct_io(io, iov, nr_segs, count, ppos, 0);
+	res = fuse_direct_io(io, ii, count, ppos, 0);
 
 	fuse_invalidate_attr(inode);
 
@@ -1360,21 +1354,24 @@ static ssize_t fuse_direct_read(struct file *file, char __user *buf,
 {
 	struct fuse_io_priv io = { .async = 0, .file = file };
 	struct iovec iov = { .iov_base = buf, .iov_len = count };
-	return __fuse_direct_read(&io, &iov, 1, ppos, count);
+	struct iov_iter ii;
+
+	iov_iter_init(&ii, &iov, 1, count, 0);
+
+	return __fuse_direct_read(&io, &ii, ppos, count);
 }
 
-static ssize_t __fuse_direct_write(struct fuse_io_priv *io,
-				   const struct iovec *iov,
-				   unsigned long nr_segs, loff_t *ppos)
+static ssize_t __fuse_direct_write(struct fuse_io_priv *io, struct iov_iter *ii,
+				   loff_t *ppos)
 {
 	struct file *file = io->file;
 	struct inode *inode = file_inode(file);
-	size_t count = iov_length(iov, nr_segs);
+	size_t count = iov_iter_count(ii);
 	ssize_t res;
 
 	res = generic_write_checks(file, ppos, &count, 0);
 	if (!res)
-		res = fuse_direct_io(io, iov, nr_segs, count, ppos, 1);
+		res = fuse_direct_io(io, ii, count, ppos, 1);
 
 	fuse_invalidate_attr(inode);
 
@@ -1385,6 +1382,7 @@ static ssize_t fuse_direct_write(struct file *file, const char __user *buf,
 				 size_t count, loff_t *ppos)
 {
 	struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = count };
+	struct iov_iter ii;
 	struct inode *inode = file_inode(file);
 	ssize_t res;
 	struct fuse_io_priv io = { .async = 0, .file = file };
@@ -1392,9 +1390,11 @@ static ssize_t fuse_direct_write(struct file *file, const char __user *buf,
 	if (is_bad_inode(inode))
 		return -EIO;
 
+	iov_iter_init(&ii, &iov, 1, count, 0);
+
 	/* Don't allow parallel writes to the same file */
 	mutex_lock(&inode->i_mutex);
-	res = __fuse_direct_write(&io, &iov, 1, ppos);
+	res = __fuse_direct_write(&io, &ii, ppos);
 	if (res > 0)
 		fuse_write_update_size(inode, *ppos);
 	mutex_unlock(&inode->i_mutex);
@@ -2366,8 +2366,8 @@ static inline loff_t fuse_round_up(loff_t off)
 }
 
 static ssize_t
-fuse_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
-			loff_t offset, unsigned long nr_segs)
+fuse_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *ii,
+			loff_t offset)
 {
 	ssize_t ret = 0;
 	struct file *file = iocb->ki_filp;
@@ -2376,7 +2376,7 @@ fuse_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
 	loff_t pos = 0;
 	struct inode *inode;
 	loff_t i_size;
-	size_t count = iov_length(iov, nr_segs);
+	size_t count = iov_iter_count(ii);
 	struct fuse_io_priv *io;
 
 	pos = offset;
@@ -2417,9 +2417,9 @@ fuse_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
 		io->async = false;
 
 	if (rw == WRITE)
-		ret = __fuse_direct_write(io, iov, nr_segs, &pos);
+		ret = __fuse_direct_write(io, ii, &pos);
 	else
-		ret = __fuse_direct_read(io, iov, nr_segs, &pos, count);
+		ret = __fuse_direct_read(io, ii, &pos, count);
 
 	if (io->async) {
 		fuse_aio_complete(io, ret < 0 ? ret : 0, -1);
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index fde7249..dacffcb 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -854,9 +854,8 @@ int fuse_reverse_inval_entry(struct super_block *sb, u64 parent_nodeid,
 
 int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file,
 		 bool isdir);
-ssize_t fuse_direct_io(struct fuse_io_priv *io, const struct iovec *iov,
-		       unsigned long nr_segs, size_t count, loff_t *ppos,
-		       int write);
+ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *ii,
+		       size_t count, loff_t *ppos, int write);
 long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg,
 		   unsigned int flags);
 long fuse_ioctl_common(struct file *file, unsigned int cmd,
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index ee48ad3..733e94a 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -1001,8 +1001,7 @@ static int gfs2_ok_for_dio(struct gfs2_inode *ip, int rw, loff_t offset)
 
 
 static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb,
-			      const struct iovec *iov, loff_t offset,
-			      unsigned long nr_segs)
+			      struct iov_iter *iter, loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_mapping->host;
@@ -1026,8 +1025,8 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb,
 	if (rv != 1)
 		goto out; /* dio not valid, fall back to buffered i/o */
 
-	rv = __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
-				  offset, nr_segs, gfs2_get_block_direct,
+	rv = __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iter,
+				  offset, gfs2_get_block_direct,
 				  NULL, NULL, 0);
 out:
 	gfs2_glock_dq(&gh);
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c
index f9299d8..62440ce 100644
--- a/fs/hfs/inode.c
+++ b/fs/hfs/inode.c
@@ -125,15 +125,14 @@ static int hfs_releasepage(struct page *page, gfp_t mask)
 }
 
 static ssize_t hfs_direct_IO(int rw, struct kiocb *iocb,
-		const struct iovec *iov, loff_t offset, unsigned long nr_segs)
+		struct iov_iter *iter, loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct address_space *mapping = file->f_mapping;
 	struct inode *inode = file_inode(file)->i_mapping->host;
 	ssize_t ret;
 
-	ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
-				 hfs_get_block);
+	ret = blockdev_direct_IO(rw, iocb, inode, iter, offset, hfs_get_block);
 
 	/*
 	 * In case of error extending write may have instantiated a few
@@ -141,7 +140,7 @@ static ssize_t hfs_direct_IO(int rw, struct kiocb *iocb,
 	 */
 	if (unlikely((rw & WRITE) && ret < 0)) {
 		loff_t isize = i_size_read(inode);
-		loff_t end = offset + iov_length(iov, nr_segs);
+		loff_t end = offset + iov_iter_count(iter);
 
 		if (end > isize)
 			hfs_write_failed(mapping, end);
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
index f833d35..fca99cc 100644
--- a/fs/hfsplus/inode.c
+++ b/fs/hfsplus/inode.c
@@ -122,14 +122,14 @@ static int hfsplus_releasepage(struct page *page, gfp_t mask)
 }
 
 static ssize_t hfsplus_direct_IO(int rw, struct kiocb *iocb,
-		const struct iovec *iov, loff_t offset, unsigned long nr_segs)
+		struct iov_iter *iter, loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct address_space *mapping = file->f_mapping;
 	struct inode *inode = file_inode(file)->i_mapping->host;
 	ssize_t ret;
 
-	ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
+	ret = blockdev_direct_IO(rw, iocb, inode, iter, offset,
 				 hfsplus_get_block);
 
 	/*
@@ -138,7 +138,7 @@ static ssize_t hfsplus_direct_IO(int rw, struct kiocb *iocb,
 	 */
 	if (unlikely((rw & WRITE) && ret < 0)) {
 		loff_t isize = i_size_read(inode);
-		loff_t end = offset + iov_length(iov, nr_segs);
+		loff_t end = offset + iov_iter_count(iter);
 
 		if (end > isize)
 			hfsplus_write_failed(mapping, end);
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
index 730f24e..0a0453a 100644
--- a/fs/jfs/inode.c
+++ b/fs/jfs/inode.c
@@ -331,15 +331,14 @@ static sector_t jfs_bmap(struct address_space *mapping, sector_t block)
 }
 
 static ssize_t jfs_direct_IO(int rw, struct kiocb *iocb,
-	const struct iovec *iov, loff_t offset, unsigned long nr_segs)
+			     struct iov_iter *iter, loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct address_space *mapping = file->f_mapping;
 	struct inode *inode = file->f_mapping->host;
 	ssize_t ret;
 
-	ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
-				 jfs_get_block);
+	ret = blockdev_direct_IO(rw, iocb, inode, iter, offset, jfs_get_block);
 
 	/*
 	 * In case of error extending write may have instantiated a few
@@ -347,7 +346,7 @@ static ssize_t jfs_direct_IO(int rw, struct kiocb *iocb,
 	 */
 	if (unlikely((rw & WRITE) && ret < 0)) {
 		loff_t isize = i_size_read(inode);
-		loff_t end = offset + iov_length(iov, nr_segs);
+		loff_t end = offset + iov_iter_count(iter);
 
 		if (end > isize)
 			jfs_write_failed(mapping, end);
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 0bd7a55..bceb47e 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -112,7 +112,7 @@ static inline int put_dreq(struct nfs_direct_req *dreq)
  * nfs_direct_IO - NFS address space operation for direct I/O
  * @rw: direction (read or write)
  * @iocb: target I/O control block
- * @iov: array of vectors that define I/O buffer
+ * @iter: array of vectors that define I/O buffer
  * @pos: offset in file to begin the operation
  * @nr_segs: size of iovec array
  *
@@ -121,22 +121,25 @@ static inline int put_dreq(struct nfs_direct_req *dreq)
  * shunt off direct read and write requests before the VFS gets them,
  * so this method is only ever called for swap.
  */
-ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t pos, unsigned long nr_segs)
+ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
+		      loff_t pos)
 {
 #ifndef CONFIG_NFS_SWAP
 	dprintk("NFS: nfs_direct_IO (%s) off/no(%Ld/%lu) EINVAL\n",
 			iocb->ki_filp->f_path.dentry->d_name.name,
-			(long long) pos, nr_segs);
+			(long long) pos, iter->nr_segs);
 
 	return -EINVAL;
 #else
+	const struct iovec *iov = iov_iter_iovec(iter);
+
 	VM_BUG_ON(iocb->ki_left != PAGE_SIZE);
 	VM_BUG_ON(iocb->ki_nbytes != PAGE_SIZE);
 
 	if (rw == READ || rw == KERNEL_READ)
-		return nfs_file_direct_read(iocb, iov, nr_segs, pos,
+		return nfs_file_direct_read(iocb, iov, iter->nr_segs, pos,
 				rw == READ ? true : false);
-	return nfs_file_direct_write(iocb, iov, nr_segs, pos,
+	return nfs_file_direct_write(iocb, iov, iter->nr_segs, pos,
 				rw == WRITE ? true : false);
 #endif /* CONFIG_NFS_SWAP */
 }
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
index b1a5277..059b760 100644
--- a/fs/nilfs2/inode.c
+++ b/fs/nilfs2/inode.c
@@ -298,8 +298,8 @@ static int nilfs_write_end(struct file *file, struct address_space *mapping,
 }
 
 static ssize_t
-nilfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
-		loff_t offset, unsigned long nr_segs)
+nilfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
+		loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct address_space *mapping = file->f_mapping;
@@ -310,7 +310,7 @@ nilfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
 		return 0;
 
 	/* Needs synchronization with the cleaner */
-	size = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
+	size = blockdev_direct_IO(rw, iocb, inode, iter, offset,
 				  nilfs_get_block);
 
 	/*
@@ -319,7 +319,7 @@ nilfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
 	 */
 	if (unlikely((rw & WRITE) && size < 0)) {
 		loff_t isize = i_size_read(inode);
-		loff_t end = offset + iov_length(iov, nr_segs);
+		loff_t end = offset + iov_iter_count(iter);
 
 		if (end > isize)
 			nilfs_write_failed(mapping, end);
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 79736a2..b5217d9 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -622,9 +622,8 @@ static int ocfs2_releasepage(struct page *page, gfp_t wait)
 
 static ssize_t ocfs2_direct_IO(int rw,
 			       struct kiocb *iocb,
-			       const struct iovec *iov,
-			       loff_t offset,
-			       unsigned long nr_segs)
+			       struct iov_iter *iter,
+			       loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = file_inode(file)->i_mapping->host;
@@ -641,8 +640,7 @@ static ssize_t ocfs2_direct_IO(int rw,
 		return 0;
 
 	return __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev,
-				    iov, offset, nr_segs,
-				    ocfs2_direct_IO_get_blocks,
+				    iter, offset, ocfs2_direct_IO_get_blocks,
 				    ocfs2_dio_end_io, NULL, 0);
 }
 
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 0048cc1..9507e17 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -3079,14 +3079,13 @@ static int reiserfs_releasepage(struct page *page, gfp_t unused_gfp_flags)
 /* We thank Mingming Cao for helping us understand in great detail what
    to do in this section of the code. */
 static ssize_t reiserfs_direct_IO(int rw, struct kiocb *iocb,
-				  const struct iovec *iov, loff_t offset,
-				  unsigned long nr_segs)
+				  struct iov_iter *iter, loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_mapping->host;
 	ssize_t ret;
 
-	ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
+	ret = blockdev_direct_IO(rw, iocb, inode, iter, offset,
 				  reiserfs_get_blocks_direct_io);
 
 	/*
@@ -3095,7 +3094,7 @@ static ssize_t reiserfs_direct_IO(int rw, struct kiocb *iocb,
 	 */
 	if (unlikely((rw & WRITE) && ret < 0)) {
 		loff_t isize = i_size_read(inode);
-		loff_t end = offset + iov_length(iov, nr_segs);
+		loff_t end = offset + iov_iter_count(iter);
 
 		if ((end > isize) && inode_newsize_ok(inode, isize) == 0) {
 			truncate_setsize(inode, isize);
diff --git a/fs/udf/file.c b/fs/udf/file.c
index 29569dd..339df8b 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -119,8 +119,7 @@ static int udf_adinicb_write_end(struct file *file,
 }
 
 static ssize_t udf_adinicb_direct_IO(int rw, struct kiocb *iocb,
-				     const struct iovec *iov,
-				     loff_t offset, unsigned long nr_segs)
+				     struct iov_iter *iter, loff_t offset)
 {
 	/* Fallback to buffered I/O. */
 	return 0;
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index b6d15d3..fad32d5 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -216,19 +216,17 @@ static int udf_write_begin(struct file *file, struct address_space *mapping,
 	return ret;
 }
 
-static ssize_t udf_direct_IO(int rw, struct kiocb *iocb,
-			     const struct iovec *iov,
-			     loff_t offset, unsigned long nr_segs)
+static ssize_t udf_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
+			     loff_t offset)
 {
 	struct file *file = iocb->ki_filp;
 	struct address_space *mapping = file->f_mapping;
 	struct inode *inode = mapping->host;
 	ssize_t ret;
 
-	ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
-				  udf_get_block);
+	ret = blockdev_direct_IO(rw, iocb, inode, iter, offset, udf_get_block);
 	if (unlikely(ret < 0 && (rw & WRITE)))
-		udf_write_failed(mapping, offset + iov_length(iov, nr_segs));
+		udf_write_failed(mapping, offset + iov_iter_count(iter));
 	return ret;
 }
 
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 596ec71..4568b6e 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -1431,9 +1431,8 @@ STATIC ssize_t
 xfs_vm_direct_IO(
 	int			rw,
 	struct kiocb		*iocb,
-	const struct iovec	*iov,
-	loff_t			offset,
-	unsigned long		nr_segs)
+	struct iov_iter		*iter,
+	loff_t			offset)
 {
 	struct inode		*inode = iocb->ki_filp->f_mapping->host;
 	struct block_device	*bdev = xfs_find_bdev_for_inode(inode);
@@ -1441,7 +1440,7 @@ xfs_vm_direct_IO(
 	ssize_t			ret;
 
 	if (rw & WRITE) {
-		size_t size = iov_length(iov, nr_segs);
+		size_t size = iov_iter_count(iter);
 
 		/*
 		 * We cannot preallocate a size update transaction here as we
@@ -1453,15 +1452,13 @@ xfs_vm_direct_IO(
 		if (offset + size > XFS_I(inode)->i_d.di_size)
 			ioend->io_isdirect = 1;
 
-		ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iov,
-					    offset, nr_segs,
+		ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iter, offset,
 					    xfs_get_blocks_direct,
 					    xfs_end_io_direct_write, NULL, 0);
 		if (ret != -EIOCBQUEUED && iocb->private)
 			goto out_destroy_ioend;
 	} else {
-		ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iov,
-					    offset, nr_segs,
+		ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iter, offset,
 					    xfs_get_blocks_direct,
 					    NULL, NULL, 0);
 	}
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 322d585..2ddd8e3 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -462,8 +462,8 @@ struct address_space_operations {
 	void (*invalidatepage) (struct page *, unsigned int, unsigned int);
 	int (*releasepage) (struct page *, gfp_t);
 	void (*freepage)(struct page *);
-	ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
-			loff_t offset, unsigned long nr_segs);
+	ssize_t (*direct_IO)(int, struct kiocb *, struct iov_iter *iter,
+			loff_t offset);
 	int (*get_xip_mem)(struct address_space *, pgoff_t, int,
 						void **, unsigned long *);
 	/*
@@ -2562,16 +2562,16 @@ enum {
 void dio_end_io(struct bio *bio, int error);
 
 ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
-	struct block_device *bdev, const struct iovec *iov, loff_t offset,
-	unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
-	dio_submit_t submit_io,	int flags);
+	struct block_device *bdev, struct iov_iter *iter, loff_t offset,
+	get_block_t get_block, dio_iodone_t end_io, dio_submit_t submit_io,
+	int flags);
 
 static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
-		struct inode *inode, const struct iovec *iov, loff_t offset,
-		unsigned long nr_segs, get_block_t get_block)
+		struct inode *inode, struct iov_iter *iter, loff_t offset,
+		get_block_t get_block)
 {
-	return __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
-				    offset, nr_segs, get_block, NULL, NULL,
+	return __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iter,
+				    offset, get_block, NULL, NULL,
 				    DIO_LOCKING | DIO_SKIP_HOLES);
 }
 #endif
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 7125cef..a4b19d2 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -457,8 +457,7 @@ extern int nfs3_removexattr (struct dentry *, const char *name);
 /*
  * linux/fs/nfs/direct.c
  */
-extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t,
-			unsigned long);
+extern ssize_t nfs_direct_IO(int, struct kiocb *, struct iov_iter *, loff_t);
 extern ssize_t nfs_file_direct_read(struct kiocb *iocb,
 			const struct iovec *iov, unsigned long nr_segs,
 			loff_t pos, bool uio);
diff --git a/mm/filemap.c b/mm/filemap.c
index 11ebe36..e140e38 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1427,11 +1427,15 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
 			goto out; /* skip atime */
 		size = i_size_read(inode);
 		if (pos < size) {
+			size_t bytes = iov_length(iov, nr_segs);
 			retval = filemap_write_and_wait_range(mapping, pos,
-					pos + iov_length(iov, nr_segs) - 1);
+					pos + bytes - 1);
 			if (!retval) {
+				struct iov_iter iter;
+
+				iov_iter_init(&iter, iov, nr_segs, bytes, 0);
 				retval = mapping->a_ops->direct_IO(READ, iocb,
-							iov, pos, nr_segs);
+							&iter, pos);
 			}
 			if (retval > 0) {
 				*ppos = pos + retval;
@@ -2056,6 +2060,7 @@ generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
 	ssize_t		written;
 	size_t		write_len;
 	pgoff_t		end;
+	struct iov_iter iter;
 
 	if (count != ocount)
 		*nr_segs = iov_shorten((struct iovec *)iov, *nr_segs, count);
@@ -2087,7 +2092,9 @@ generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
 		}
 	}
 
-	written = mapping->a_ops->direct_IO(WRITE, iocb, iov, pos, *nr_segs);
+	iov_iter_init(&iter, iov, *nr_segs, write_len, 0);
+
+	written = mapping->a_ops->direct_IO(WRITE, iocb, &iter, pos);
 
 	/*
 	 * Finally, try again to invalidate clean pages which might have been
diff --git a/mm/page_io.c b/mm/page_io.c
index ba05b64..0c1db1a 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -263,6 +263,9 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
 			.iov_base = kmap(page),
 			.iov_len  = PAGE_SIZE,
 		};
+		struct iov_iter iter;
+
+		iov_iter_init(&iter, &iov, 1, PAGE_SIZE, 0);
 
 		init_sync_kiocb(&kiocb, swap_file);
 		kiocb.ki_pos = page_file_offset(page);
@@ -271,9 +274,8 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
 
 		set_page_writeback(page);
 		unlock_page(page);
-		ret = mapping->a_ops->direct_IO(KERNEL_WRITE,
-						&kiocb, &iov,
-						kiocb.ki_pos, 1);
+		ret = mapping->a_ops->direct_IO(KERNEL_WRITE, &kiocb, &iter,
+						kiocb.ki_pos);
 		kunmap(page);
 		if (ret == PAGE_SIZE) {
 			count_vm_event(PSWPOUT);
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 12/33] dio: add bio_vec support to __blockdev_direct_IO()
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (10 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 11/33] dio: Convert direct_IO to use iov_iter Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 13/33] fs: pull iov_iter use higher up the stack Dave Kleikamp
                   ` (25 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

The trick here is to initialize the dio state so that do_direct_IO()
consumes the pages we provide and never tries to map user pages.  This
is done by making sure that final_block_in_request covers the page that
we set in the dio.  do_direct_IO() will return before running out of
pages.

The caller is responsible for dirtying these pages, if needed.  We add
an option to the dio struct that makes sure we only dirty pages when
we're operating on iovecs of user addresses.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
---
 fs/direct-io.c | 206 +++++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 148 insertions(+), 58 deletions(-)

diff --git a/fs/direct-io.c b/fs/direct-io.c
index a81366c..75a3989 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -127,6 +127,7 @@ struct dio {
 	spinlock_t bio_lock;		/* protects BIO fields below */
 	int page_errors;		/* errno from get_user_pages() */
 	int is_async;			/* is IO async ? */
+	int should_dirty;		/* should we mark read pages dirty? */
 	int io_error;			/* IO error in completion path */
 	unsigned long refcount;		/* direct_io_worker() and bios */
 	struct bio *bio_list;		/* singly linked via bi_private */
@@ -377,7 +378,7 @@ static inline void dio_bio_submit(struct dio *dio, struct dio_submit *sdio)
 	dio->refcount++;
 	spin_unlock_irqrestore(&dio->bio_lock, flags);
 
-	if (dio->is_async && dio->rw == READ)
+	if (dio->is_async && dio->rw == READ && dio->should_dirty)
 		bio_set_pages_dirty(bio);
 
 	if (sdio->submit_io)
@@ -448,13 +449,14 @@ static int dio_bio_complete(struct dio *dio, struct bio *bio)
 	if (!uptodate)
 		dio->io_error = -EIO;
 
-	if (dio->is_async && dio->rw == READ) {
+	if (dio->is_async && dio->rw == READ && dio->should_dirty) {
 		bio_check_pages_dirty(bio);	/* transfers ownership */
 	} else {
 		bio_for_each_segment_all(bvec, bio, i) {
 			struct page *page = bvec->bv_page;
 
-			if (dio->rw == READ && !PageCompound(page))
+			if (dio->rw == READ && !PageCompound(page) &&
+			    dio->should_dirty)
 				set_page_dirty_lock(page);
 			page_cache_release(page);
 		}
@@ -1016,6 +1018,101 @@ static inline int drop_refcount(struct dio *dio)
 	return ret2;
 }
 
+static ssize_t direct_IO_iovec(const struct iovec *iov, unsigned long nr_segs,
+			       struct dio *dio, struct dio_submit *sdio,
+			       unsigned blkbits, struct buffer_head *map_bh)
+{
+	size_t bytes;
+	ssize_t retval = 0;
+	int seg;
+	unsigned long user_addr;
+
+	for (seg = 0; seg < nr_segs; seg++) {
+		user_addr = (unsigned long)iov[seg].iov_base;
+		sdio->pages_in_io +=
+			((user_addr + iov[seg].iov_len + PAGE_SIZE-1) /
+				PAGE_SIZE - user_addr / PAGE_SIZE);
+	}
+
+	dio->should_dirty = 1;
+
+	for (seg = 0; seg < nr_segs; seg++) {
+		user_addr = (unsigned long)iov[seg].iov_base;
+		sdio->size += bytes = iov[seg].iov_len;
+
+		/* Index into the first page of the first block */
+		sdio->first_block_in_page = (user_addr & ~PAGE_MASK) >> blkbits;
+		sdio->final_block_in_request = sdio->block_in_file +
+						(bytes >> blkbits);
+		/* Page fetching state */
+		sdio->head = 0;
+		sdio->tail = 0;
+		sdio->curr_page = 0;
+
+		sdio->total_pages = 0;
+		if (user_addr & (PAGE_SIZE-1)) {
+			sdio->total_pages++;
+			bytes -= PAGE_SIZE - (user_addr & (PAGE_SIZE - 1));
+		}
+		sdio->total_pages += (bytes + PAGE_SIZE - 1) / PAGE_SIZE;
+		sdio->curr_user_address = user_addr;
+
+		retval = do_direct_IO(dio, sdio, map_bh);
+
+		dio->result += iov[seg].iov_len -
+			((sdio->final_block_in_request - sdio->block_in_file) <<
+					blkbits);
+
+		if (retval) {
+			dio_cleanup(dio, sdio);
+			break;
+		}
+	} /* end iovec loop */
+
+	return retval;
+}
+
+static ssize_t direct_IO_bvec(struct bio_vec *bvec, unsigned long nr_segs,
+			      struct dio *dio, struct dio_submit *sdio,
+			      unsigned blkbits, struct buffer_head *map_bh)
+{
+	ssize_t retval = 0;
+	int seg;
+
+	sdio->pages_in_io += nr_segs;
+
+	for (seg = 0; seg < nr_segs; seg++) {
+		sdio->size += bvec[seg].bv_len;
+
+		/* Index into the first page of the first block */
+		sdio->first_block_in_page = bvec[seg].bv_offset >> blkbits;
+		sdio->final_block_in_request = sdio->block_in_file +
+						(bvec[seg].bv_len  >> blkbits);
+		/* Page fetching state */
+		sdio->curr_page = 0;
+		page_cache_get(bvec[seg].bv_page);
+		dio->pages[0] = bvec[seg].bv_page;
+		sdio->head = 0;
+		sdio->tail = 1;
+
+		sdio->total_pages = 1;
+		sdio->curr_user_address = 0;
+
+		retval = do_direct_IO(dio, sdio, map_bh);
+
+		dio->result += bvec[seg].bv_len -
+			((sdio->final_block_in_request - sdio->block_in_file) <<
+					blkbits);
+
+		if (retval) {
+			dio_cleanup(dio, sdio);
+			break;
+		}
+	}
+
+	return retval;
+}
+
 /*
  * This is a library function for use by filesystem drivers.
  *
@@ -1057,11 +1154,8 @@ do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
 	loff_t end = offset;
 	struct dio *dio;
 	struct dio_submit sdio = { 0, };
-	unsigned long user_addr;
-	size_t bytes;
 	struct buffer_head map_bh = { 0, };
 	struct blk_plug plug;
-	const struct iovec *iov = iov_iter_iovec(iter);
 	unsigned long nr_segs = iter->nr_segs;
 
 	if (rw & WRITE)
@@ -1081,20 +1175,49 @@ do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
 	}
 
 	/* Check the memory alignment.  Blocks cannot straddle pages */
-	for (seg = 0; seg < nr_segs; seg++) {
-		addr = (unsigned long)iov[seg].iov_base;
-		size = iov[seg].iov_len;
-		end += size;
-		if (unlikely((addr & blocksize_mask) ||
-			     (size & blocksize_mask))) {
-			if (bdev)
-				blkbits = blksize_bits(
-					 bdev_logical_block_size(bdev));
-			blocksize_mask = (1 << blkbits) - 1;
-			if ((addr & blocksize_mask) || (size & blocksize_mask))
-				goto out;
+	if (iov_iter_has_iovec(iter)) {
+		const struct iovec *iov = iov_iter_iovec(iter);
+
+		for (seg = 0; seg < nr_segs; seg++) {
+			addr = (unsigned long)iov[seg].iov_base;
+			size = iov[seg].iov_len;
+			end += size;
+			if (unlikely((addr & blocksize_mask) ||
+				     (size & blocksize_mask))) {
+				if (bdev)
+					blkbits = blksize_bits(
+						 bdev_logical_block_size(bdev));
+				blocksize_mask = (1 << blkbits) - 1;
+				if ((addr & blocksize_mask) ||
+				    (size & blocksize_mask))
+					goto out;
+			}
 		}
-	}
+	} else if (iov_iter_has_bvec(iter)) {
+		/*
+		 * Is this necessary, or can we trust the in-kernel
+		 * caller? Can we replace this with
+		 *	end += iov_iter_count(iter); ?
+		 */
+		struct bio_vec *bvec = iov_iter_bvec(iter);
+
+		for (seg = 0; seg < nr_segs; seg++) {
+			addr = bvec[seg].bv_offset;
+			size = bvec[seg].bv_len;
+			end += size;
+			if (unlikely((addr & blocksize_mask) ||
+				     (size & blocksize_mask))) {
+				if (bdev)
+					blkbits = blksize_bits(
+						 bdev_logical_block_size(bdev));
+				blocksize_mask = (1 << blkbits) - 1;
+				if ((addr & blocksize_mask) ||
+				    (size & blocksize_mask))
+					goto out;
+			}
+		}
+	} else
+		BUG();
 
 	/* watch out for a 0 len io from a tricksy fs */
 	if (rw == READ && end == offset)
@@ -1171,47 +1294,14 @@ do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
 	if (unlikely(sdio.blkfactor))
 		sdio.pages_in_io = 2;
 
-	for (seg = 0; seg < nr_segs; seg++) {
-		user_addr = (unsigned long)iov[seg].iov_base;
-		sdio.pages_in_io +=
-			((user_addr + iov[seg].iov_len + PAGE_SIZE-1) /
-				PAGE_SIZE - user_addr / PAGE_SIZE);
-	}
-
 	blk_start_plug(&plug);
 
-	for (seg = 0; seg < nr_segs; seg++) {
-		user_addr = (unsigned long)iov[seg].iov_base;
-		sdio.size += bytes = iov[seg].iov_len;
-
-		/* Index into the first page of the first block */
-		sdio.first_block_in_page = (user_addr & ~PAGE_MASK) >> blkbits;
-		sdio.final_block_in_request = sdio.block_in_file +
-						(bytes >> blkbits);
-		/* Page fetching state */
-		sdio.head = 0;
-		sdio.tail = 0;
-		sdio.curr_page = 0;
-
-		sdio.total_pages = 0;
-		if (user_addr & (PAGE_SIZE-1)) {
-			sdio.total_pages++;
-			bytes -= PAGE_SIZE - (user_addr & (PAGE_SIZE - 1));
-		}
-		sdio.total_pages += (bytes + PAGE_SIZE - 1) / PAGE_SIZE;
-		sdio.curr_user_address = user_addr;
-
-		retval = do_direct_IO(dio, &sdio, &map_bh);
-
-		dio->result += iov[seg].iov_len -
-			((sdio.final_block_in_request - sdio.block_in_file) <<
-					blkbits);
-
-		if (retval) {
-			dio_cleanup(dio, &sdio);
-			break;
-		}
-	} /* end iovec loop */
+	if (iov_iter_has_iovec(iter))
+		retval = direct_IO_iovec(iov_iter_iovec(iter), nr_segs, dio,
+					 &sdio, blkbits, &map_bh);
+	else
+		retval = direct_IO_bvec(iov_iter_bvec(iter), nr_segs, dio,
+					&sdio, blkbits, &map_bh);
 
 	if (retval == -ENOTBLK) {
 		/*
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 13/33] fs: pull iov_iter use higher up the stack
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (11 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 12/33] dio: add bio_vec support to __blockdev_direct_IO() Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 14/33] aio: add aio_kernel_() interface Dave Kleikamp
                   ` (24 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

From: Zach Brown <zab@zabbo.net>

Right now only callers of generic_perform_write() pack their iovec
arguments into an iov_iter structure.  All the callers higher up in the
stack work on raw iovec arguments.

This patch introduces the use of the iov_iter abstraction higher up the
stack.  Private generic path functions are changed to operation on
iov_iter instead of on raw iovecs.  Exported interfaces that take iovecs
immediately pack their arguments into an iov_iter and call into the
shared functions.

File operation struct functions are added with iov_iter as an argument
so that callers to the generic file system functions can specify
abstract memory rather than iovec arrays only.

Almost all of this patch only transforms arguments and shouldn't change
functionality.  The buffered read path is the exception.  We add a
read_actor function which uses the iov_iter helper functions instead of
operating on each individual iovec element.  This may improve
performance as the iov_iter helper can copy multiple iovec elements from
one mapped page cache page.

As always, the direct IO path is special.  Sadly, it may still be
cleanest to have it work on the underlying memory structures directly
instead of working through the iov_iter abstraction.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
---
 Documentation/filesystems/Locking |   2 +
 Documentation/filesystems/vfs.txt |   8 ++
 include/linux/fs.h                |  12 ++
 mm/filemap.c                      | 258 +++++++++++++++++++++++++-------------
 4 files changed, 190 insertions(+), 90 deletions(-)

diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index ff1e311..21ef48f 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -426,7 +426,9 @@ prototypes:
 	ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
 	ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
 	ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
+	ssize_t (*read_iter) (struct kiocb *, struct iov_iter *, loff_t);
 	ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
+	ssize_t (*write_iter) (struct kiocb *, struct iov_iter *, loff_t);
 	int (*iterate) (struct file *, struct dir_context *);
 	unsigned int (*poll) (struct file *, struct poll_table_struct *);
 	long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 461bee1..f8749f7 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -790,7 +790,9 @@ struct file_operations {
 	ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
 	ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
 	ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
+	ssize_t (*read_iter) (struct kiocb *, struct iov_iter *, loff_t);
 	ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
+	ssize_t (*write_iter) (struct kiocb *, struct iov_iter *, loff_t);
 	int (*iterate) (struct file *, struct dir_context *);
 	unsigned int (*poll) (struct file *, struct poll_table_struct *);
 	long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
@@ -825,10 +827,16 @@ otherwise noted.
 
   aio_read: called by io_submit(2) and other asynchronous I/O operations
 
+  read_iter: aio_read replacement, called by io_submit(2) and other
+	asynchronous I/O operations
+
   write: called by write(2) and related system calls
 
   aio_write: called by io_submit(2) and other asynchronous I/O operations
 
+  write_iter: aio_write replacement, called by io_submit(2) and other
+	asynchronous I/O operations
+
   iterate: called when the VFS needs to read the directory contents
 
   poll: called by the VFS when a process wants to check if there is
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 2ddd8e3..d716a29 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1625,7 +1625,9 @@ struct file_operations {
 	ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
 	ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
 	ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
+	ssize_t (*read_iter) (struct kiocb *, struct iov_iter *, loff_t);
 	ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
+	ssize_t (*write_iter) (struct kiocb *, struct iov_iter *, loff_t);
 	int (*iterate) (struct file *, struct dir_context *);
 	unsigned int (*poll) (struct file *, struct poll_table_struct *);
 	long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
@@ -2491,13 +2493,23 @@ extern int generic_file_remap_pages(struct vm_area_struct *, unsigned long addr,
 extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
 int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk);
 extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
+extern ssize_t generic_file_read_iter(struct kiocb *, struct iov_iter *,
+		loff_t);
 extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long,
 		loff_t *);
+extern ssize_t __generic_file_write_iter(struct kiocb *, struct iov_iter *,
+		loff_t *);
 extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t);
+extern ssize_t generic_file_write_iter(struct kiocb *, struct iov_iter *,
+		loff_t);
 extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *,
 		unsigned long *, loff_t, loff_t *, size_t, size_t);
+extern ssize_t generic_file_direct_write_iter(struct kiocb *, struct iov_iter *,
+		loff_t, loff_t *, size_t);
 extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *,
 		unsigned long, loff_t, loff_t *, size_t, ssize_t);
+extern ssize_t generic_file_buffered_write_iter(struct kiocb *,
+		struct iov_iter *, loff_t, loff_t *, size_t, ssize_t);
 extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos);
 extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos);
 extern int generic_segment_checks(const struct iovec *iov,
diff --git a/mm/filemap.c b/mm/filemap.c
index e140e38..41b9672 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1390,31 +1390,41 @@ int generic_segment_checks(const struct iovec *iov,
 }
 EXPORT_SYMBOL(generic_segment_checks);
 
+static int file_read_iter_actor(read_descriptor_t *desc, struct page *page,
+				unsigned long offset, unsigned long size)
+{
+	struct iov_iter *iter = desc->arg.data;
+	unsigned long copied = 0;
+
+	if (size > desc->count)
+		size = desc->count;
+
+	copied = __iov_iter_copy_to_user(page, iter, offset, size);
+	if (copied < size)
+		desc->error = -EFAULT;
+
+	iov_iter_advance(iter, copied);
+	desc->count -= copied;
+	desc->written += copied;
+
+	return copied;
+}
+
 /**
- * generic_file_aio_read - generic filesystem read routine
+ * generic_file_read_iter - generic filesystem read routine
  * @iocb:	kernel I/O control block
- * @iov:	io vector request
- * @nr_segs:	number of segments in the iovec
+ * @iter:	memory vector
  * @pos:	current file position
- *
- * This is the "read()" routine for all filesystems
- * that can use the page cache directly.
  */
 ssize_t
-generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
-		unsigned long nr_segs, loff_t pos)
+generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
 {
 	struct file *filp = iocb->ki_filp;
-	ssize_t retval;
-	unsigned long seg = 0;
-	size_t count;
+	read_descriptor_t desc;
+	ssize_t retval = 0;
+	size_t count = iov_iter_count(iter);
 	loff_t *ppos = &iocb->ki_pos;
 
-	count = 0;
-	retval = generic_segment_checks(iov, &nr_segs, &count, VERIFY_WRITE);
-	if (retval)
-		return retval;
-
 	/* coalesce the iovecs and go direct-to-BIO for O_DIRECT */
 	if (filp->f_flags & O_DIRECT) {
 		loff_t size;
@@ -1427,16 +1437,11 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
 			goto out; /* skip atime */
 		size = i_size_read(inode);
 		if (pos < size) {
-			size_t bytes = iov_length(iov, nr_segs);
 			retval = filemap_write_and_wait_range(mapping, pos,
-					pos + bytes - 1);
-			if (!retval) {
-				struct iov_iter iter;
-
-				iov_iter_init(&iter, iov, nr_segs, bytes, 0);
+					pos + count - 1);
+			if (!retval)
 				retval = mapping->a_ops->direct_IO(READ, iocb,
-							&iter, pos);
-			}
+								   iter, pos);
 			if (retval > 0) {
 				*ppos = pos + retval;
 				count -= retval;
@@ -1457,42 +1462,47 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
 		}
 	}
 
-	count = retval;
-	for (seg = 0; seg < nr_segs; seg++) {
-		read_descriptor_t desc;
-		loff_t offset = 0;
-
-		/*
-		 * If we did a short DIO read we need to skip the section of the
-		 * iov that we've already read data into.
-		 */
-		if (count) {
-			if (count > iov[seg].iov_len) {
-				count -= iov[seg].iov_len;
-				continue;
-			}
-			offset = count;
-			count = 0;
-		}
-
-		desc.written = 0;
-		desc.arg.buf = iov[seg].iov_base + offset;
-		desc.count = iov[seg].iov_len - offset;
-		if (desc.count == 0)
-			continue;
-		desc.error = 0;
-		do_generic_file_read(filp, ppos, &desc, file_read_actor);
-		retval += desc.written;
-		if (desc.error) {
-			retval = retval ?: desc.error;
-			break;
-		}
-		if (desc.count > 0)
-			break;
-	}
+	desc.written = 0;
+	desc.arg.data = iter;
+	desc.count = count;
+	desc.error = 0;
+	do_generic_file_read(filp, ppos, &desc, file_read_iter_actor);
+	if (desc.written)
+		retval = desc.written;
+	else
+		retval = desc.error;
 out:
 	return retval;
 }
+EXPORT_SYMBOL(generic_file_read_iter);
+
+/**
+ * generic_file_aio_read - generic filesystem read routine
+ * @iocb:      kernel I/O control block
+ * @iov:       io vector request
+ * @nr_segs:   number of segments in the iovec
+ * @pos:       current file position
+ *
+ * This is the "read()" routine for all filesystems
+ * that can use the page cache directly.
+ */
+ssize_t
+generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
+		unsigned long nr_segs, loff_t pos)
+{
+	struct iov_iter iter;
+	int ret;
+	size_t count;
+
+	count = 0;
+	ret = generic_segment_checks(iov, &nr_segs, &count, VERIFY_WRITE);
+	if (ret)
+		return ret;
+
+	iov_iter_init(&iter, iov, nr_segs, count, 0);
+
+	return generic_file_read_iter(iocb, &iter, pos);
+}
 EXPORT_SYMBOL(generic_file_aio_read);
 
 #ifdef CONFIG_MMU
@@ -2050,9 +2060,8 @@ int pagecache_write_end(struct file *file, struct address_space *mapping,
 EXPORT_SYMBOL(pagecache_write_end);
 
 ssize_t
-generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
-		unsigned long *nr_segs, loff_t pos, loff_t *ppos,
-		size_t count, size_t ocount)
+generic_file_direct_write_iter(struct kiocb *iocb, struct iov_iter *iter,
+		loff_t pos, loff_t *ppos, size_t count)
 {
 	struct file	*file = iocb->ki_filp;
 	struct address_space *mapping = file->f_mapping;
@@ -2060,12 +2069,14 @@ generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
 	ssize_t		written;
 	size_t		write_len;
 	pgoff_t		end;
-	struct iov_iter iter;
 
-	if (count != ocount)
-		*nr_segs = iov_shorten((struct iovec *)iov, *nr_segs, count);
+	if (count != iov_iter_count(iter)) {
+		written = iov_iter_shorten(iter, count);
+		if (written)
+			goto out;
+	}
 
-	write_len = iov_length(iov, *nr_segs);
+	write_len = count;
 	end = (pos + write_len - 1) >> PAGE_CACHE_SHIFT;
 
 	written = filemap_write_and_wait_range(mapping, pos, pos + write_len - 1);
@@ -2092,9 +2103,7 @@ generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
 		}
 	}
 
-	iov_iter_init(&iter, iov, *nr_segs, write_len, 0);
-
-	written = mapping->a_ops->direct_IO(WRITE, iocb, &iter, pos);
+	written = mapping->a_ops->direct_IO(WRITE, iocb, iter, pos);
 
 	/*
 	 * Finally, try again to invalidate clean pages which might have been
@@ -2120,6 +2129,23 @@ generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
 out:
 	return written;
 }
+EXPORT_SYMBOL(generic_file_direct_write_iter);
+
+ssize_t
+generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
+		unsigned long *nr_segs, loff_t pos, loff_t *ppos,
+		size_t count, size_t ocount)
+{
+	struct iov_iter iter;
+	ssize_t ret;
+
+	iov_iter_init(&iter, iov, *nr_segs, ocount, 0);
+	ret = generic_file_direct_write_iter(iocb, &iter, pos, ppos, count);
+	/* generic_file_direct_write_iter() might have shortened the vec */
+	if (*nr_segs != iter.nr_segs)
+		*nr_segs = iter.nr_segs;
+	return ret;
+}
 EXPORT_SYMBOL(generic_file_direct_write);
 
 /*
@@ -2253,16 +2279,19 @@ again:
 }
 
 ssize_t
-generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
-		unsigned long nr_segs, loff_t pos, loff_t *ppos,
-		size_t count, ssize_t written)
+generic_file_buffered_write_iter(struct kiocb *iocb, struct iov_iter *iter,
+		loff_t pos, loff_t *ppos, size_t count, ssize_t written)
 {
 	struct file *file = iocb->ki_filp;
 	ssize_t status;
-	struct iov_iter i;
 
-	iov_iter_init(&i, iov, nr_segs, count, written);
-	status = generic_perform_write(file, &i, pos);
+	if ((count + written) != iov_iter_count(iter)) {
+		int rc = iov_iter_shorten(iter, count + written);
+		if (rc)
+			return rc;
+	}
+
+	status = generic_perform_write(file, iter, pos);
 
 	if (likely(status >= 0)) {
 		written += status;
@@ -2271,13 +2300,24 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
 	
 	return written ? written : status;
 }
+EXPORT_SYMBOL(generic_file_buffered_write_iter);
+
+ssize_t
+generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
+		unsigned long nr_segs, loff_t pos, loff_t *ppos,
+		size_t count, ssize_t written)
+{
+	struct iov_iter iter;
+	iov_iter_init(&iter, iov, nr_segs, count, written);
+	return generic_file_buffered_write_iter(iocb, &iter, pos, ppos,
+						count, written);
+}
 EXPORT_SYMBOL(generic_file_buffered_write);
 
 /**
  * __generic_file_aio_write - write data to a file
  * @iocb:	IO state structure (file, offset, etc.)
- * @iov:	vector with data to write
- * @nr_segs:	number of segments in the vector
+ * @iter:	iov_iter specifying memory to write
  * @ppos:	position where to write
  *
  * This function does all the work needed for actually writing data to a
@@ -2292,24 +2332,18 @@ EXPORT_SYMBOL(generic_file_buffered_write);
  * A caller has to handle it. This is mainly due to the fact that we want to
  * avoid syncing under i_mutex.
  */
-ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
-				 unsigned long nr_segs, loff_t *ppos)
+ssize_t __generic_file_write_iter(struct kiocb *iocb, struct iov_iter *iter,
+				  loff_t *ppos)
 {
 	struct file *file = iocb->ki_filp;
 	struct address_space * mapping = file->f_mapping;
-	size_t ocount;		/* original count */
 	size_t count;		/* after file limit checks */
 	struct inode 	*inode = mapping->host;
 	loff_t		pos;
 	ssize_t		written;
 	ssize_t		err;
 
-	ocount = 0;
-	err = generic_segment_checks(iov, &nr_segs, &ocount, VERIFY_READ);
-	if (err)
-		return err;
-
-	count = ocount;
+	count = iov_iter_count(iter);
 	pos = *ppos;
 
 	/* We can write back this queue in page reclaim */
@@ -2336,8 +2370,8 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
 		loff_t endbyte;
 		ssize_t written_buffered;
 
-		written = generic_file_direct_write(iocb, iov, &nr_segs, pos,
-							ppos, count, ocount);
+		written = generic_file_direct_write_iter(iocb, iter, pos,
+							 ppos, count);
 		if (written < 0 || written == count)
 			goto out;
 		/*
@@ -2346,9 +2380,9 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
 		 */
 		pos += written;
 		count -= written;
-		written_buffered = generic_file_buffered_write(iocb, iov,
-						nr_segs, pos, ppos, count,
-						written);
+		iov_iter_advance(iter, written);
+		written_buffered = generic_file_buffered_write_iter(iocb, iter,
+						pos, ppos, count, written);
 		/*
 		 * If generic_file_buffered_write() retuned a synchronous error
 		 * then we want to return the number of bytes which were
@@ -2380,13 +2414,57 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
 			 */
 		}
 	} else {
-		written = generic_file_buffered_write(iocb, iov, nr_segs,
+		iter->count = count;
+		written = generic_file_buffered_write_iter(iocb, iter,
 				pos, ppos, count, written);
 	}
 out:
 	current->backing_dev_info = NULL;
 	return written ? written : err;
 }
+EXPORT_SYMBOL(__generic_file_write_iter);
+
+ssize_t generic_file_write_iter(struct kiocb *iocb, struct iov_iter *iter,
+				loff_t pos)
+{
+	struct file *file = iocb->ki_filp;
+	struct inode *inode = file->f_mapping->host;
+	ssize_t ret;
+
+	mutex_lock(&inode->i_mutex);
+	ret = __generic_file_write_iter(iocb, iter, &iocb->ki_pos);
+	mutex_unlock(&inode->i_mutex);
+
+	if (ret > 0 || ret == -EIOCBQUEUED) {
+		ssize_t err;
+
+		err = generic_write_sync(file, pos, ret);
+		if (err < 0 && ret > 0)
+			ret = err;
+	}
+	return ret;
+}
+EXPORT_SYMBOL(generic_file_write_iter);
+
+ssize_t
+__generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
+			 unsigned long nr_segs, loff_t *ppos)
+{
+	struct iov_iter iter;
+	size_t count;
+	int ret;
+
+	count = 0;
+	ret = generic_segment_checks(iov, &nr_segs, &count, VERIFY_READ);
+	if (ret)
+		goto out;
+
+	iov_iter_init(&iter, iov, nr_segs, count, 0);
+
+	ret = __generic_file_write_iter(iocb, &iter, ppos);
+out:
+	return ret;
+}
 EXPORT_SYMBOL(__generic_file_aio_write);
 
 /**
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 14/33] aio: add aio_kernel_() interface
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (12 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 13/33] fs: pull iov_iter use higher up the stack Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 15/33] aio: add aio support for iov_iter arguments Dave Kleikamp
                   ` (23 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

This adds an interface that lets kernel callers submit aio iocbs without
going through the user space syscalls.  This lets kernel callers avoid
the management limits and overhead of the context.  It will also let us
integrate aio operations with other kernel apis that the user space
interface doesn't have access to.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
---
 fs/aio.c            | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/aio.h | 17 ++++++++++-
 2 files changed, 97 insertions(+), 1 deletion(-)

diff --git a/fs/aio.c b/fs/aio.c
index 9b5ca11..c65ba13 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -596,6 +596,10 @@ void aio_complete(struct kiocb *iocb, long res, long res2)
 		atomic_set(&iocb->ki_users, 0);
 		wake_up_process(iocb->ki_obj.tsk);
 		return;
+	} else if (is_kernel_kiocb(iocb)) {
+		iocb->ki_obj.complete(iocb->ki_user_data, res);
+		aio_kernel_free(iocb);
+		return;
 	}
 
 	/*
@@ -1072,6 +1076,83 @@ rw_common:
 	return 0;
 }
 
+/*
+ * This allocates an iocb that will be used to submit and track completion of
+ * an IO that is issued from kernel space.
+ *
+ * The caller is expected to call the appropriate aio_kernel_init_() functions
+ * and then call aio_kernel_submit().  From that point forward progress is
+ * guaranteed by the file system aio method.  Eventually the caller's
+ * completion callback will be called.
+ *
+ * These iocbs are special.  They don't have a context, we don't limit the
+ * number pending, and they can't be canceled.
+ */
+struct kiocb *aio_kernel_alloc(gfp_t gfp)
+{
+	return kzalloc(sizeof(struct kiocb), gfp);
+}
+EXPORT_SYMBOL_GPL(aio_kernel_alloc);
+
+void aio_kernel_free(struct kiocb *iocb)
+{
+	kfree(iocb);
+}
+EXPORT_SYMBOL_GPL(aio_kernel_free);
+
+/*
+ * ptr and count can be a buff and bytes or an iov and segs.
+ */
+void aio_kernel_init_rw(struct kiocb *iocb, struct file *filp,
+			unsigned short op, void *ptr, size_t nr, loff_t off)
+{
+	iocb->ki_filp = filp;
+	iocb->ki_opcode = op;
+	iocb->ki_buf = (char __user *)(unsigned long)ptr;
+	iocb->ki_left = nr;
+	iocb->ki_nbytes = nr;
+	iocb->ki_pos = off;
+	iocb->ki_ctx = (void *)-1;
+}
+EXPORT_SYMBOL_GPL(aio_kernel_init_rw);
+
+void aio_kernel_init_callback(struct kiocb *iocb,
+			      void (*complete)(u64 user_data, long res),
+			      u64 user_data)
+{
+	iocb->ki_obj.complete = complete;
+	iocb->ki_user_data = user_data;
+}
+EXPORT_SYMBOL_GPL(aio_kernel_init_callback);
+
+/*
+ * The iocb is our responsibility once this is called.  The caller must not
+ * reference it.
+ *
+ * Callers must be prepared for their iocb completion callback to be called the
+ * moment they enter this function.  The completion callback may be called from
+ * any context.
+ *
+ * Returns: 0: the iocb completion callback will be called with the op result
+ * negative errno: the operation was not submitted and the iocb was freed
+ */
+int aio_kernel_submit(struct kiocb *iocb)
+{
+	int ret;
+
+	BUG_ON(!is_kernel_kiocb(iocb));
+	BUG_ON(!iocb->ki_obj.complete);
+	BUG_ON(!iocb->ki_filp);
+
+	ret = aio_run_iocb(iocb, 0);
+
+	if (ret)
+		aio_kernel_free(iocb);
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(aio_kernel_submit);
+
 static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
 			 struct iocb *iocb, bool compat)
 {
diff --git a/include/linux/aio.h b/include/linux/aio.h
index 1bdf965..014a75d 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -33,13 +33,15 @@ struct kiocb {
 	atomic_t		ki_users;
 
 	struct file		*ki_filp;
-	struct kioctx		*ki_ctx;	/* NULL for sync ops */
+	struct kioctx		*ki_ctx;	/* NULL for sync ops,
+						   -1 for kernel caller	*/
 	kiocb_cancel_fn		*ki_cancel;
 	void			(*ki_dtor)(struct kiocb *);
 
 	union {
 		void __user		*user;
 		struct task_struct	*tsk;
+		void			(*complete)(u64 user_data, long res);
 	} ki_obj;
 
 	__u64			ki_user_data;	/* user's data for completion */
@@ -71,6 +73,11 @@ static inline bool is_sync_kiocb(struct kiocb *kiocb)
 	return kiocb->ki_ctx == NULL;
 }
 
+static inline bool is_kernel_kiocb(struct kiocb *kiocb)
+{
+	return kiocb->ki_ctx == (void *)-1;
+}
+
 static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp)
 {
 	*kiocb = (struct kiocb) {
@@ -91,6 +98,14 @@ extern void exit_aio(struct mm_struct *mm);
 extern long do_io_submit(aio_context_t ctx_id, long nr,
 			 struct iocb __user *__user *iocbpp, bool compat);
 void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel);
+struct kiocb *aio_kernel_alloc(gfp_t gfp);
+void aio_kernel_free(struct kiocb *iocb);
+void aio_kernel_init_rw(struct kiocb *iocb, struct file *filp,
+			unsigned short op, void *ptr, size_t nr, loff_t off);
+void aio_kernel_init_callback(struct kiocb *iocb,
+			      void (*complete)(u64 user_data, long res),
+			      u64 user_data);
+int aio_kernel_submit(struct kiocb *iocb);
 #else
 static inline ssize_t wait_on_sync_kiocb(struct kiocb *iocb) { return 0; }
 static inline void aio_put_req(struct kiocb *iocb) { }
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 15/33] aio: add aio support for iov_iter arguments
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (13 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 14/33] aio: add aio_kernel_() interface Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-08-21 13:55   ` Benjamin LaHaise
  2013-07-25 17:50 ` [PATCH V8 16/33] bio: add bvec_length(), like iov_length() Dave Kleikamp
                   ` (22 subsequent siblings)
  37 siblings, 1 reply; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

This adds iocb cmds which specify that memory is held in iov_iter
structures.  This lets kernel callers specify memory that can be
expressed in an iov_iter, which includes pages in bio_vec arrays.

Only kernel callers can provide an iov_iter so it doesn't make a lot of
sense to expose the IOCB_CMD values for this as part of the user space
ABI.

But kernel callers should also be able to perform the usual aio
operations which suggests using the the existing operation namespace and
support code.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
---
 fs/aio.c                     | 67 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/aio.h          |  3 ++
 include/uapi/linux/aio_abi.h |  2 ++
 3 files changed, 72 insertions(+)

diff --git a/fs/aio.c b/fs/aio.c
index c65ba13..0da82c0 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -991,6 +991,48 @@ static ssize_t aio_setup_single_vector(int rw, struct kiocb *kiocb)
 	return 0;
 }
 
+static ssize_t aio_read_iter(struct kiocb *iocb)
+{
+	struct file *file = iocb->ki_filp;
+	ssize_t ret;
+
+	if (unlikely(!is_kernel_kiocb(iocb)))
+		return -EINVAL;
+
+	if (unlikely(!(file->f_mode & FMODE_READ)))
+		return -EBADF;
+
+	ret = security_file_permission(file, MAY_READ);
+	if (unlikely(ret))
+		return ret;
+
+	if (!file->f_op->read_iter)
+		return -EINVAL;
+
+	return file->f_op->read_iter(iocb, iocb->ki_iter, iocb->ki_pos);
+}
+
+static ssize_t aio_write_iter(struct kiocb *iocb)
+{
+	struct file *file = iocb->ki_filp;
+	ssize_t ret;
+
+	if (unlikely(!is_kernel_kiocb(iocb)))
+		return -EINVAL;
+
+	if (unlikely(!(file->f_mode & FMODE_WRITE)))
+		return -EBADF;
+
+	ret = security_file_permission(file, MAY_WRITE);
+	if (unlikely(ret))
+		return ret;
+
+	if (!file->f_op->write_iter)
+		return -EINVAL;
+
+	return file->f_op->write_iter(iocb, iocb->ki_iter, iocb->ki_pos);
+}
+
 /*
  * aio_setup_iocb:
  *	Performs the initial checks and aio retry method
@@ -1042,6 +1084,14 @@ rw_common:
 		ret = aio_rw_vect_retry(req, rw, rw_op);
 		break;
 
+	case IOCB_CMD_READ_ITER:
+		ret = aio_read_iter(req);
+		break;
+
+	case IOCB_CMD_WRITE_ITER:
+		ret = aio_write_iter(req);
+		break;
+
 	case IOCB_CMD_FDSYNC:
 		if (!file->f_op->aio_fsync)
 			return -EINVAL;
@@ -1116,6 +1166,23 @@ void aio_kernel_init_rw(struct kiocb *iocb, struct file *filp,
 }
 EXPORT_SYMBOL_GPL(aio_kernel_init_rw);
 
+/*
+ * The iter count must be set before calling here.  Some filesystems uses
+ * iocb->ki_left as an indicator of the size of an IO.
+ */
+void aio_kernel_init_iter(struct kiocb *iocb, struct file *filp,
+			  unsigned short op, struct iov_iter *iter, loff_t off)
+{
+	iocb->ki_filp = filp;
+	iocb->ki_iter = iter;
+	iocb->ki_opcode = op;
+	iocb->ki_pos = off;
+	iocb->ki_nbytes = iov_iter_count(iter);
+	iocb->ki_left = iocb->ki_nbytes;
+	iocb->ki_ctx = (void *)-1;
+}
+EXPORT_SYMBOL_GPL(aio_kernel_init_iter);
+
 void aio_kernel_init_callback(struct kiocb *iocb,
 			      void (*complete)(u64 user_data, long res),
 			      u64 user_data)
diff --git a/include/linux/aio.h b/include/linux/aio.h
index 014a75d..64d059d 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -66,6 +66,7 @@ struct kiocb {
 	 * this is the underlying eventfd context to deliver events to.
 	 */
 	struct eventfd_ctx	*ki_eventfd;
+	struct iov_iter		*ki_iter;
 };
 
 static inline bool is_sync_kiocb(struct kiocb *kiocb)
@@ -102,6 +103,8 @@ struct kiocb *aio_kernel_alloc(gfp_t gfp);
 void aio_kernel_free(struct kiocb *iocb);
 void aio_kernel_init_rw(struct kiocb *iocb, struct file *filp,
 			unsigned short op, void *ptr, size_t nr, loff_t off);
+void aio_kernel_init_iter(struct kiocb *iocb, struct file *filp,
+			  unsigned short op, struct iov_iter *iter, loff_t off);
 void aio_kernel_init_callback(struct kiocb *iocb,
 			      void (*complete)(u64 user_data, long res),
 			      u64 user_data);
diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h
index bb2554f..22ce4bd 100644
--- a/include/uapi/linux/aio_abi.h
+++ b/include/uapi/linux/aio_abi.h
@@ -44,6 +44,8 @@ enum {
 	IOCB_CMD_NOOP = 6,
 	IOCB_CMD_PREADV = 7,
 	IOCB_CMD_PWRITEV = 8,
+	IOCB_CMD_READ_ITER = 9,
+	IOCB_CMD_WRITE_ITER = 10,
 };
 
 /*
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 16/33] bio: add bvec_length(), like iov_length()
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (14 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 15/33] aio: add aio support for iov_iter arguments Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 17/33] loop: use aio to perform io on the underlying file Dave Kleikamp
                   ` (21 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

From: Zach Brown <zab@zabbo.net>

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
---
 include/linux/bio.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/linux/bio.h b/include/linux/bio.h
index ec48bac..4fd5253 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -307,6 +307,14 @@ extern struct bio_vec *bvec_alloc(gfp_t, int, unsigned long *, mempool_t *);
 extern void bvec_free(mempool_t *, struct bio_vec *, unsigned int);
 extern unsigned int bvec_nr_vecs(unsigned short idx);
 
+static inline ssize_t bvec_length(const struct bio_vec *bvec, unsigned long nr)
+{
+	ssize_t bytes = 0;
+	while (nr--)
+		bytes += (bvec++)->bv_len;
+	return bytes;
+}
+
 #ifdef CONFIG_BLK_CGROUP
 int bio_associate_current(struct bio *bio);
 void bio_disassociate_task(struct bio *bio);
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 17/33] loop: use aio to perform io on the underlying file
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (15 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 16/33] bio: add bvec_length(), like iov_length() Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 18/33] fs: create file_readable() and file_writable() functions Dave Kleikamp
                   ` (20 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

From: Zach Brown <zab@zabbo.net>

This uses the new kernel aio interface to process loopback IO by
submitting concurrent direct aio.  Previously loop's IO was serialized
by synchronous processing in a thread.

The aio operations specify the memory for the IO with the bio_vec arrays
directly instead of mappings of the pages.

The use of aio operations is enabled when the backing file supports the
read_iter, write_iter and direct_IO methods.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
---
 drivers/block/loop.c      | 148 +++++++++++++++++++++++++++++++++-------------
 include/uapi/linux/loop.h |   1 +
 2 files changed, 109 insertions(+), 40 deletions(-)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 40e7155..66e3ccf 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -75,6 +75,7 @@
 #include <linux/sysfs.h>
 #include <linux/miscdevice.h>
 #include <linux/falloc.h>
+#include <linux/aio.h>
 #include "loop.h"
 
 #include <asm/uaccess.h>
@@ -218,6 +219,48 @@ lo_do_transfer(struct loop_device *lo, int cmd,
 	return lo->transfer(lo, cmd, rpage, roffs, lpage, loffs, size, rblock);
 }
 
+#ifdef CONFIG_AIO
+static void lo_rw_aio_complete(u64 data, long res)
+{
+	struct bio *bio = (struct bio *)(uintptr_t)data;
+
+	if (res > 0)
+		res = 0;
+	else if (res < 0)
+		res = -EIO;
+
+	bio_endio(bio, res);
+}
+
+static int lo_rw_aio(struct loop_device *lo, struct bio *bio)
+{
+	struct file *file = lo->lo_backing_file;
+	struct kiocb *iocb;
+	unsigned short op;
+	struct iov_iter iter;
+	struct bio_vec *bvec;
+	size_t nr_segs;
+	loff_t pos = ((loff_t) bio->bi_sector << 9) + lo->lo_offset;
+
+	iocb = aio_kernel_alloc(GFP_NOIO);
+	if (!iocb)
+		return -ENOMEM;
+
+	if (bio_rw(bio) & WRITE)
+		op = IOCB_CMD_WRITE_ITER;
+	else
+		op = IOCB_CMD_READ_ITER;
+
+	bvec = bio_iovec_idx(bio, bio->bi_idx);
+	nr_segs = bio_segments(bio);
+	iov_iter_init_bvec(&iter, bvec, nr_segs, bvec_length(bvec, nr_segs), 0);
+	aio_kernel_init_iter(iocb, file, op, &iter, pos);
+	aio_kernel_init_callback(iocb, lo_rw_aio_complete, (u64)(uintptr_t)bio);
+
+	return aio_kernel_submit(iocb);
+}
+#endif /* CONFIG_AIO */
+
 /**
  * __do_lo_send_write - helper for writing data to a loop device
  *
@@ -418,50 +461,33 @@ static int do_bio_filebacked(struct loop_device *lo, struct bio *bio)
 	pos = ((loff_t) bio->bi_sector << 9) + lo->lo_offset;
 
 	if (bio_rw(bio) == WRITE) {
-		struct file *file = lo->lo_backing_file;
-
-		if (bio->bi_rw & REQ_FLUSH) {
-			ret = vfs_fsync(file, 0);
-			if (unlikely(ret && ret != -EINVAL)) {
-				ret = -EIO;
-				goto out;
-			}
-		}
+		ret = lo_send(lo, bio, pos);
+	} else
+		ret = lo_receive(lo, bio, lo->lo_blocksize, pos);
 
-		/*
-		 * We use punch hole to reclaim the free space used by the
-		 * image a.k.a. discard. However we do not support discard if
-		 * encryption is enabled, because it may give an attacker
-		 * useful information.
-		 */
-		if (bio->bi_rw & REQ_DISCARD) {
-			struct file *file = lo->lo_backing_file;
-			int mode = FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE;
+	return ret;
+}
 
-			if ((!file->f_op->fallocate) ||
-			    lo->lo_encrypt_key_size) {
-				ret = -EOPNOTSUPP;
-				goto out;
-			}
-			ret = file->f_op->fallocate(file, mode, pos,
-						    bio->bi_size);
-			if (unlikely(ret && ret != -EINVAL &&
-				     ret != -EOPNOTSUPP))
-				ret = -EIO;
-			goto out;
-		}
+static int lo_discard(struct loop_device *lo, struct bio *bio)
+{
+	struct file *file = lo->lo_backing_file;
+	int mode = FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE;
+	loff_t pos = ((loff_t) bio->bi_sector << 9) + lo->lo_offset;
+	int ret;
 
-		ret = lo_send(lo, bio, pos);
+	/*
+	 * We use punch hole to reclaim the free space used by the
+	 * image a.k.a. discard. However we do not support discard if
+	 * encryption is enabled, because it may give an attacker
+	 * useful information.
+	 */
 
-		if ((bio->bi_rw & REQ_FUA) && !ret) {
-			ret = vfs_fsync(file, 0);
-			if (unlikely(ret && ret != -EINVAL))
-				ret = -EIO;
-		}
-	} else
-		ret = lo_receive(lo, bio, lo->lo_blocksize, pos);
+	if ((!file->f_op->fallocate) || lo->lo_encrypt_key_size)
+		return -EOPNOTSUPP;
 
-out:
+	ret = file->f_op->fallocate(file, mode, pos, bio->bi_size);
+	if (unlikely(ret && ret != -EINVAL && ret != -EOPNOTSUPP))
+		ret = -EIO;
 	return ret;
 }
 
@@ -525,7 +551,35 @@ static inline void loop_handle_bio(struct loop_device *lo, struct bio *bio)
 		do_loop_switch(lo, bio->bi_private);
 		bio_put(bio);
 	} else {
-		int ret = do_bio_filebacked(lo, bio);
+		int ret;
+
+		if (bio_rw(bio) == WRITE) {
+			if (bio->bi_rw & REQ_FLUSH) {
+				ret = vfs_fsync(lo->lo_backing_file, 1);
+				if (unlikely(ret && ret != -EINVAL))
+					goto out;
+			}
+			if (bio->bi_rw & REQ_DISCARD) {
+				ret = lo_discard(lo, bio);
+				goto out;
+			}
+		}
+#ifdef CONFIG_AIO
+		if (lo->lo_flags & LO_FLAGS_USE_AIO &&
+		    lo->transfer == transfer_none) {
+			ret = lo_rw_aio(lo, bio);
+			if (ret == 0)
+				return;
+		} else
+#endif
+			ret = do_bio_filebacked(lo, bio);
+
+		if ((bio_rw(bio) == WRITE) && bio->bi_rw & REQ_FUA && !ret) {
+			ret = vfs_fsync(lo->lo_backing_file, 0);
+			if (unlikely(ret && ret != -EINVAL))
+				ret = -EIO;
+		}
+out:
 		bio_endio(bio, ret);
 	}
 }
@@ -547,6 +601,12 @@ static int loop_thread(void *data)
 	struct loop_device *lo = data;
 	struct bio *bio;
 
+	/*
+	 * In cases where the underlying filesystem calls balance_dirty_pages()
+	 * we want less throttling to avoid lock ups trying to write dirty
+	 * pages through the loop device
+	 */
+	current->flags |= PF_LESS_THROTTLE;
 	set_user_nice(current, -20);
 
 	while (!kthread_should_stop() || !bio_list_empty(&lo->lo_bio_list)) {
@@ -869,6 +929,14 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
 	    !file->f_op->write)
 		lo_flags |= LO_FLAGS_READ_ONLY;
 
+#ifdef CONFIG_AIO
+	if (file->f_op->write_iter && file->f_op->read_iter &&
+	    mapping->a_ops->direct_IO) {
+		file->f_flags |= O_DIRECT;
+		lo_flags |= LO_FLAGS_USE_AIO;
+	}
+#endif
+
 	lo_blocksize = S_ISBLK(inode->i_mode) ?
 		inode->i_bdev->bd_block_size : PAGE_SIZE;
 
diff --git a/include/uapi/linux/loop.h b/include/uapi/linux/loop.h
index e0cecd2..6edc6b6 100644
--- a/include/uapi/linux/loop.h
+++ b/include/uapi/linux/loop.h
@@ -21,6 +21,7 @@ enum {
 	LO_FLAGS_READ_ONLY	= 1,
 	LO_FLAGS_AUTOCLEAR	= 4,
 	LO_FLAGS_PARTSCAN	= 8,
+	LO_FLAGS_USE_AIO	= 16,
 };
 
 #include <asm/posix_types.h>	/* for __kernel_old_dev_t */
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 18/33] fs: create file_readable() and file_writable() functions
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (16 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 17/33] loop: use aio to perform io on the underlying file Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 19/33] fs: use read_iter and write_iter rather than aio_read and aio_write Dave Kleikamp
                   ` (19 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

Create functions to simplify if file_ops contain either a read
or aio_read op, or likewise write or aio_write. We will be adding
read_iter and write_iter and don't need to be complicating the code
in multiple places.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
---
 drivers/mtd/nand/nandsim.c          |  4 ++--
 drivers/usb/gadget/storage_common.c |  4 ++--
 fs/read_write.c                     | 14 +++++++-------
 include/linux/fs.h                  | 10 ++++++++++
 4 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index cb38f3d..6a44ba6 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -576,12 +576,12 @@ static int alloc_device(struct nandsim *ns)
 		cfile = filp_open(cache_file, O_CREAT | O_RDWR | O_LARGEFILE, 0600);
 		if (IS_ERR(cfile))
 			return PTR_ERR(cfile);
-		if (!cfile->f_op || (!cfile->f_op->read && !cfile->f_op->aio_read)) {
+		if (!file_readable(cfile)) {
 			NS_ERR("alloc_device: cache file not readable\n");
 			err = -EINVAL;
 			goto err_close;
 		}
-		if (!cfile->f_op->write && !cfile->f_op->aio_write) {
+		if (!file_writable(cfile)) {
 			NS_ERR("alloc_device: cache file not writeable\n");
 			err = -EINVAL;
 			goto err_close;
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index dbce3a9..a801a00 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -450,11 +450,11 @@ static int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
 	 * If we can't read the file, it's no good.
 	 * If we can't write the file, use it read-only.
 	 */
-	if (!(filp->f_op->read || filp->f_op->aio_read)) {
+	if (!file_readable(filp)) {
 		LINFO(curlun, "file not readable: %s\n", filename);
 		goto out;
 	}
-	if (!(filp->f_op->write || filp->f_op->aio_write))
+	if (!file_writable(filp))
 		ro = 1;
 
 	size = i_size_read(inode->i_mapping->host);
diff --git a/fs/read_write.c b/fs/read_write.c
index 122a384..022929c 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -385,7 +385,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
 
 	if (!(file->f_mode & FMODE_READ))
 		return -EBADF;
-	if (!file->f_op || (!file->f_op->read && !file->f_op->aio_read))
+	if (!file_readable(file))
 		return -EINVAL;
 	if (unlikely(!access_ok(VERIFY_WRITE, buf, count)))
 		return -EFAULT;
@@ -435,7 +435,7 @@ ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t
 	const char __user *p;
 	ssize_t ret;
 
-	if (!file->f_op || (!file->f_op->write && !file->f_op->aio_write))
+	if (!file_writable(file))
 		return -EINVAL;
 
 	old_fs = get_fs();
@@ -462,7 +462,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_
 
 	if (!(file->f_mode & FMODE_WRITE))
 		return -EBADF;
-	if (!file->f_op || (!file->f_op->write && !file->f_op->aio_write))
+	if (!file_writable(file))
 		return -EINVAL;
 	if (unlikely(!access_ok(VERIFY_READ, buf, count)))
 		return -EFAULT;
@@ -781,7 +781,7 @@ ssize_t vfs_readv(struct file *file, const struct iovec __user *vec,
 {
 	if (!(file->f_mode & FMODE_READ))
 		return -EBADF;
-	if (!file->f_op || (!file->f_op->aio_read && !file->f_op->read))
+	if (!file_readable(file))
 		return -EINVAL;
 
 	return do_readv_writev(READ, file, vec, vlen, pos);
@@ -794,7 +794,7 @@ ssize_t vfs_writev(struct file *file, const struct iovec __user *vec,
 {
 	if (!(file->f_mode & FMODE_WRITE))
 		return -EBADF;
-	if (!file->f_op || (!file->f_op->aio_write && !file->f_op->write))
+	if (!file_writable(file))
 		return -EINVAL;
 
 	return do_readv_writev(WRITE, file, vec, vlen, pos);
@@ -968,7 +968,7 @@ static size_t compat_readv(struct file *file,
 		goto out;
 
 	ret = -EINVAL;
-	if (!file->f_op || (!file->f_op->aio_read && !file->f_op->read))
+	if (!file_readable(file))
 		goto out;
 
 	ret = compat_do_readv_writev(READ, file, vec, vlen, pos);
@@ -1035,7 +1035,7 @@ static size_t compat_writev(struct file *file,
 		goto out;
 
 	ret = -EINVAL;
-	if (!file->f_op || (!file->f_op->aio_write && !file->f_op->write))
+	if (!file_writable(file))
 		goto out;
 
 	ret = compat_do_readv_writev(WRITE, file, vec, vlen, pos);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index d716a29..fc1e2a8 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1652,6 +1652,16 @@ struct file_operations {
 	int (*show_fdinfo)(struct seq_file *m, struct file *f);
 };
 
+static inline int file_readable(struct file *filp)
+{
+	return filp && (filp->f_op->read || filp->f_op->aio_read);
+}
+
+static inline int file_writable(struct file *filp)
+{
+	return filp && (filp->f_op->write || filp->f_op->aio_write);
+}
+
 struct inode_operations {
 	struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
 	void * (*follow_link) (struct dentry *, struct nameidata *);
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 19/33] fs: use read_iter and write_iter rather than aio_read and aio_write
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (17 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 18/33] fs: create file_readable() and file_writable() functions Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 20/33] fs: add read_iter and write_iter to several file systems Dave Kleikamp
                   ` (18 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp, Alexander Viro

File systems implementing read_iter & write_iter should not be required
to keep aio_read and aio_write as well. The vfs should always call
read/write_iter if they exist. This will make it easier to remove the
aio_read/write operation in the future.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
---
 fs/aio.c           |  4 ++--
 fs/bad_inode.c     | 14 ++++++++++++
 fs/internal.h      |  4 ++++
 fs/read_write.c    | 64 ++++++++++++++++++++++++++++++++++++++++++++++++------
 include/linux/fs.h |  6 +++--
 5 files changed, 81 insertions(+), 11 deletions(-)

diff --git a/fs/aio.c b/fs/aio.c
index 0da82c0..9fa03a1 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1051,14 +1051,14 @@ static ssize_t aio_run_iocb(struct kiocb *req, bool compat)
 	case IOCB_CMD_PREADV:
 		mode	= FMODE_READ;
 		rw	= READ;
-		rw_op	= file->f_op->aio_read;
+		rw_op	= do_aio_read;
 		goto rw_common;
 
 	case IOCB_CMD_PWRITE:
 	case IOCB_CMD_PWRITEV:
 		mode	= FMODE_WRITE;
 		rw	= WRITE;
-		rw_op	= file->f_op->aio_write;
+		rw_op	= do_aio_write;
 		goto rw_common;
 rw_common:
 		if (unlikely(!(file->f_mode & mode)))
diff --git a/fs/bad_inode.c b/fs/bad_inode.c
index 7c93953..38651e5 100644
--- a/fs/bad_inode.c
+++ b/fs/bad_inode.c
@@ -39,12 +39,24 @@ static ssize_t bad_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
 	return -EIO;
 }
 
+static ssize_t bad_file_read_iter(struct kiocb *iocb, struct iov_iter *iter,
+			loff_t pos)
+{
+	return -EIO;
+}
+
 static ssize_t bad_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
 			unsigned long nr_segs, loff_t pos)
 {
 	return -EIO;
 }
 
+static ssize_t bad_file_write_iter(struct kiocb *iocb, struct iov_iter *iter,
+			loff_t pos)
+{
+	return -EIO;
+}
+
 static int bad_file_readdir(struct file *file, struct dir_context *ctx)
 {
 	return -EIO;
@@ -151,7 +163,9 @@ static const struct file_operations bad_file_ops =
 	.read		= bad_file_read,
 	.write		= bad_file_write,
 	.aio_read	= bad_file_aio_read,
+	.read_iter	= bad_file_read_iter,
 	.aio_write	= bad_file_aio_write,
+	.write_iter	= bad_file_write_iter,
 	.iterate	= bad_file_readdir,
 	.poll		= bad_file_poll,
 	.unlocked_ioctl	= bad_file_unlocked_ioctl,
diff --git a/fs/internal.h b/fs/internal.h
index 7c5f01c..143a903 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -132,6 +132,10 @@ extern struct dentry *__d_alloc(struct super_block *, const struct qstr *);
  */
 extern ssize_t __kernel_write(struct file *, const char *, size_t, loff_t *);
 extern int rw_verify_area(int, struct file *, const loff_t *, size_t);
+extern ssize_t do_aio_read(struct kiocb *kiocb, const struct iovec *iov,
+			   unsigned long nr_segs, loff_t pos);
+extern ssize_t do_aio_write(struct kiocb *kiocb, const struct iovec *iov,
+			    unsigned long nr_segs, loff_t pos);
 
 /*
  * splice.c
diff --git a/fs/read_write.c b/fs/read_write.c
index 022929c..c3579a9 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -29,7 +29,7 @@ typedef ssize_t (*iov_fn_t)(struct kiocb *, const struct iovec *,
 const struct file_operations generic_ro_fops = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.mmap		= generic_file_readonly_mmap,
 	.splice_read	= generic_file_splice_read,
 };
@@ -359,6 +359,29 @@ int rw_verify_area(int read_write, struct file *file, const loff_t *ppos, size_t
 	return count > MAX_RW_COUNT ? MAX_RW_COUNT : count;
 }
 
+ssize_t do_aio_read(struct kiocb *kiocb, const struct iovec *iov,
+		    unsigned long nr_segs, loff_t pos)
+{
+	struct file *file = kiocb->ki_filp;
+
+	if (file->f_op->read_iter) {
+		size_t count;
+		struct iov_iter iter;
+		int ret;
+
+		count = 0;
+		ret = generic_segment_checks(iov, &nr_segs, &count,
+					     VERIFY_WRITE);
+		if (ret)
+			return ret;
+
+		iov_iter_init(&iter, iov, nr_segs, count, 0);
+		return file->f_op->read_iter(kiocb, &iter, pos);
+	}
+
+	return file->f_op->aio_read(kiocb, iov, nr_segs, pos);
+}
+
 ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos)
 {
 	struct iovec iov = { .iov_base = buf, .iov_len = len };
@@ -370,7 +393,7 @@ ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *pp
 	kiocb.ki_left = len;
 	kiocb.ki_nbytes = len;
 
-	ret = filp->f_op->aio_read(&kiocb, &iov, 1, kiocb.ki_pos);
+	ret = do_aio_read(&kiocb, &iov, 1, kiocb.ki_pos);
 	if (-EIOCBQUEUED == ret)
 		ret = wait_on_sync_kiocb(&kiocb);
 	*ppos = kiocb.ki_pos;
@@ -409,6 +432,29 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
 
 EXPORT_SYMBOL(vfs_read);
 
+ssize_t do_aio_write(struct kiocb *kiocb, const struct iovec *iov,
+		     unsigned long nr_segs, loff_t pos)
+{
+	struct file *file = kiocb->ki_filp;
+
+	if (file->f_op->write_iter) {
+		size_t count;
+		struct iov_iter iter;
+		int ret;
+
+		count = 0;
+		ret = generic_segment_checks(iov, &nr_segs, &count,
+					     VERIFY_READ);
+		if (ret)
+			return ret;
+
+		iov_iter_init(&iter, iov, nr_segs, count, 0);
+		return file->f_op->write_iter(kiocb, &iter, pos);
+	}
+
+	return file->f_op->aio_write(kiocb, iov, nr_segs, pos);
+}
+
 ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
 {
 	struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = len };
@@ -420,7 +466,7 @@ ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, lof
 	kiocb.ki_left = len;
 	kiocb.ki_nbytes = len;
 
-	ret = filp->f_op->aio_write(&kiocb, &iov, 1, kiocb.ki_pos);
+	ret = do_aio_write(&kiocb, &iov, 1, kiocb.ki_pos);
 	if (-EIOCBQUEUED == ret)
 		ret = wait_on_sync_kiocb(&kiocb);
 	*ppos = kiocb.ki_pos;
@@ -748,10 +794,12 @@ static ssize_t do_readv_writev(int type, struct file *file,
 	fnv = NULL;
 	if (type == READ) {
 		fn = file->f_op->read;
-		fnv = file->f_op->aio_read;
+		if (file->f_op->aio_read || file->f_op->read_iter)
+			fnv = do_aio_read;
 	} else {
 		fn = (io_fn_t)file->f_op->write;
-		fnv = file->f_op->aio_write;
+		if (file->f_op->aio_write || file->f_op->write_iter)
+			fnv = do_aio_write;
 		file_start_write(file);
 	}
 
@@ -930,10 +978,12 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
 	fnv = NULL;
 	if (type == READ) {
 		fn = file->f_op->read;
-		fnv = file->f_op->aio_read;
+		if (file->f_op->aio_read || file->f_op->read_iter)
+			fnv = do_aio_read;
 	} else {
 		fn = (io_fn_t)file->f_op->write;
-		fnv = file->f_op->aio_write;
+		if (file->f_op->aio_write || file->f_op->write_iter)
+			fnv = do_aio_write;
 		file_start_write(file);
 	}
 
diff --git a/include/linux/fs.h b/include/linux/fs.h
index fc1e2a8..26d9d8d4 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1654,12 +1654,14 @@ struct file_operations {
 
 static inline int file_readable(struct file *filp)
 {
-	return filp && (filp->f_op->read || filp->f_op->aio_read);
+	return filp && (filp->f_op->read || filp->f_op->aio_read ||
+			filp->f_op->read_iter);
 }
 
 static inline int file_writable(struct file *filp)
 {
-	return filp && (filp->f_op->write || filp->f_op->aio_write);
+	return filp && (filp->f_op->write || filp->f_op->aio_write ||
+			filp->f_op->write_iter);
 }
 
 struct inode_operations {
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 20/33] fs: add read_iter and write_iter to several file systems
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (18 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 19/33] fs: use read_iter and write_iter rather than aio_read and aio_write Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 21/33] ocfs2: add support for read_iter and write_iter Dave Kleikamp
                   ` (17 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp

These are the simple ones.

File systems that use generic_file_aio_read() and generic_file_aio_write()
can trivially support generic_file_read_iter() and generic_file_write_iter().

This patch adds those file_operations for 9p, adfs, affs, bfs, exofs, ext2,
ext3, fat, f2fs, hfs, hfsplus, hostfs, hpfs, jfs, jffs2, logfs, minix, nilfs2,
omfs, ramfs, reiserfs, romfs, sysv, and ufs.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Boaz Harrosh <bharrosh@panasas.com>
Cc: Zach Brown <zab@zabbo.net>
---
 fs/9p/vfs_addr.c        | 4 ++--
 fs/9p/vfs_file.c        | 8 ++++----
 fs/adfs/file.c          | 4 ++--
 fs/affs/file.c          | 4 ++--
 fs/bfs/file.c           | 4 ++--
 fs/exofs/file.c         | 4 ++--
 fs/ext2/file.c          | 4 ++--
 fs/ext3/file.c          | 4 ++--
 fs/f2fs/file.c          | 4 ++--
 fs/fat/file.c           | 4 ++--
 fs/hfs/inode.c          | 4 ++--
 fs/hfsplus/inode.c      | 4 ++--
 fs/hostfs/hostfs_kern.c | 4 ++--
 fs/hpfs/file.c          | 4 ++--
 fs/jffs2/file.c         | 8 ++++----
 fs/jfs/file.c           | 4 ++--
 fs/logfs/file.c         | 4 ++--
 fs/minix/file.c         | 4 ++--
 fs/nilfs2/file.c        | 4 ++--
 fs/omfs/file.c          | 4 ++--
 fs/ramfs/file-mmu.c     | 4 ++--
 fs/ramfs/file-nommu.c   | 4 ++--
 fs/reiserfs/file.c      | 4 ++--
 fs/romfs/mmap-nommu.c   | 2 +-
 fs/sysv/file.c          | 4 ++--
 fs/ufs/file.c           | 4 ++--
 26 files changed, 55 insertions(+), 55 deletions(-)

diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
index 5581415..da0821b 100644
--- a/fs/9p/vfs_addr.c
+++ b/fs/9p/vfs_addr.c
@@ -251,8 +251,8 @@ static int v9fs_launder_page(struct page *page)
  * the VFS gets them, so this method should never be called.
  *
  * Direct IO is not 'yet' supported in the cached mode. Hence when
- * this routine is called through generic_file_aio_read(), the read/write fails
- * with an error.
+ * this routine is called through generic_file_read_iter(), the read/write
+ * fails with an error.
  *
  */
 static ssize_t
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index d384a8b..18d0293 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -743,8 +743,8 @@ const struct file_operations v9fs_cached_file_operations = {
 	.llseek = generic_file_llseek,
 	.read = v9fs_cached_file_read,
 	.write = v9fs_cached_file_write,
-	.aio_read = generic_file_aio_read,
-	.aio_write = generic_file_aio_write,
+	.read_iter = generic_file_read_iter,
+	.write_iter = generic_file_write_iter,
 	.open = v9fs_file_open,
 	.release = v9fs_dir_release,
 	.lock = v9fs_file_lock,
@@ -756,8 +756,8 @@ const struct file_operations v9fs_cached_file_operations_dotl = {
 	.llseek = generic_file_llseek,
 	.read = v9fs_cached_file_read,
 	.write = v9fs_cached_file_write,
-	.aio_read = generic_file_aio_read,
-	.aio_write = generic_file_aio_write,
+	.read_iter = generic_file_read_iter,
+	.write_iter = generic_file_write_iter,
 	.open = v9fs_file_open,
 	.release = v9fs_dir_release,
 	.lock = v9fs_file_lock_dotl,
diff --git a/fs/adfs/file.c b/fs/adfs/file.c
index a36da53..da1e021 100644
--- a/fs/adfs/file.c
+++ b/fs/adfs/file.c
@@ -24,11 +24,11 @@
 const struct file_operations adfs_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.mmap		= generic_file_mmap,
 	.fsync		= generic_file_fsync,
 	.write		= do_sync_write,
-	.aio_write	= generic_file_aio_write,
+	.write_iter	= generic_file_write_iter,
 	.splice_read	= generic_file_splice_read,
 };
 
diff --git a/fs/affs/file.c b/fs/affs/file.c
index af3261b..d09a2db 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -28,9 +28,9 @@ static int affs_file_release(struct inode *inode, struct file *filp);
 const struct file_operations affs_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.write		= do_sync_write,
-	.aio_write	= generic_file_aio_write,
+	.write_iter	= generic_file_write_iter,
 	.mmap		= generic_file_mmap,
 	.open		= affs_file_open,
 	.release	= affs_file_release,
diff --git a/fs/bfs/file.c b/fs/bfs/file.c
index ad3ea14..3d14806 100644
--- a/fs/bfs/file.c
+++ b/fs/bfs/file.c
@@ -24,9 +24,9 @@
 const struct file_operations bfs_file_operations = {
 	.llseek 	= generic_file_llseek,
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.write		= do_sync_write,
-	.aio_write	= generic_file_aio_write,
+	.write_iter	= generic_file_write_iter,
 	.mmap		= generic_file_mmap,
 	.splice_read	= generic_file_splice_read,
 };
diff --git a/fs/exofs/file.c b/fs/exofs/file.c
index 491c6c0..20564f8a 100644
--- a/fs/exofs/file.c
+++ b/fs/exofs/file.c
@@ -69,8 +69,8 @@ const struct file_operations exofs_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read	= generic_file_aio_read,
-	.aio_write	= generic_file_aio_write,
+	.read_iter	= generic_file_read_iter,
+	.write_iter	= generic_file_write_iter,
 	.mmap		= generic_file_mmap,
 	.open		= generic_file_open,
 	.release	= exofs_release_file,
diff --git a/fs/ext2/file.c b/fs/ext2/file.c
index a5b3a5d..6af043b 100644
--- a/fs/ext2/file.c
+++ b/fs/ext2/file.c
@@ -64,8 +64,8 @@ const struct file_operations ext2_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read	= generic_file_aio_read,
-	.aio_write	= generic_file_aio_write,
+	.read_iter	= generic_file_read_iter,
+	.write_iter	= generic_file_write_iter,
 	.unlocked_ioctl = ext2_ioctl,
 #ifdef CONFIG_COMPAT
 	.compat_ioctl	= ext2_compat_ioctl,
diff --git a/fs/ext3/file.c b/fs/ext3/file.c
index 25cb413..a796771 100644
--- a/fs/ext3/file.c
+++ b/fs/ext3/file.c
@@ -52,8 +52,8 @@ const struct file_operations ext3_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read	= generic_file_aio_read,
-	.aio_write	= generic_file_aio_write,
+	.read_iter	= generic_file_read_iter,
+	.write_iter	= generic_file_write_iter,
 	.unlocked_ioctl	= ext3_ioctl,
 #ifdef CONFIG_COMPAT
 	.compat_ioctl	= ext3_compat_ioctl,
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index d2d2b7d..d498bad 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -678,8 +678,8 @@ const struct file_operations f2fs_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read	= generic_file_aio_read,
-	.aio_write	= generic_file_aio_write,
+	.read_iter	= generic_file_read_iter,
+	.write_iter	= generic_file_write_iter,
 	.open		= generic_file_open,
 	.mmap		= f2fs_file_mmap,
 	.fsync		= f2fs_sync_file,
diff --git a/fs/fat/file.c b/fs/fat/file.c
index 9b104f5..33711ff 100644
--- a/fs/fat/file.c
+++ b/fs/fat/file.c
@@ -172,8 +172,8 @@ const struct file_operations fat_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read	= generic_file_aio_read,
-	.aio_write	= generic_file_aio_write,
+	.read_iter	= generic_file_read_iter,
+	.write_iter	= generic_file_write_iter,
 	.mmap		= generic_file_mmap,
 	.release	= fat_file_release,
 	.unlocked_ioctl	= fat_generic_ioctl,
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c
index 62440ce..f9242b8 100644
--- a/fs/hfs/inode.c
+++ b/fs/hfs/inode.c
@@ -674,9 +674,9 @@ static int hfs_file_fsync(struct file *filp, loff_t start, loff_t end,
 static const struct file_operations hfs_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.write		= do_sync_write,
-	.aio_write	= generic_file_aio_write,
+	.write_iter	= generic_file_write_iter,
 	.mmap		= generic_file_mmap,
 	.splice_read	= generic_file_splice_read,
 	.fsync		= hfs_file_fsync,
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
index fca99cc..13813f6 100644
--- a/fs/hfsplus/inode.c
+++ b/fs/hfsplus/inode.c
@@ -388,9 +388,9 @@ static const struct inode_operations hfsplus_file_inode_operations = {
 static const struct file_operations hfsplus_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.write		= do_sync_write,
-	.aio_write	= generic_file_aio_write,
+	.write_iter	= generic_file_write_iter,
 	.mmap		= generic_file_mmap,
 	.splice_read	= generic_file_splice_read,
 	.fsync		= hfsplus_file_fsync,
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index cddb052..e3adc8e 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -381,8 +381,8 @@ static const struct file_operations hostfs_file_fops = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
 	.splice_read	= generic_file_splice_read,
-	.aio_read	= generic_file_aio_read,
-	.aio_write	= generic_file_aio_write,
+	.read_iter	= generic_file_read_iter,
+	.write_iter	= generic_file_write_iter,
 	.write		= do_sync_write,
 	.mmap		= generic_file_mmap,
 	.open		= hostfs_file_open,
diff --git a/fs/hpfs/file.c b/fs/hpfs/file.c
index 4e9dabc..2561eba 100644
--- a/fs/hpfs/file.c
+++ b/fs/hpfs/file.c
@@ -198,9 +198,9 @@ const struct file_operations hpfs_file_ops =
 {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.write		= do_sync_write,
-	.aio_write	= generic_file_aio_write,
+	.write_iter	= generic_file_write_iter,
 	.mmap		= generic_file_mmap,
 	.release	= hpfs_file_release,
 	.fsync		= hpfs_file_fsync,
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
index 1506673..1d7ab8b 100644
--- a/fs/jffs2/file.c
+++ b/fs/jffs2/file.c
@@ -51,10 +51,10 @@ const struct file_operations jffs2_file_operations =
 {
 	.llseek =	generic_file_llseek,
 	.open =		generic_file_open,
- 	.read =		do_sync_read,
- 	.aio_read =	generic_file_aio_read,
- 	.write =	do_sync_write,
- 	.aio_write =	generic_file_aio_write,
+	.read =		do_sync_read,
+	.read_iter =	generic_file_read_iter,
+	.write =	do_sync_write,
+	.write_iter =	generic_file_write_iter,
 	.unlocked_ioctl=jffs2_ioctl,
 	.mmap =		generic_file_readonly_mmap,
 	.fsync =	jffs2_fsync,
diff --git a/fs/jfs/file.c b/fs/jfs/file.c
index dd7442c..040b6c7 100644
--- a/fs/jfs/file.c
+++ b/fs/jfs/file.c
@@ -151,8 +151,8 @@ const struct file_operations jfs_file_operations = {
 	.llseek		= generic_file_llseek,
 	.write		= do_sync_write,
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
-	.aio_write	= generic_file_aio_write,
+	.read_iter	= generic_file_read_iter,
+	.write_iter	= generic_file_write_iter,
 	.mmap		= generic_file_mmap,
 	.splice_read	= generic_file_splice_read,
 	.splice_write	= generic_file_splice_write,
diff --git a/fs/logfs/file.c b/fs/logfs/file.c
index 57914fc..57f994e 100644
--- a/fs/logfs/file.c
+++ b/fs/logfs/file.c
@@ -264,8 +264,8 @@ const struct inode_operations logfs_reg_iops = {
 };
 
 const struct file_operations logfs_reg_fops = {
-	.aio_read	= generic_file_aio_read,
-	.aio_write	= generic_file_aio_write,
+	.read_iter	= generic_file_read_iter,
+	.write_iter	= generic_file_write_iter,
 	.fsync		= logfs_fsync,
 	.unlocked_ioctl	= logfs_ioctl,
 	.llseek		= generic_file_llseek,
diff --git a/fs/minix/file.c b/fs/minix/file.c
index adc6f54..346d8f37 100644
--- a/fs/minix/file.c
+++ b/fs/minix/file.c
@@ -15,9 +15,9 @@
 const struct file_operations minix_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.write		= do_sync_write,
-	.aio_write	= generic_file_aio_write,
+	.write_iter	= generic_file_write_iter,
 	.mmap		= generic_file_mmap,
 	.fsync		= generic_file_fsync,
 	.splice_read	= generic_file_splice_read,
diff --git a/fs/nilfs2/file.c b/fs/nilfs2/file.c
index 08fdb77..7aeb8ee 100644
--- a/fs/nilfs2/file.c
+++ b/fs/nilfs2/file.c
@@ -153,8 +153,8 @@ const struct file_operations nilfs_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read	= generic_file_aio_read,
-	.aio_write	= generic_file_aio_write,
+	.read_iter	= generic_file_read_iter,
+	.write_iter	= generic_file_write_iter,
 	.unlocked_ioctl	= nilfs_ioctl,
 #ifdef CONFIG_COMPAT
 	.compat_ioctl	= nilfs_compat_ioctl,
diff --git a/fs/omfs/file.c b/fs/omfs/file.c
index e0d9b3e..badafd8 100644
--- a/fs/omfs/file.c
+++ b/fs/omfs/file.c
@@ -339,8 +339,8 @@ const struct file_operations omfs_file_operations = {
 	.llseek = generic_file_llseek,
 	.read = do_sync_read,
 	.write = do_sync_write,
-	.aio_read = generic_file_aio_read,
-	.aio_write = generic_file_aio_write,
+	.read_iter = generic_file_read_iter,
+	.write_iter = generic_file_write_iter,
 	.mmap = generic_file_mmap,
 	.fsync = generic_file_fsync,
 	.splice_read = generic_file_splice_read,
diff --git a/fs/ramfs/file-mmu.c b/fs/ramfs/file-mmu.c
index 4884ac5..c4d8572 100644
--- a/fs/ramfs/file-mmu.c
+++ b/fs/ramfs/file-mmu.c
@@ -39,9 +39,9 @@ const struct address_space_operations ramfs_aops = {
 
 const struct file_operations ramfs_file_operations = {
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.write		= do_sync_write,
-	.aio_write	= generic_file_aio_write,
+	.write_iter	= generic_file_write_iter,
 	.mmap		= generic_file_mmap,
 	.fsync		= noop_fsync,
 	.splice_read	= generic_file_splice_read,
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c
index 8d5b438..f2487c3 100644
--- a/fs/ramfs/file-nommu.c
+++ b/fs/ramfs/file-nommu.c
@@ -39,9 +39,9 @@ const struct file_operations ramfs_file_operations = {
 	.mmap			= ramfs_nommu_mmap,
 	.get_unmapped_area	= ramfs_nommu_get_unmapped_area,
 	.read			= do_sync_read,
-	.aio_read		= generic_file_aio_read,
+	.read_iter		= generic_file_read_iter,
 	.write			= do_sync_write,
-	.aio_write		= generic_file_aio_write,
+	.write_iter		= generic_file_write_iter,
 	.fsync			= noop_fsync,
 	.splice_read		= generic_file_splice_read,
 	.splice_write		= generic_file_splice_write,
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c
index dcaafcf..f98feb2 100644
--- a/fs/reiserfs/file.c
+++ b/fs/reiserfs/file.c
@@ -245,8 +245,8 @@ const struct file_operations reiserfs_file_operations = {
 	.open = reiserfs_file_open,
 	.release = reiserfs_file_release,
 	.fsync = reiserfs_sync_file,
-	.aio_read = generic_file_aio_read,
-	.aio_write = generic_file_aio_write,
+	.read_iter = generic_file_read_iter,
+	.write_iter = generic_file_write_iter,
 	.splice_read = generic_file_splice_read,
 	.splice_write = generic_file_splice_write,
 	.llseek = generic_file_llseek,
diff --git a/fs/romfs/mmap-nommu.c b/fs/romfs/mmap-nommu.c
index f373bde..f8a9e2b 100644
--- a/fs/romfs/mmap-nommu.c
+++ b/fs/romfs/mmap-nommu.c
@@ -73,7 +73,7 @@ static int romfs_mmap(struct file *file, struct vm_area_struct *vma)
 const struct file_operations romfs_ro_fops = {
 	.llseek			= generic_file_llseek,
 	.read			= do_sync_read,
-	.aio_read		= generic_file_aio_read,
+	.read_iter		= generic_file_read_iter,
 	.splice_read		= generic_file_splice_read,
 	.mmap			= romfs_mmap,
 	.get_unmapped_area	= romfs_get_unmapped_area,
diff --git a/fs/sysv/file.c b/fs/sysv/file.c
index 9d4dc68..ff4b363 100644
--- a/fs/sysv/file.c
+++ b/fs/sysv/file.c
@@ -22,9 +22,9 @@
 const struct file_operations sysv_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.write		= do_sync_write,
-	.aio_write	= generic_file_aio_write,
+	.write_iter	= generic_file_write_iter,
 	.mmap		= generic_file_mmap,
 	.fsync		= generic_file_fsync,
 	.splice_read	= generic_file_splice_read,
diff --git a/fs/ufs/file.c b/fs/ufs/file.c
index 33afa20..e155e4c 100644
--- a/fs/ufs/file.c
+++ b/fs/ufs/file.c
@@ -36,9 +36,9 @@
 const struct file_operations ufs_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.write		= do_sync_write,
-	.aio_write	= generic_file_aio_write,
+	.write_iter	= generic_file_write_iter,
 	.mmap		= generic_file_mmap,
 	.open           = generic_file_open,
 	.fsync		= generic_file_fsync,
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 21/33] ocfs2: add support for read_iter and write_iter
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (19 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 20/33] fs: add read_iter and write_iter to several file systems Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 22/33] ext4: " Dave Kleikamp
                   ` (16 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Fasheh, Dave Kleikamp, linux-fsdevel, Zach Brown,
	Maxim V. Patlasov, ocfs2-devel

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Joel Becker <jlbec@evilplan.org>
Cc: Zach Brown <zab@zabbo.net>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: ocfs2-devel@oss.oracle.com
---
 fs/ocfs2/aops.h        |  2 +-
 fs/ocfs2/file.c        | 55 ++++++++++++++++++++++----------------------------
 fs/ocfs2/ocfs2_trace.h |  6 +++---
 3 files changed, 28 insertions(+), 35 deletions(-)

diff --git a/fs/ocfs2/aops.h b/fs/ocfs2/aops.h
index f671e49..573f41d 100644
--- a/fs/ocfs2/aops.h
+++ b/fs/ocfs2/aops.h
@@ -74,7 +74,7 @@ static inline void ocfs2_iocb_set_rw_locked(struct kiocb *iocb, int level)
 /*
  * Using a named enum representing lock types in terms of #N bit stored in
  * iocb->private, which is going to be used for communication between
- * ocfs2_dio_end_io() and ocfs2_file_aio_write/read().
+ * ocfs2_dio_end_io() and ocfs2_file_write/read_iter().
  */
 enum ocfs2_iocb_lock_bits {
 	OCFS2_IOCB_RW_LOCK = 0,
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 41000f2..d2d203b 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2220,15 +2220,13 @@ out:
 	return ret;
 }
 
-static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
-				    const struct iovec *iov,
-				    unsigned long nr_segs,
-				    loff_t pos)
+static ssize_t ocfs2_file_write_iter(struct kiocb *iocb,
+				     struct iov_iter *iter,
+				     loff_t pos)
 {
 	int ret, direct_io, appending, rw_level, have_alloc_sem  = 0;
 	int can_do_direct, has_refcount = 0;
 	ssize_t written = 0;
-	size_t ocount;		/* original count */
 	size_t count;		/* after file limit checks */
 	loff_t old_size, *ppos = &iocb->ki_pos;
 	u32 old_clusters;
@@ -2239,11 +2237,11 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
 			       OCFS2_MOUNT_COHERENCY_BUFFERED);
 	int unaligned_dio = 0;
 
-	trace_ocfs2_file_aio_write(inode, file, file->f_path.dentry,
+	trace_ocfs2_file_write_iter(inode, file, file->f_path.dentry,
 		(unsigned long long)OCFS2_I(inode)->ip_blkno,
 		file->f_path.dentry->d_name.len,
 		file->f_path.dentry->d_name.name,
-		(unsigned int)nr_segs);
+		(unsigned long long)pos);
 
 	if (iocb->ki_left == 0)
 		return 0;
@@ -2343,28 +2341,24 @@ relock:
 	/* communicate with ocfs2_dio_end_io */
 	ocfs2_iocb_set_rw_locked(iocb, rw_level);
 
-	ret = generic_segment_checks(iov, &nr_segs, &ocount,
-				     VERIFY_READ);
-	if (ret)
-		goto out_dio;
 
-	count = ocount;
+	count = iov_iter_count(iter);
 	ret = generic_write_checks(file, ppos, &count,
 				   S_ISBLK(inode->i_mode));
 	if (ret)
 		goto out_dio;
 
 	if (direct_io) {
-		written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos,
-						    ppos, count, ocount);
+		written = generic_file_direct_write_iter(iocb, iter, *ppos,
+						    ppos, count);
 		if (written < 0) {
 			ret = written;
 			goto out_dio;
 		}
 	} else {
 		current->backing_dev_info = file->f_mapping->backing_dev_info;
-		written = generic_file_buffered_write(iocb, iov, nr_segs, *ppos,
-						      ppos, count, 0);
+		written = generic_file_buffered_write_iter(iocb, iter, *ppos,
+							   ppos, count, 0);
 		current->backing_dev_info = NULL;
 	}
 
@@ -2520,7 +2514,7 @@ static ssize_t ocfs2_file_splice_read(struct file *in,
 			in->f_path.dentry->d_name.name, len);
 
 	/*
-	 * See the comment in ocfs2_file_aio_read()
+	 * See the comment in ocfs2_file_read_iter()
 	 */
 	ret = ocfs2_inode_lock_atime(inode, in->f_path.mnt, &lock_level);
 	if (ret < 0) {
@@ -2535,19 +2529,18 @@ bail:
 	return ret;
 }
 
-static ssize_t ocfs2_file_aio_read(struct kiocb *iocb,
-				   const struct iovec *iov,
-				   unsigned long nr_segs,
-				   loff_t pos)
+static ssize_t ocfs2_file_read_iter(struct kiocb *iocb,
+				    struct iov_iter *iter,
+				    loff_t pos)
 {
 	int ret = 0, rw_level = -1, have_alloc_sem = 0, lock_level = 0;
 	struct file *filp = iocb->ki_filp;
 	struct inode *inode = file_inode(filp);
 
-	trace_ocfs2_file_aio_read(inode, filp, filp->f_path.dentry,
+	trace_ocfs2_file_read_iter(inode, filp, filp->f_path.dentry,
 			(unsigned long long)OCFS2_I(inode)->ip_blkno,
 			filp->f_path.dentry->d_name.len,
-			filp->f_path.dentry->d_name.name, nr_segs);
+			filp->f_path.dentry->d_name.name, pos);
 
 
 	if (!inode) {
@@ -2583,7 +2576,7 @@ static ssize_t ocfs2_file_aio_read(struct kiocb *iocb,
 	 *
 	 * Take and drop the meta data lock to update inode fields
 	 * like i_size. This allows the checks down below
-	 * generic_file_aio_read() a chance of actually working.
+	 * generic_file_read_iter() a chance of actually working.
 	 */
 	ret = ocfs2_inode_lock_atime(inode, filp->f_path.mnt, &lock_level);
 	if (ret < 0) {
@@ -2592,13 +2585,13 @@ static ssize_t ocfs2_file_aio_read(struct kiocb *iocb,
 	}
 	ocfs2_inode_unlock(inode, lock_level);
 
-	ret = generic_file_aio_read(iocb, iov, nr_segs, iocb->ki_pos);
-	trace_generic_file_aio_read_ret(ret);
+	ret = generic_file_read_iter(iocb, iter, iocb->ki_pos);
+	trace_generic_file_read_iter_ret(ret);
 
 	/* buffered aio wouldn't have proper lock coverage today */
 	BUG_ON(ret == -EIOCBQUEUED && !(filp->f_flags & O_DIRECT));
 
-	/* see ocfs2_file_aio_write */
+	/* see ocfs2_file_write_iter */
 	if (ret == -EIOCBQUEUED || !ocfs2_iocb_is_rw_locked(iocb)) {
 		rw_level = -1;
 		have_alloc_sem = 0;
@@ -2686,8 +2679,8 @@ const struct file_operations ocfs2_fops = {
 	.fsync		= ocfs2_sync_file,
 	.release	= ocfs2_file_release,
 	.open		= ocfs2_file_open,
-	.aio_read	= ocfs2_file_aio_read,
-	.aio_write	= ocfs2_file_aio_write,
+	.read_iter	= ocfs2_file_read_iter,
+	.write_iter	= ocfs2_file_write_iter,
 	.unlocked_ioctl	= ocfs2_ioctl,
 #ifdef CONFIG_COMPAT
 	.compat_ioctl   = ocfs2_compat_ioctl,
@@ -2734,8 +2727,8 @@ const struct file_operations ocfs2_fops_no_plocks = {
 	.fsync		= ocfs2_sync_file,
 	.release	= ocfs2_file_release,
 	.open		= ocfs2_file_open,
-	.aio_read	= ocfs2_file_aio_read,
-	.aio_write	= ocfs2_file_aio_write,
+	.read_iter	= ocfs2_file_read_iter,
+	.write_iter	= ocfs2_file_write_iter,
 	.unlocked_ioctl	= ocfs2_ioctl,
 #ifdef CONFIG_COMPAT
 	.compat_ioctl   = ocfs2_compat_ioctl,
diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h
index 3b481f4..1c5018c 100644
--- a/fs/ocfs2/ocfs2_trace.h
+++ b/fs/ocfs2/ocfs2_trace.h
@@ -1310,13 +1310,13 @@ DEFINE_OCFS2_FILE_OPS(ocfs2_file_release);
 
 DEFINE_OCFS2_FILE_OPS(ocfs2_sync_file);
 
-DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_write);
+DEFINE_OCFS2_FILE_OPS(ocfs2_file_write_iter);
 
 DEFINE_OCFS2_FILE_OPS(ocfs2_file_splice_write);
 
 DEFINE_OCFS2_FILE_OPS(ocfs2_file_splice_read);
 
-DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_read);
+DEFINE_OCFS2_FILE_OPS(ocfs2_file_read_iter);
 
 DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_truncate_file);
 
@@ -1474,7 +1474,7 @@ TRACE_EVENT(ocfs2_prepare_inode_for_write,
 		  __entry->direct_io, __entry->has_refcount)
 );
 
-DEFINE_OCFS2_INT_EVENT(generic_file_aio_read_ret);
+DEFINE_OCFS2_INT_EVENT(generic_file_read_iter_ret);
 
 /* End of trace events for fs/ocfs2/file.c. */
 
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 22/33] ext4: add support for read_iter and write_iter
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (20 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 21/33] ocfs2: add support for read_iter and write_iter Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 23/33] nfs: add support for read_iter, write_iter Dave Kleikamp
                   ` (15 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp, Theodore Ts'o, Andreas Dilger, linux-ext4

use the generic_file_read_iter(), create ext4_file_write_iter() based on
ext4_file_write(), and make ext4_file_write() a wrapper around
ext4_file_write_iter().

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: linux-ext4@vger.kernel.org
---
 fs/ext4/file.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 6f4cc56..c25d48a 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -74,12 +74,11 @@ void ext4_unwritten_wait(struct inode *inode)
  * or one thread will zero the other's data, causing corruption.
  */
 static int
-ext4_unaligned_aio(struct inode *inode, const struct iovec *iov,
-		   unsigned long nr_segs, loff_t pos)
+ext4_unaligned_aio(struct inode *inode, struct iov_iter *iter, loff_t pos)
 {
 	struct super_block *sb = inode->i_sb;
 	int blockmask = sb->s_blocksize - 1;
-	size_t count = iov_length(iov, nr_segs);
+	size_t count = iov_iter_count(iter);
 	loff_t final_size = pos + count;
 
 	if (pos >= inode->i_size)
@@ -92,8 +91,8 @@ ext4_unaligned_aio(struct inode *inode, const struct iovec *iov,
 }
 
 static ssize_t
-ext4_file_dio_write(struct kiocb *iocb, const struct iovec *iov,
-		    unsigned long nr_segs, loff_t pos)
+ext4_file_dio_write(struct kiocb *iocb, struct iov_iter *iter,
+		    loff_t pos)
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_mapping->host;
@@ -101,11 +100,11 @@ ext4_file_dio_write(struct kiocb *iocb, const struct iovec *iov,
 	int unaligned_aio = 0;
 	ssize_t ret;
 	int overwrite = 0;
-	size_t length = iov_length(iov, nr_segs);
+	size_t length = iov_iter_count(iter);
 
 	if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS) &&
 	    !is_sync_kiocb(iocb))
-		unaligned_aio = ext4_unaligned_aio(inode, iov, nr_segs, pos);
+		unaligned_aio = ext4_unaligned_aio(inode, iter, pos);
 
 	/* Unaligned direct AIO must be serialized; see comment above */
 	if (unaligned_aio) {
@@ -146,7 +145,7 @@ ext4_file_dio_write(struct kiocb *iocb, const struct iovec *iov,
 			overwrite = 1;
 	}
 
-	ret = __generic_file_aio_write(iocb, iov, nr_segs, &iocb->ki_pos);
+	ret = __generic_file_write_iter(iocb, iter, &iocb->ki_pos);
 	mutex_unlock(&inode->i_mutex);
 
 	if (ret > 0 || ret == -EIOCBQUEUED) {
@@ -165,8 +164,7 @@ ext4_file_dio_write(struct kiocb *iocb, const struct iovec *iov,
 }
 
 static ssize_t
-ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
-		unsigned long nr_segs, loff_t pos)
+ext4_file_write_iter(struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
 {
 	struct inode *inode = file_inode(iocb->ki_filp);
 	ssize_t ret;
@@ -178,22 +176,24 @@ ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
 
 	if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) {
 		struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
-		size_t length = iov_length(iov, nr_segs);
+		size_t length = iov_iter_count(iter);
 
 		if ((pos > sbi->s_bitmap_maxbytes ||
 		    (pos == sbi->s_bitmap_maxbytes && length > 0)))
 			return -EFBIG;
 
 		if (pos + length > sbi->s_bitmap_maxbytes) {
-			nr_segs = iov_shorten((struct iovec *)iov, nr_segs,
-					      sbi->s_bitmap_maxbytes - pos);
+			ret = iov_iter_shorten(iter,
+					       sbi->s_bitmap_maxbytes - pos);
+			if (ret)
+				return ret;
 		}
 	}
 
 	if (unlikely(iocb->ki_filp->f_flags & O_DIRECT))
-		ret = ext4_file_dio_write(iocb, iov, nr_segs, pos);
+		ret = ext4_file_dio_write(iocb, iter, pos);
 	else
-		ret = generic_file_aio_write(iocb, iov, nr_segs, pos);
+		ret = generic_file_write_iter(iocb, iter, pos);
 
 	return ret;
 }
@@ -607,8 +607,8 @@ const struct file_operations ext4_file_operations = {
 	.llseek		= ext4_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read	= generic_file_aio_read,
-	.aio_write	= ext4_file_write,
+	.read_iter	= generic_file_read_iter,
+	.write_iter	= ext4_file_write_iter,
 	.unlocked_ioctl = ext4_ioctl,
 #ifdef CONFIG_COMPAT
 	.compat_ioctl	= ext4_compat_ioctl,
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 23/33] nfs: add support for read_iter, write_iter
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (21 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 22/33] ext4: " Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 24/33] nfs: simplify swap Dave Kleikamp
                   ` (14 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp, Trond Myklebust, linux-nfs

This patch implements the read_iter and write_iter file operations which
allow kernel code to initiate directIO. This allows the loop device to
read and write directly to the server, bypassing the page cache.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
---
 fs/nfs/direct.c        | 247 +++++++++++++++++++++++++++++++++++++------------
 fs/nfs/file.c          |  33 ++++---
 fs/nfs/internal.h      |   4 +-
 fs/nfs/nfs4file.c      |   4 +-
 include/linux/nfs_fs.h |   6 +-
 5 files changed, 210 insertions(+), 84 deletions(-)

diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index bceb47e..2b0ebcb 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -90,6 +90,7 @@ struct nfs_direct_req {
 	int			flags;
 #define NFS_ODIRECT_DO_COMMIT		(1)	/* an unstable reply was received */
 #define NFS_ODIRECT_RESCHED_WRITES	(2)	/* write verification failed */
+#define NFS_ODIRECT_MARK_DIRTY		(4)	/* mark read pages dirty */
 	struct nfs_writeverf	verf;		/* unstable write verifier */
 };
 
@@ -131,15 +132,13 @@ ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
 
 	return -EINVAL;
 #else
-	const struct iovec *iov = iov_iter_iovec(iter);
-
 	VM_BUG_ON(iocb->ki_left != PAGE_SIZE);
 	VM_BUG_ON(iocb->ki_nbytes != PAGE_SIZE);
 
 	if (rw == READ || rw == KERNEL_READ)
-		return nfs_file_direct_read(iocb, iov, iter->nr_segs, pos,
+		return nfs_file_direct_read(iocb, iter, pos,
 				rw == READ ? true : false);
-	return nfs_file_direct_write(iocb, iov, iter->nr_segs, pos,
+	return nfs_file_direct_write(iocb, iter, pos,
 				rw == WRITE ? true : false);
 #endif /* CONFIG_NFS_SWAP */
 }
@@ -269,7 +268,8 @@ static void nfs_direct_read_completion(struct nfs_pgio_header *hdr)
 		struct nfs_page *req = nfs_list_entry(hdr->pages.next);
 		struct page *page = req->wb_page;
 
-		if (!PageCompound(page) && bytes < hdr->good_bytes)
+		if ((dreq->flags & NFS_ODIRECT_MARK_DIRTY) &&
+		    !PageCompound(page) && bytes < hdr->good_bytes)
 			set_page_dirty(page);
 		bytes += req->wb_bytes;
 		nfs_list_remove_request(req);
@@ -401,24 +401,17 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_pageio_descriptor *de
 	return result < 0 ? (ssize_t) result : -EFAULT;
 }
 
-static ssize_t nfs_direct_read_schedule_iovec(struct nfs_direct_req *dreq,
-					      const struct iovec *iov,
-					      unsigned long nr_segs,
-					      loff_t pos, bool uio)
+static ssize_t nfs_direct_do_schedule_read_iovec(
+		struct nfs_pageio_descriptor *desc, const struct iovec *iov,
+		unsigned long nr_segs, loff_t pos, bool uio)
 {
-	struct nfs_pageio_descriptor desc;
 	ssize_t result = -EINVAL;
 	size_t requested_bytes = 0;
 	unsigned long seg;
 
-	NFS_PROTO(dreq->inode)->read_pageio_init(&desc, dreq->inode,
-			     &nfs_direct_read_completion_ops);
-	get_dreq(dreq);
-	desc.pg_dreq = dreq;
-
 	for (seg = 0; seg < nr_segs; seg++) {
 		const struct iovec *vec = &iov[seg];
-		result = nfs_direct_read_schedule_segment(&desc, vec, pos, uio);
+		result = nfs_direct_read_schedule_segment(desc, vec, pos, uio);
 		if (result < 0)
 			break;
 		requested_bytes += result;
@@ -426,6 +419,78 @@ static ssize_t nfs_direct_read_schedule_iovec(struct nfs_direct_req *dreq,
 			break;
 		pos += vec->iov_len;
 	}
+	if (requested_bytes)
+		return requested_bytes;
+
+	return result < 0 ? result : -EIO;
+}
+
+#ifdef CONFIG_BLOCK
+static ssize_t nfs_direct_do_schedule_read_bvec(
+		struct nfs_pageio_descriptor *desc,
+		struct bio_vec *bvec, unsigned long nr_segs, loff_t pos)
+{
+	struct nfs_direct_req *dreq = desc->pg_dreq;
+	struct nfs_open_context *ctx = dreq->ctx;
+	struct inode *inode = ctx->dentry->d_inode;
+	ssize_t result = -EINVAL;
+	size_t requested_bytes = 0;
+	unsigned long seg;
+	struct nfs_page *req;
+	unsigned int req_len;
+
+	for (seg = 0; seg < nr_segs; seg++) {
+		result = -EIO;
+		req_len = bvec[seg].bv_len;
+		req = nfs_create_request(ctx, inode,
+					 bvec[seg].bv_page,
+					 bvec[seg].bv_offset, req_len);
+		if (IS_ERR(req)) {
+			result = PTR_ERR(req);
+			break;
+		}
+		req->wb_index = pos >> PAGE_SHIFT;
+		req->wb_offset = pos & ~PAGE_MASK;
+		if (!nfs_pageio_add_request(desc, req)) {
+			result = desc->pg_error;
+			nfs_release_request(req);
+			break;
+		}
+		requested_bytes += req_len;
+		pos += req_len;
+	}
+
+	if (requested_bytes)
+		return requested_bytes;
+
+	return result < 0 ? result : -EIO;
+}
+#endif /* CONFIG_BLOCK */
+
+static ssize_t nfs_direct_read_schedule(struct nfs_direct_req *dreq,
+					struct iov_iter *iter, loff_t pos,
+					bool uio)
+{
+	struct nfs_pageio_descriptor desc;
+	ssize_t result;
+
+	NFS_PROTO(dreq->inode)->read_pageio_init(&desc, dreq->inode,
+			     &nfs_direct_read_completion_ops);
+	get_dreq(dreq);
+	desc.pg_dreq = dreq;
+
+	if (iov_iter_has_iovec(iter)) {
+		if (uio)
+			dreq->flags = NFS_ODIRECT_MARK_DIRTY;
+		result = nfs_direct_do_schedule_read_iovec(&desc,
+				iov_iter_iovec(iter), iter->nr_segs, pos, uio);
+#ifdef CONFIG_BLOCK
+	} else if (iov_iter_has_bvec(iter)) {
+		result = nfs_direct_do_schedule_read_bvec(&desc,
+				iov_iter_bvec(iter), iter->nr_segs, pos);
+#endif
+	} else
+		BUG();
 
 	nfs_pageio_complete(&desc);
 
@@ -433,9 +498,9 @@ static ssize_t nfs_direct_read_schedule_iovec(struct nfs_direct_req *dreq,
 	 * If no bytes were started, return the error, and let the
 	 * generic layer handle the completion.
 	 */
-	if (requested_bytes == 0) {
+	if (result < 0) {
 		nfs_direct_req_release(dreq);
-		return result < 0 ? result : -EIO;
+		return result;
 	}
 
 	if (put_dreq(dreq))
@@ -443,8 +508,8 @@ static ssize_t nfs_direct_read_schedule_iovec(struct nfs_direct_req *dreq,
 	return 0;
 }
 
-static ssize_t nfs_direct_read(struct kiocb *iocb, const struct iovec *iov,
-			       unsigned long nr_segs, loff_t pos, bool uio)
+static ssize_t nfs_direct_read(struct kiocb *iocb, struct iov_iter *iter,
+			       loff_t pos, bool uio)
 {
 	ssize_t result = -ENOMEM;
 	struct inode *inode = iocb->ki_filp->f_mapping->host;
@@ -456,7 +521,7 @@ static ssize_t nfs_direct_read(struct kiocb *iocb, const struct iovec *iov,
 		goto out;
 
 	dreq->inode = inode;
-	dreq->bytes_left = iov_length(iov, nr_segs);
+	dreq->bytes_left = iov_iter_count(iter);
 	dreq->ctx = get_nfs_open_context(nfs_file_open_context(iocb->ki_filp));
 	l_ctx = nfs_get_lock_context(dreq->ctx);
 	if (IS_ERR(l_ctx)) {
@@ -467,8 +532,8 @@ static ssize_t nfs_direct_read(struct kiocb *iocb, const struct iovec *iov,
 	if (!is_sync_kiocb(iocb))
 		dreq->iocb = iocb;
 
-	NFS_I(inode)->read_io += iov_length(iov, nr_segs);
-	result = nfs_direct_read_schedule_iovec(dreq, iov, nr_segs, pos, uio);
+	NFS_I(inode)->read_io += iov_iter_count(iter);
+	result = nfs_direct_read_schedule(dreq, iter, pos, uio);
 	if (!result)
 		result = nfs_direct_wait(dreq);
 out_release:
@@ -802,27 +867,18 @@ static const struct nfs_pgio_completion_ops nfs_direct_write_completion_ops = {
 	.completion = nfs_direct_write_completion,
 };
 
-static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
-					       const struct iovec *iov,
-					       unsigned long nr_segs,
-					       loff_t pos, bool uio)
+static ssize_t nfs_direct_do_schedule_write_iovec(
+		struct nfs_pageio_descriptor *desc, const struct iovec *iov,
+		unsigned long nr_segs, loff_t pos, bool uio)
 {
-	struct nfs_pageio_descriptor desc;
-	struct inode *inode = dreq->inode;
-	ssize_t result = 0;
+	ssize_t result = -EINVAL;
 	size_t requested_bytes = 0;
 	unsigned long seg;
 
-	NFS_PROTO(inode)->write_pageio_init(&desc, inode, FLUSH_COND_STABLE,
-			      &nfs_direct_write_completion_ops);
-	desc.pg_dreq = dreq;
-	get_dreq(dreq);
-	atomic_inc(&inode->i_dio_count);
-
-	NFS_I(dreq->inode)->write_io += iov_length(iov, nr_segs);
 	for (seg = 0; seg < nr_segs; seg++) {
 		const struct iovec *vec = &iov[seg];
-		result = nfs_direct_write_schedule_segment(&desc, vec, pos, uio);
+		result = nfs_direct_write_schedule_segment(desc, vec,
+							   pos, uio);
 		if (result < 0)
 			break;
 		requested_bytes += result;
@@ -830,16 +886,92 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
 			break;
 		pos += vec->iov_len;
 	}
+
+	if (requested_bytes)
+		return requested_bytes;
+
+	return result < 0 ? result : -EIO;
+}
+
+#ifdef CONFIG_BLOCK
+static ssize_t nfs_direct_do_schedule_write_bvec(
+		struct nfs_pageio_descriptor *desc,
+		struct bio_vec *bvec, unsigned long nr_segs, loff_t pos)
+{
+	struct nfs_direct_req *dreq = desc->pg_dreq;
+	struct nfs_open_context *ctx = dreq->ctx;
+	struct inode *inode = dreq->inode;
+	ssize_t result = 0;
+	size_t requested_bytes = 0;
+	unsigned long seg;
+	struct nfs_page *req;
+	unsigned int req_len;
+
+	for (seg = 0; seg < nr_segs; seg++) {
+		req_len = bvec[seg].bv_len;
+
+		req = nfs_create_request(ctx, inode, bvec[seg].bv_page,
+					 bvec[seg].bv_offset, req_len);
+		if (IS_ERR(req)) {
+			result = PTR_ERR(req);
+			break;
+		}
+		nfs_lock_request(req);
+		req->wb_index = pos >> PAGE_SHIFT;
+		req->wb_offset = pos & ~PAGE_MASK;
+		if (!nfs_pageio_add_request(desc, req)) {
+			result = desc->pg_error;
+			nfs_unlock_and_release_request(req);
+			break;
+		}
+		requested_bytes += req_len;
+		pos += req_len;
+	}
+
+	if (requested_bytes)
+		return requested_bytes;
+
+	return result < 0 ? result : -EIO;
+}
+#endif /* CONFIG_BLOCK */
+
+static ssize_t nfs_direct_write_schedule(struct nfs_direct_req *dreq,
+					 struct iov_iter *iter, loff_t pos,
+					 bool uio)
+{
+	struct nfs_pageio_descriptor desc;
+	struct inode *inode = dreq->inode;
+	ssize_t result = 0;
+
+	NFS_PROTO(inode)->write_pageio_init(&desc, inode, FLUSH_COND_STABLE,
+			      &nfs_direct_write_completion_ops);
+	desc.pg_dreq = dreq;
+	get_dreq(dreq);
+	atomic_inc(&inode->i_dio_count);
+
+	NFS_I(dreq->inode)->write_io += iov_iter_count(iter);
+
+	if (iov_iter_has_iovec(iter)) {
+		result = nfs_direct_do_schedule_write_iovec(&desc,
+				iov_iter_iovec(iter), iter->nr_segs, pos, uio);
+#ifdef CONFIG_BLOCK
+	} else if (iov_iter_has_bvec(iter)) {
+		result = nfs_direct_do_schedule_write_bvec(&desc,
+				iov_iter_bvec(iter), iter->nr_segs, pos);
+#endif
+	} else
+		BUG();
+
 	nfs_pageio_complete(&desc);
 
 	/*
 	 * If no bytes were started, return the error, and let the
 	 * generic layer handle the completion.
 	 */
-	if (requested_bytes == 0) {
+	if (result < 0) {
 		inode_dio_done(inode);
 		nfs_direct_req_release(dreq);
-		return result < 0 ? result : -EIO;
+		return result;
 	}
 
 	if (put_dreq(dreq))
@@ -847,9 +979,8 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
 	return 0;
 }
 
-static ssize_t nfs_direct_write(struct kiocb *iocb, const struct iovec *iov,
-				unsigned long nr_segs, loff_t pos,
-				size_t count, bool uio)
+static ssize_t nfs_direct_write(struct kiocb *iocb, struct iov_iter *iter,
+				loff_t pos, bool uio)
 {
 	ssize_t result = -ENOMEM;
 	struct inode *inode = iocb->ki_filp->f_mapping->host;
@@ -861,7 +992,7 @@ static ssize_t nfs_direct_write(struct kiocb *iocb, const struct iovec *iov,
 		goto out;
 
 	dreq->inode = inode;
-	dreq->bytes_left = count;
+	dreq->bytes_left = iov_iter_count(iter);
 	dreq->ctx = get_nfs_open_context(nfs_file_open_context(iocb->ki_filp));
 	l_ctx = nfs_get_lock_context(dreq->ctx);
 	if (IS_ERR(l_ctx)) {
@@ -872,7 +1003,7 @@ static ssize_t nfs_direct_write(struct kiocb *iocb, const struct iovec *iov,
 	if (!is_sync_kiocb(iocb))
 		dreq->iocb = iocb;
 
-	result = nfs_direct_write_schedule_iovec(dreq, iov, nr_segs, pos, uio);
+	result = nfs_direct_write_schedule(dreq, iter, pos, uio);
 	if (!result)
 		result = nfs_direct_wait(dreq);
 out_release:
@@ -884,12 +1015,11 @@ out:
 /**
  * nfs_file_direct_read - file direct read operation for NFS files
  * @iocb: target I/O control block
- * @iov: vector of user buffers into which to read data
- * @nr_segs: size of iov vector
+ * @iter: vector of buffers into which to read data
  * @pos: byte offset in file where reading starts
  *
  * We use this function for direct reads instead of calling
- * generic_file_aio_read() in order to avoid gfar's check to see if
+ * generic_file_read_iter() in order to avoid gfar's check to see if
  * the request starts before the end of the file.  For that check
  * to work, we must generate a GETATTR before each direct read, and
  * even then there is a window between the GETATTR and the subsequent
@@ -902,15 +1032,15 @@ out:
  * client must read the updated atime from the server back into its
  * cache.
  */
-ssize_t nfs_file_direct_read(struct kiocb *iocb, const struct iovec *iov,
-				unsigned long nr_segs, loff_t pos, bool uio)
+ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter,
+			     loff_t pos, bool uio)
 {
 	ssize_t retval = -EINVAL;
 	struct file *file = iocb->ki_filp;
 	struct address_space *mapping = file->f_mapping;
 	size_t count;
 
-	count = iov_length(iov, nr_segs);
+	count = iov_iter_count(iter);
 	nfs_add_stats(mapping->host, NFSIOS_DIRECTREADBYTES, count);
 
 	dfprintk(FILE, "NFS: direct read(%s/%s, %zd@%Ld)\n",
@@ -928,7 +1058,7 @@ ssize_t nfs_file_direct_read(struct kiocb *iocb, const struct iovec *iov,
 
 	task_io_account_read(count);
 
-	retval = nfs_direct_read(iocb, iov, nr_segs, pos, uio);
+	retval = nfs_direct_read(iocb, iter, pos, uio);
 	if (retval > 0)
 		iocb->ki_pos = pos + retval;
 
@@ -939,12 +1069,11 @@ out:
 /**
  * nfs_file_direct_write - file direct write operation for NFS files
  * @iocb: target I/O control block
- * @iov: vector of user buffers from which to write data
- * @nr_segs: size of iov vector
+ * @iter: vector of buffers from which to write data
  * @pos: byte offset in file where writing starts
  *
  * We use this function for direct writes instead of calling
- * generic_file_aio_write() in order to avoid taking the inode
+ * generic_file_write_iter() in order to avoid taking the inode
  * semaphore and updating the i_size.  The NFS server will set
  * the new i_size and this client must read the updated size
  * back into its cache.  We let the server do generic write
@@ -958,15 +1087,15 @@ out:
  * Note that O_APPEND is not supported for NFS direct writes, as there
  * is no atomic O_APPEND write facility in the NFS protocol.
  */
-ssize_t nfs_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
-				unsigned long nr_segs, loff_t pos, bool uio)
+ssize_t nfs_file_direct_write(struct kiocb *iocb, struct iov_iter *iter,
+			      loff_t pos, bool uio)
 {
 	ssize_t retval = -EINVAL;
 	struct file *file = iocb->ki_filp;
 	struct address_space *mapping = file->f_mapping;
 	size_t count;
 
-	count = iov_length(iov, nr_segs);
+	count = iov_iter_count(iter);
 	nfs_add_stats(mapping->host, NFSIOS_DIRECTWRITTENBYTES, count);
 
 	dfprintk(FILE, "NFS: direct write(%s/%s, %zd@%Ld)\n",
@@ -991,7 +1120,7 @@ ssize_t nfs_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
 
 	task_io_account_write(count);
 
-	retval = nfs_direct_write(iocb, iov, nr_segs, pos, count, uio);
+	retval = nfs_direct_write(iocb, iter, pos, uio);
 	if (retval > 0) {
 		struct inode *inode = mapping->host;
 
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 94e94bd..bbff2f9 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -172,29 +172,28 @@ nfs_file_flush(struct file *file, fl_owner_t id)
 EXPORT_SYMBOL_GPL(nfs_file_flush);
 
 ssize_t
-nfs_file_read(struct kiocb *iocb, const struct iovec *iov,
-		unsigned long nr_segs, loff_t pos)
+nfs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
 {
 	struct dentry * dentry = iocb->ki_filp->f_path.dentry;
 	struct inode * inode = dentry->d_inode;
 	ssize_t result;
 
 	if (iocb->ki_filp->f_flags & O_DIRECT)
-		return nfs_file_direct_read(iocb, iov, nr_segs, pos, true);
+		return nfs_file_direct_read(iocb, iter, pos, true);
 
-	dprintk("NFS: read(%s/%s, %lu@%lu)\n",
+	dprintk("NFS: read_iter(%s/%s, %lu@%lu)\n",
 		dentry->d_parent->d_name.name, dentry->d_name.name,
-		(unsigned long) iov_length(iov, nr_segs), (unsigned long) pos);
+		(unsigned long) iov_iter_count(iter), (unsigned long) pos);
 
 	result = nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping);
 	if (!result) {
-		result = generic_file_aio_read(iocb, iov, nr_segs, pos);
+		result = generic_file_read_iter(iocb, iter, pos);
 		if (result > 0)
 			nfs_add_stats(inode, NFSIOS_NORMALREADBYTES, result);
 	}
 	return result;
 }
-EXPORT_SYMBOL_GPL(nfs_file_read);
+EXPORT_SYMBOL_GPL(nfs_file_read_iter);
 
 ssize_t
 nfs_file_splice_read(struct file *filp, loff_t *ppos,
@@ -250,7 +249,7 @@ EXPORT_SYMBOL_GPL(nfs_file_mmap);
  * disk, but it retrieves and clears ctx->error after synching, despite
  * the two being set at the same time in nfs_context_set_write_error().
  * This is because the former is used to notify the _next_ call to
- * nfs_file_write() that a write error occurred, and hence cause it to
+ * nfs_file_write_iter() that a write error occurred, and hence cause it to
  * fall back to doing a synchronous write.
  */
 int
@@ -642,19 +641,19 @@ static int nfs_need_sync_write(struct file *filp, struct inode *inode)
 	return 0;
 }
 
-ssize_t nfs_file_write(struct kiocb *iocb, const struct iovec *iov,
-		       unsigned long nr_segs, loff_t pos)
+ssize_t nfs_file_write_iter(struct kiocb *iocb, struct iov_iter *iter,
+				   loff_t pos)
 {
 	struct dentry * dentry = iocb->ki_filp->f_path.dentry;
 	struct inode * inode = dentry->d_inode;
 	unsigned long written = 0;
 	ssize_t result;
-	size_t count = iov_length(iov, nr_segs);
+	size_t count = iov_iter_count(iter);
 
 	if (iocb->ki_filp->f_flags & O_DIRECT)
-		return nfs_file_direct_write(iocb, iov, nr_segs, pos, true);
+		return nfs_file_direct_write(iocb, iter, pos, true);
 
-	dprintk("NFS: write(%s/%s, %lu@%Ld)\n",
+	dprintk("NFS: write_iter(%s/%s, %lu@%lld)\n",
 		dentry->d_parent->d_name.name, dentry->d_name.name,
 		(unsigned long) count, (long long) pos);
 
@@ -674,7 +673,7 @@ ssize_t nfs_file_write(struct kiocb *iocb, const struct iovec *iov,
 	if (!count)
 		goto out;
 
-	result = generic_file_aio_write(iocb, iov, nr_segs, pos);
+	result = generic_file_write_iter(iocb, iter, pos);
 	if (result > 0)
 		written = result;
 
@@ -693,7 +692,7 @@ out_swapfile:
 	printk(KERN_INFO "NFS: attempt to write to active swap file!\n");
 	goto out;
 }
-EXPORT_SYMBOL_GPL(nfs_file_write);
+EXPORT_SYMBOL_GPL(nfs_file_write_iter);
 
 ssize_t nfs_file_splice_write(struct pipe_inode_info *pipe,
 			      struct file *filp, loff_t *ppos,
@@ -953,8 +952,8 @@ const struct file_operations nfs_file_operations = {
 	.llseek		= nfs_file_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read	= nfs_file_read,
-	.aio_write	= nfs_file_write,
+	.read_iter	= nfs_file_read_iter,
+	.write_iter	= nfs_file_write_iter,
 	.mmap		= nfs_file_mmap,
 	.open		= nfs_file_open,
 	.flush		= nfs_file_flush,
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 3c8373f..d689ca9 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -286,11 +286,11 @@ int nfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *)
 int nfs_file_fsync_commit(struct file *, loff_t, loff_t, int);
 loff_t nfs_file_llseek(struct file *, loff_t, int);
 int nfs_file_flush(struct file *, fl_owner_t);
-ssize_t nfs_file_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
+ssize_t nfs_file_read_iter(struct kiocb *, struct iov_iter *, loff_t);
 ssize_t nfs_file_splice_read(struct file *, loff_t *, struct pipe_inode_info *,
 			     size_t, unsigned int);
 int nfs_file_mmap(struct file *, struct vm_area_struct *);
-ssize_t nfs_file_write(struct kiocb *, const struct iovec *, unsigned long, loff_t);
+ssize_t nfs_file_write_iter(struct kiocb *, struct iov_iter *, loff_t);
 int nfs_file_release(struct inode *, struct file *);
 int nfs_lock(struct file *, int, struct file_lock *);
 int nfs_flock(struct file *, int, struct file_lock *);
diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
index e5b804d..e13bb02 100644
--- a/fs/nfs/nfs4file.c
+++ b/fs/nfs/nfs4file.c
@@ -121,8 +121,8 @@ const struct file_operations nfs4_file_operations = {
 	.llseek		= nfs_file_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read	= nfs_file_read,
-	.aio_write	= nfs_file_write,
+	.read_iter	= nfs_file_read_iter,
+	.write_iter	= nfs_file_write_iter,
 	.mmap		= nfs_file_mmap,
 	.open		= nfs4_file_open,
 	.flush		= nfs_file_flush,
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index a4b19d2..b2324be 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -458,11 +458,9 @@ extern int nfs3_removexattr (struct dentry *, const char *name);
  * linux/fs/nfs/direct.c
  */
 extern ssize_t nfs_direct_IO(int, struct kiocb *, struct iov_iter *, loff_t);
-extern ssize_t nfs_file_direct_read(struct kiocb *iocb,
-			const struct iovec *iov, unsigned long nr_segs,
+extern ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter,
 			loff_t pos, bool uio);
-extern ssize_t nfs_file_direct_write(struct kiocb *iocb,
-			const struct iovec *iov, unsigned long nr_segs,
+extern ssize_t nfs_file_direct_write(struct kiocb *iocb, struct iov_iter *iter,
 			loff_t pos, bool uio);
 
 /*
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 24/33] nfs: simplify swap
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (22 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 23/33] nfs: add support for read_iter, write_iter Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 25/33] btrfs: add support for read_iter and write_iter Dave Kleikamp
                   ` (13 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp, Mel Gorman, Trond Myklebust, linux-nfs

swap_writepage can now call nfs's write_iter f_op, eliminating the need to
implement for the special-case direct_IO a_op. There is no longer a need to
pass the uio flag through the direct write path.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
---
 fs/nfs/direct.c           | 94 ++++++++++++++++-------------------------------
 fs/nfs/file.c             |  4 +-
 include/linux/blk_types.h |  2 -
 include/linux/fs.h        |  2 -
 include/linux/nfs_fs.h    |  4 +-
 mm/page_io.c              | 13 +++----
 6 files changed, 42 insertions(+), 77 deletions(-)

diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 2b0ebcb..239c2fe 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -118,29 +118,18 @@ static inline int put_dreq(struct nfs_direct_req *dreq)
  * @nr_segs: size of iovec array
  *
  * The presence of this routine in the address space ops vector means
- * the NFS client supports direct I/O. However, for most direct IO, we
- * shunt off direct read and write requests before the VFS gets them,
- * so this method is only ever called for swap.
+ * the NFS client supports direct I/O. However, we shunt off direct
+ * read and write requests before the VFS gets them, so this method
+ * should never be called.
  */
 ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
 		      loff_t pos)
 {
-#ifndef CONFIG_NFS_SWAP
 	dprintk("NFS: nfs_direct_IO (%s) off/no(%Ld/%lu) EINVAL\n",
 			iocb->ki_filp->f_path.dentry->d_name.name,
 			(long long) pos, iter->nr_segs);
 
 	return -EINVAL;
-#else
-	VM_BUG_ON(iocb->ki_left != PAGE_SIZE);
-	VM_BUG_ON(iocb->ki_nbytes != PAGE_SIZE);
-
-	if (rw == READ || rw == KERNEL_READ)
-		return nfs_file_direct_read(iocb, iter, pos,
-				rw == READ ? true : false);
-	return nfs_file_direct_write(iocb, iter, pos,
-				rw == WRITE ? true : false);
-#endif /* CONFIG_NFS_SWAP */
 }
 
 static void nfs_direct_release_pages(struct page **pages, unsigned int npages)
@@ -312,7 +301,7 @@ static const struct nfs_pgio_completion_ops nfs_direct_read_completion_ops = {
  */
 static ssize_t nfs_direct_read_schedule_segment(struct nfs_pageio_descriptor *desc,
 						const struct iovec *iov,
-						loff_t pos, bool uio)
+						loff_t pos)
 {
 	struct nfs_direct_req *dreq = desc->pg_dreq;
 	struct nfs_open_context *ctx = dreq->ctx;
@@ -340,20 +329,12 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_pageio_descriptor *de
 					  GFP_KERNEL);
 		if (!pagevec)
 			break;
-		if (uio) {
-			down_read(&current->mm->mmap_sem);
-			result = get_user_pages(current, current->mm, user_addr,
+		down_read(&current->mm->mmap_sem);
+		result = get_user_pages(current, current->mm, user_addr,
 					npages, 1, 0, pagevec, NULL);
-			up_read(&current->mm->mmap_sem);
-			if (result < 0)
-				break;
-		} else {
-			WARN_ON(npages != 1);
-			result = get_kernel_page(user_addr, 1, pagevec);
-			if (WARN_ON(result != 1))
-				break;
-		}
-
+		up_read(&current->mm->mmap_sem);
+		if (result < 0)
+			break;
 		if ((unsigned)result < npages) {
 			bytes = result * PAGE_SIZE;
 			if (bytes <= pgbase) {
@@ -403,7 +384,7 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_pageio_descriptor *de
 
 static ssize_t nfs_direct_do_schedule_read_iovec(
 		struct nfs_pageio_descriptor *desc, const struct iovec *iov,
-		unsigned long nr_segs, loff_t pos, bool uio)
+		unsigned long nr_segs, loff_t pos)
 {
 	ssize_t result = -EINVAL;
 	size_t requested_bytes = 0;
@@ -411,7 +392,7 @@ static ssize_t nfs_direct_do_schedule_read_iovec(
 
 	for (seg = 0; seg < nr_segs; seg++) {
 		const struct iovec *vec = &iov[seg];
-		result = nfs_direct_read_schedule_segment(desc, vec, pos, uio);
+		result = nfs_direct_read_schedule_segment(desc, vec, pos);
 		if (result < 0)
 			break;
 		requested_bytes += result;
@@ -468,8 +449,7 @@ static ssize_t nfs_direct_do_schedule_read_bvec(
 #endif /* CONFIG_BLOCK */
 
 static ssize_t nfs_direct_read_schedule(struct nfs_direct_req *dreq,
-					struct iov_iter *iter, loff_t pos,
-					bool uio)
+					struct iov_iter *iter, loff_t pos)
 {
 	struct nfs_pageio_descriptor desc;
 	ssize_t result;
@@ -480,10 +460,8 @@ static ssize_t nfs_direct_read_schedule(struct nfs_direct_req *dreq,
 	desc.pg_dreq = dreq;
 
 	if (iov_iter_has_iovec(iter)) {
-		if (uio)
-			dreq->flags = NFS_ODIRECT_MARK_DIRTY;
 		result = nfs_direct_do_schedule_read_iovec(&desc,
-				iov_iter_iovec(iter), iter->nr_segs, pos, uio);
+				iov_iter_iovec(iter), iter->nr_segs, pos);
 #ifdef CONFIG_BLOCK
 	} else if (iov_iter_has_bvec(iter)) {
 		result = nfs_direct_do_schedule_read_bvec(&desc,
@@ -509,7 +487,7 @@ static ssize_t nfs_direct_read_schedule(struct nfs_direct_req *dreq,
 }
 
 static ssize_t nfs_direct_read(struct kiocb *iocb, struct iov_iter *iter,
-			       loff_t pos, bool uio)
+			       loff_t pos)
 {
 	ssize_t result = -ENOMEM;
 	struct inode *inode = iocb->ki_filp->f_mapping->host;
@@ -533,7 +511,7 @@ static ssize_t nfs_direct_read(struct kiocb *iocb, struct iov_iter *iter,
 		dreq->iocb = iocb;
 
 	NFS_I(inode)->read_io += iov_iter_count(iter);
-	result = nfs_direct_read_schedule(dreq, iter, pos, uio);
+	result = nfs_direct_read_schedule(dreq, iter, pos);
 	if (!result)
 		result = nfs_direct_wait(dreq);
 out_release:
@@ -698,7 +676,7 @@ static void nfs_direct_write_complete(struct nfs_direct_req *dreq, struct inode
  */
 static ssize_t nfs_direct_write_schedule_segment(struct nfs_pageio_descriptor *desc,
 						 const struct iovec *iov,
-						 loff_t pos, bool uio)
+						 loff_t pos)
 {
 	struct nfs_direct_req *dreq = desc->pg_dreq;
 	struct nfs_open_context *ctx = dreq->ctx;
@@ -726,19 +704,12 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_pageio_descriptor *d
 		if (!pagevec)
 			break;
 
-		if (uio) {
-			down_read(&current->mm->mmap_sem);
-			result = get_user_pages(current, current->mm, user_addr,
-						npages, 0, 0, pagevec, NULL);
-			up_read(&current->mm->mmap_sem);
-			if (result < 0)
-				break;
-		} else {
-			WARN_ON(npages != 1);
-			result = get_kernel_page(user_addr, 0, pagevec);
-			if (WARN_ON(result != 1))
-				break;
-		}
+		down_read(&current->mm->mmap_sem);
+		result = get_user_pages(current, current->mm, user_addr,
+					npages, 0, 0, pagevec, NULL);
+		up_read(&current->mm->mmap_sem);
+		if (result < 0)
+			break;
 
 		if ((unsigned)result < npages) {
 			bytes = result * PAGE_SIZE;
@@ -869,7 +840,7 @@ static const struct nfs_pgio_completion_ops nfs_direct_write_completion_ops = {
 
 static ssize_t nfs_direct_do_schedule_write_iovec(
 		struct nfs_pageio_descriptor *desc, const struct iovec *iov,
-		unsigned long nr_segs, loff_t pos, bool uio)
+		unsigned long nr_segs, loff_t pos)
 {
 	ssize_t result = -EINVAL;
 	size_t requested_bytes = 0;
@@ -878,7 +849,7 @@ static ssize_t nfs_direct_do_schedule_write_iovec(
 	for (seg = 0; seg < nr_segs; seg++) {
 		const struct iovec *vec = &iov[seg];
 		result = nfs_direct_write_schedule_segment(desc, vec,
-							   pos, uio);
+							   pos);
 		if (result < 0)
 			break;
 		requested_bytes += result;
@@ -936,8 +907,7 @@ static ssize_t nfs_direct_do_schedule_write_bvec(
 #endif /* CONFIG_BLOCK */
 
 static ssize_t nfs_direct_write_schedule(struct nfs_direct_req *dreq,
-					 struct iov_iter *iter, loff_t pos,
-					 bool uio)
+					 struct iov_iter *iter, loff_t pos)
 {
 	struct nfs_pageio_descriptor desc;
 	struct inode *inode = dreq->inode;
@@ -953,7 +923,7 @@ static ssize_t nfs_direct_write_schedule(struct nfs_direct_req *dreq,
 
 	if (iov_iter_has_iovec(iter)) {
 		result = nfs_direct_do_schedule_write_iovec(&desc,
-				iov_iter_iovec(iter), iter->nr_segs, pos, uio);
+				iov_iter_iovec(iter), iter->nr_segs, pos);
 #ifdef CONFIG_BLOCK
 	} else if (iov_iter_has_bvec(iter)) {
 		result = nfs_direct_do_schedule_write_bvec(&desc,
@@ -980,7 +950,7 @@ static ssize_t nfs_direct_write_schedule(struct nfs_direct_req *dreq,
 }
 
 static ssize_t nfs_direct_write(struct kiocb *iocb, struct iov_iter *iter,
-				loff_t pos, bool uio)
+				loff_t pos)
 {
 	ssize_t result = -ENOMEM;
 	struct inode *inode = iocb->ki_filp->f_mapping->host;
@@ -1003,7 +973,7 @@ static ssize_t nfs_direct_write(struct kiocb *iocb, struct iov_iter *iter,
 	if (!is_sync_kiocb(iocb))
 		dreq->iocb = iocb;
 
-	result = nfs_direct_write_schedule(dreq, iter, pos, uio);
+	result = nfs_direct_write_schedule(dreq, iter, pos);
 	if (!result)
 		result = nfs_direct_wait(dreq);
 out_release:
@@ -1033,7 +1003,7 @@ out:
  * cache.
  */
 ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter,
-			     loff_t pos, bool uio)
+			     loff_t pos)
 {
 	ssize_t retval = -EINVAL;
 	struct file *file = iocb->ki_filp;
@@ -1058,7 +1028,7 @@ ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter,
 
 	task_io_account_read(count);
 
-	retval = nfs_direct_read(iocb, iter, pos, uio);
+	retval = nfs_direct_read(iocb, iter, pos);
 	if (retval > 0)
 		iocb->ki_pos = pos + retval;
 
@@ -1088,7 +1058,7 @@ out:
  * is no atomic O_APPEND write facility in the NFS protocol.
  */
 ssize_t nfs_file_direct_write(struct kiocb *iocb, struct iov_iter *iter,
-			      loff_t pos, bool uio)
+			      loff_t pos)
 {
 	ssize_t retval = -EINVAL;
 	struct file *file = iocb->ki_filp;
@@ -1120,7 +1090,7 @@ ssize_t nfs_file_direct_write(struct kiocb *iocb, struct iov_iter *iter,
 
 	task_io_account_write(count);
 
-	retval = nfs_direct_write(iocb, iter, pos, uio);
+	retval = nfs_direct_write(iocb, iter, pos);
 	if (retval > 0) {
 		struct inode *inode = mapping->host;
 
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index bbff2f9..3e210ca 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -179,7 +179,7 @@ nfs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
 	ssize_t result;
 
 	if (iocb->ki_filp->f_flags & O_DIRECT)
-		return nfs_file_direct_read(iocb, iter, pos, true);
+		return nfs_file_direct_read(iocb, iter, pos);
 
 	dprintk("NFS: read_iter(%s/%s, %lu@%lu)\n",
 		dentry->d_parent->d_name.name, dentry->d_name.name,
@@ -651,7 +651,7 @@ ssize_t nfs_file_write_iter(struct kiocb *iocb, struct iov_iter *iter,
 	size_t count = iov_iter_count(iter);
 
 	if (iocb->ki_filp->f_flags & O_DIRECT)
-		return nfs_file_direct_write(iocb, iter, pos, true);
+		return nfs_file_direct_write(iocb, iter, pos);
 
 	dprintk("NFS: write_iter(%s/%s, %lu@%lld)\n",
 		dentry->d_parent->d_name.name, dentry->d_name.name,
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index fa1abeb..1bea25f 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -176,7 +176,6 @@ enum rq_flag_bits {
 	__REQ_FLUSH_SEQ,	/* request for flush sequence */
 	__REQ_IO_STAT,		/* account I/O stat */
 	__REQ_MIXED_MERGE,	/* merge of different types, fail separately */
-	__REQ_KERNEL, 		/* direct IO to kernel pages */
 	__REQ_PM,		/* runtime pm request */
 	__REQ_NR_BITS,		/* stops here */
 };
@@ -227,7 +226,6 @@ enum rq_flag_bits {
 #define REQ_IO_STAT		(1 << __REQ_IO_STAT)
 #define REQ_MIXED_MERGE		(1 << __REQ_MIXED_MERGE)
 #define REQ_SECURE		(1 << __REQ_SECURE)
-#define REQ_KERNEL		(1 << __REQ_KERNEL)
 #define REQ_PM			(1 << __REQ_PM)
 
 #endif /* __LINUX_BLK_TYPES_H */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 26d9d8d4..06f2290 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -181,8 +181,6 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
 #define READ			0
 #define WRITE			RW_MASK
 #define READA			RWA_MASK
-#define KERNEL_READ		(READ|REQ_KERNEL)
-#define KERNEL_WRITE		(WRITE|REQ_KERNEL)
 
 #define READ_SYNC		(READ | REQ_SYNC)
 #define WRITE_SYNC		(WRITE | REQ_SYNC | REQ_NOIDLE)
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index b2324be..1f6a332 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -459,9 +459,9 @@ extern int nfs3_removexattr (struct dentry *, const char *name);
  */
 extern ssize_t nfs_direct_IO(int, struct kiocb *, struct iov_iter *, loff_t);
 extern ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter,
-			loff_t pos, bool uio);
+			loff_t pos);
 extern ssize_t nfs_file_direct_write(struct kiocb *iocb, struct iov_iter *iter,
-			loff_t pos, bool uio);
+			loff_t pos);
 
 /*
  * linux/fs/nfs/dir.c
diff --git a/mm/page_io.c b/mm/page_io.c
index 0c1db1a..21023df 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -258,14 +258,14 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
 	if (sis->flags & SWP_FILE) {
 		struct kiocb kiocb;
 		struct file *swap_file = sis->swap_file;
-		struct address_space *mapping = swap_file->f_mapping;
-		struct iovec iov = {
-			.iov_base = kmap(page),
-			.iov_len  = PAGE_SIZE,
+		struct bio_vec bvec = {
+			.bv_page = kmap(page),
+			.bv_len = PAGE_SIZE,
+			.bv_offset = 0,
 		};
 		struct iov_iter iter;
 
-		iov_iter_init(&iter, &iov, 1, PAGE_SIZE, 0);
+		iov_iter_init_bvec(&iter, &bvec, 1, PAGE_SIZE, 0);
 
 		init_sync_kiocb(&kiocb, swap_file);
 		kiocb.ki_pos = page_file_offset(page);
@@ -274,8 +274,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
 
 		set_page_writeback(page);
 		unlock_page(page);
-		ret = mapping->a_ops->direct_IO(KERNEL_WRITE, &kiocb, &iter,
-						kiocb.ki_pos);
+		ret = swap_file->f_op->write_iter(&kiocb, &iter, kiocb.ki_pos);
 		kunmap(page);
 		if (ret == PAGE_SIZE) {
 			count_vm_event(PSWPOUT);
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 25/33] btrfs: add support for read_iter and write_iter
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (23 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 24/33] nfs: simplify swap Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 26/33] block_dev: add support for read_iter, write_iter Dave Kleikamp
                   ` (12 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp, Chris Mason, linux-btrfs

btrfs can use generic_file_read_iter(). Base btrfs_file_write_iter()
on btrfs_file_aio_write(), then have the latter call the former.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
Cc: Chris Mason <chris.mason@fusionio.com>
Cc: linux-btrfs@vger.kernel.org
---
 fs/btrfs/file.c | 42 ++++++++++++++----------------------------
 1 file changed, 14 insertions(+), 28 deletions(-)

diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index a005fe2..ca28faa 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -453,7 +453,7 @@ static noinline int btrfs_copy_from_user(loff_t pos, int num_pages,
 		write_bytes -= copied;
 		total_copied += copied;
 
-		/* Return to btrfs_file_aio_write to fault page */
+		/* Return to btrfs_file_write_iter to fault page */
 		if (unlikely(copied == 0))
 			break;
 
@@ -1548,27 +1548,23 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
 }
 
 static ssize_t __btrfs_direct_write(struct kiocb *iocb,
-				    const struct iovec *iov,
-				    unsigned long nr_segs, loff_t pos,
-				    loff_t *ppos, size_t count, size_t ocount)
+				     struct iov_iter *iter, loff_t pos,
+				    loff_t *ppos, size_t count)
 {
 	struct file *file = iocb->ki_filp;
-	struct iov_iter i;
 	ssize_t written;
 	ssize_t written_buffered;
 	loff_t endbyte;
 	int err;
 
-	written = generic_file_direct_write(iocb, iov, &nr_segs, pos, ppos,
-					    count, ocount);
+	written = generic_file_direct_write_iter(iocb, iter, pos, ppos, count);
 
 	if (written < 0 || written == count)
 		return written;
 
 	pos += written;
 	count -= written;
-	iov_iter_init(&i, iov, nr_segs, count, written);
-	written_buffered = __btrfs_buffered_write(file, &i, pos);
+	written_buffered = __btrfs_buffered_write(file, iter, pos);
 	if (written_buffered < 0) {
 		err = written_buffered;
 		goto out;
@@ -1603,9 +1599,8 @@ static void update_time_for_write(struct inode *inode)
 		inode_inc_iversion(inode);
 }
 
-static ssize_t btrfs_file_aio_write(struct kiocb *iocb,
-				    const struct iovec *iov,
-				    unsigned long nr_segs, loff_t pos)
+static ssize_t btrfs_file_write_iter(struct kiocb *iocb,
+				     struct iov_iter *iter, loff_t pos)
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = file_inode(file);
@@ -1614,17 +1609,12 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb,
 	u64 start_pos;
 	ssize_t num_written = 0;
 	ssize_t err = 0;
-	size_t count, ocount;
+	size_t count;
 	bool sync = (file->f_flags & O_DSYNC) || IS_SYNC(file->f_mapping->host);
 
 	mutex_lock(&inode->i_mutex);
 
-	err = generic_segment_checks(iov, &nr_segs, &ocount, VERIFY_READ);
-	if (err) {
-		mutex_unlock(&inode->i_mutex);
-		goto out;
-	}
-	count = ocount;
+	count = iov_iter_count(iter);
 
 	current->backing_dev_info = inode->i_mapping->backing_dev_info;
 	err = generic_write_checks(file, &pos, &count, S_ISBLK(inode->i_mode));
@@ -1677,14 +1667,10 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb,
 		atomic_inc(&BTRFS_I(inode)->sync_writers);
 
 	if (unlikely(file->f_flags & O_DIRECT)) {
-		num_written = __btrfs_direct_write(iocb, iov, nr_segs,
-						   pos, ppos, count, ocount);
+		num_written = __btrfs_direct_write(iocb, iter, pos, ppos,
+						   count);
 	} else {
-		struct iov_iter i;
-
-		iov_iter_init(&i, iov, nr_segs, count, num_written);
-
-		num_written = __btrfs_buffered_write(file, &i, pos);
+		num_written = __btrfs_buffered_write(file, iter, pos);
 		if (num_written > 0)
 			*ppos = pos + num_written;
 	}
@@ -2543,9 +2529,9 @@ const struct file_operations btrfs_file_operations = {
 	.llseek		= btrfs_file_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read       = generic_file_aio_read,
 	.splice_read	= generic_file_splice_read,
-	.aio_write	= btrfs_file_aio_write,
+	.read_iter	= generic_file_read_iter,
+	.write_iter	= btrfs_file_write_iter,
 	.mmap		= btrfs_file_mmap,
 	.open		= generic_file_open,
 	.release	= btrfs_release_file,
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 26/33] block_dev: add support for read_iter, write_iter
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (24 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 25/33] btrfs: add support for read_iter and write_iter Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 27/33] xfs: add support for read_iter and write_iter Dave Kleikamp
                   ` (11 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Asias He, Dave Kleikamp

From: Asias He <asias@redhat.com>

Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
---
 drivers/char/raw.c |  4 ++--
 fs/block_dev.c     | 19 +++++++++----------
 include/linux/fs.h |  4 ++--
 3 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index f3223aa..db5fa4e 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -285,9 +285,9 @@ static long raw_ctl_compat_ioctl(struct file *file, unsigned int cmd,
 
 static const struct file_operations raw_fops = {
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.write		= do_sync_write,
-	.aio_write	= blkdev_aio_write,
+	.write_iter	= blkdev_write_iter,
 	.fsync		= blkdev_fsync,
 	.open		= raw_open,
 	.release	= raw_release,
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 6f8c9e4..89d8ec5 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1508,8 +1508,7 @@ static long block_ioctl(struct file *file, unsigned cmd, unsigned long arg)
  * Does not take i_mutex for the write and thus is not for general purpose
  * use.
  */
-ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
-			 unsigned long nr_segs, loff_t pos)
+ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
 {
 	struct file *file = iocb->ki_filp;
 	struct blk_plug plug;
@@ -1518,7 +1517,7 @@ ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
 	BUG_ON(iocb->ki_pos != pos);
 
 	blk_start_plug(&plug);
-	ret = __generic_file_aio_write(iocb, iov, nr_segs, &iocb->ki_pos);
+	ret = __generic_file_write_iter(iocb, iter, &iocb->ki_pos);
 	if (ret > 0 || ret == -EIOCBQUEUED) {
 		ssize_t err;
 
@@ -1529,10 +1528,10 @@ ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
 	blk_finish_plug(&plug);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(blkdev_aio_write);
+EXPORT_SYMBOL_GPL(blkdev_write_iter);
 
-static ssize_t blkdev_aio_read(struct kiocb *iocb, const struct iovec *iov,
-			 unsigned long nr_segs, loff_t pos)
+static ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *iter,
+			 loff_t pos)
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *bd_inode = file->f_mapping->host;
@@ -1543,8 +1542,8 @@ static ssize_t blkdev_aio_read(struct kiocb *iocb, const struct iovec *iov,
 
 	size -= pos;
 	if (size < iocb->ki_left)
-		nr_segs = iov_shorten((struct iovec *)iov, nr_segs, size);
-	return generic_file_aio_read(iocb, iov, nr_segs, pos);
+		iov_iter_shorten(iter, size);
+	return generic_file_read_iter(iocb, iter, pos);
 }
 
 /*
@@ -1578,8 +1577,8 @@ const struct file_operations def_blk_fops = {
 	.llseek		= block_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read	= blkdev_aio_read,
-	.aio_write	= blkdev_aio_write,
+	.read_iter	= blkdev_read_iter,
+	.write_iter	= blkdev_write_iter,
 	.mmap		= generic_file_mmap,
 	.fsync		= blkdev_fsync,
 	.unlocked_ioctl	= block_ioctl,
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 06f2290..269ef07 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2526,8 +2526,8 @@ extern int generic_segment_checks(const struct iovec *iov,
 		unsigned long *nr_segs, size_t *count, int access_flags);
 
 /* fs/block_dev.c */
-extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
-				unsigned long nr_segs, loff_t pos);
+extern ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *iter,
+				 loff_t pos);
 extern int blkdev_fsync(struct file *filp, loff_t start, loff_t end,
 			int datasync);
 extern void block_sync_page(struct page *page);
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 27/33] xfs: add support for read_iter and write_iter
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (25 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 26/33] block_dev: add support for read_iter, write_iter Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-26 11:51   ` Dave Chinner
  2013-07-25 17:50 ` [PATCH V8 28/33] gfs2: Convert aio_read/write ops to read/write_iter Dave Kleikamp
                   ` (10 subsequent siblings)
  37 siblings, 1 reply; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alex Elder, xfs, Ben Myers, Dave Kleikamp, linux-fsdevel,
	Andrew Morton, Zach Brown, Maxim V. Patlasov

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Ben Myers <bpm@sgi.com>
Cc: Alex Elder <elder@kernel.org>
Cc: xfs@oss.sgi.com
---
 fs/xfs/xfs_file.c | 51 ++++++++++++++++++++-------------------------------
 1 file changed, 20 insertions(+), 31 deletions(-)

diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index de3dc98..1716b6a 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -226,10 +226,9 @@ xfs_file_fsync(
 }
 
 STATIC ssize_t
-xfs_file_aio_read(
+xfs_file_read_iter(
 	struct kiocb		*iocb,
-	const struct iovec	*iovp,
-	unsigned long		nr_segs,
+	struct iov_iter		*iter,
 	loff_t			pos)
 {
 	struct file		*file = iocb->ki_filp;
@@ -250,9 +249,7 @@ xfs_file_aio_read(
 	if (file->f_mode & FMODE_NOCMTIME)
 		ioflags |= IO_INVIS;
 
-	ret = generic_segment_checks(iovp, &nr_segs, &size, VERIFY_WRITE);
-	if (ret < 0)
-		return ret;
+	size = iov_iter_count(iter);
 
 	if (unlikely(ioflags & IO_ISDIRECT)) {
 		xfs_buftarg_t	*target =
@@ -305,7 +302,7 @@ xfs_file_aio_read(
 
 	trace_xfs_file_read(ip, size, pos, ioflags);
 
-	ret = generic_file_aio_read(iocb, iovp, nr_segs, pos);
+	ret = generic_file_read_iter(iocb, iter, pos);
 	if (ret > 0)
 		XFS_STATS_ADD(xs_read_bytes, ret);
 
@@ -621,10 +618,9 @@ restart:
 STATIC ssize_t
 xfs_file_dio_aio_write(
 	struct kiocb		*iocb,
-	const struct iovec	*iovp,
-	unsigned long		nr_segs,
+	struct iov_iter		*iter,
 	loff_t			pos,
-	size_t			ocount)
+	size_t			count)
 {
 	struct file		*file = iocb->ki_filp;
 	struct address_space	*mapping = file->f_mapping;
@@ -632,7 +628,6 @@ xfs_file_dio_aio_write(
 	struct xfs_inode	*ip = XFS_I(inode);
 	struct xfs_mount	*mp = ip->i_mount;
 	ssize_t			ret = 0;
-	size_t			count = ocount;
 	int			unaligned_io = 0;
 	int			iolock;
 	struct xfs_buftarg	*target = XFS_IS_REALTIME_INODE(ip) ?
@@ -692,8 +687,8 @@ xfs_file_dio_aio_write(
 	}
 
 	trace_xfs_file_direct_write(ip, count, iocb->ki_pos, 0);
-	ret = generic_file_direct_write(iocb, iovp,
-			&nr_segs, pos, &iocb->ki_pos, count, ocount);
+	ret = generic_file_direct_write_iter(iocb, iter,
+			pos, &iocb->ki_pos, count);
 
 out:
 	xfs_rw_iunlock(ip, iolock);
@@ -706,10 +701,9 @@ out:
 STATIC ssize_t
 xfs_file_buffered_aio_write(
 	struct kiocb		*iocb,
-	const struct iovec	*iovp,
-	unsigned long		nr_segs,
+	struct iov_iter		*iter,
 	loff_t			pos,
-	size_t			ocount)
+	size_t			count)
 {
 	struct file		*file = iocb->ki_filp;
 	struct address_space	*mapping = file->f_mapping;
@@ -718,7 +712,6 @@ xfs_file_buffered_aio_write(
 	ssize_t			ret;
 	int			enospc = 0;
 	int			iolock = XFS_IOLOCK_EXCL;
-	size_t			count = ocount;
 
 	xfs_rw_ilock(ip, iolock);
 
@@ -731,7 +724,7 @@ xfs_file_buffered_aio_write(
 
 write_retry:
 	trace_xfs_file_buffered_write(ip, count, iocb->ki_pos, 0);
-	ret = generic_file_buffered_write(iocb, iovp, nr_segs,
+	ret = generic_file_buffered_write_iter(iocb, iter,
 			pos, &iocb->ki_pos, count, 0);
 
 	/*
@@ -752,10 +745,9 @@ out:
 }
 
 STATIC ssize_t
-xfs_file_aio_write(
+xfs_file_write_iter(
 	struct kiocb		*iocb,
-	const struct iovec	*iovp,
-	unsigned long		nr_segs,
+	struct iov_iter		*iter,
 	loff_t			pos)
 {
 	struct file		*file = iocb->ki_filp;
@@ -763,17 +755,15 @@ xfs_file_aio_write(
 	struct inode		*inode = mapping->host;
 	struct xfs_inode	*ip = XFS_I(inode);
 	ssize_t			ret;
-	size_t			ocount = 0;
+	size_t			count = 0;
 
 	XFS_STATS_INC(xs_write_calls);
 
 	BUG_ON(iocb->ki_pos != pos);
 
-	ret = generic_segment_checks(iovp, &nr_segs, &ocount, VERIFY_READ);
-	if (ret)
-		return ret;
+	count = iov_iter_count(iter);
 
-	if (ocount == 0)
+	if (count == 0)
 		return 0;
 
 	if (XFS_FORCED_SHUTDOWN(ip->i_mount)) {
@@ -782,10 +772,9 @@ xfs_file_aio_write(
 	}
 
 	if (unlikely(file->f_flags & O_DIRECT))
-		ret = xfs_file_dio_aio_write(iocb, iovp, nr_segs, pos, ocount);
+		ret = xfs_file_dio_aio_write(iocb, iter, pos, count);
 	else
-		ret = xfs_file_buffered_aio_write(iocb, iovp, nr_segs, pos,
-						  ocount);
+		ret = xfs_file_buffered_aio_write(iocb, iter, pos, count);
 
 	if (ret > 0) {
 		ssize_t err;
@@ -1410,8 +1399,8 @@ const struct file_operations xfs_file_operations = {
 	.llseek		= xfs_file_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read	= xfs_file_aio_read,
-	.aio_write	= xfs_file_aio_write,
+	.read_iter	= xfs_file_read_iter,
+	.write_iter	= xfs_file_write_iter,
 	.splice_read	= xfs_file_splice_read,
 	.splice_write	= xfs_file_splice_write,
 	.unlocked_ioctl	= xfs_file_ioctl,
-- 
1.8.3.4

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 28/33] gfs2: Convert aio_read/write ops to read/write_iter
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (26 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 27/33] xfs: add support for read_iter and write_iter Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 29/33] udf: convert file ops from aio_read/write " Dave Kleikamp
                   ` (9 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Maxim V. Patlasov, cluster-devel, Dave Kleikamp, linux-fsdevel,
	Andrew Morton, Zach Brown

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: cluster-devel@redhat.com
---
 fs/gfs2/file.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 72c3866..23cbdd4 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -679,10 +679,9 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
 }
 
 /**
- * gfs2_file_aio_write - Perform a write to a file
+ * gfs2_file_write_iter - Perform a write to a file
  * @iocb: The io context
- * @iov: The data to write
- * @nr_segs: Number of @iov segments
+ * @iter: The data to write
  * @pos: The file position
  *
  * We have to do a lock/unlock here to refresh the inode size for
@@ -692,11 +691,11 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
  *
  */
 
-static ssize_t gfs2_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
-				   unsigned long nr_segs, loff_t pos)
+static ssize_t gfs2_file_write_iter(struct kiocb *iocb, struct iov_iter *iter,
+				    loff_t pos)
 {
 	struct file *file = iocb->ki_filp;
-	size_t writesize = iov_length(iov, nr_segs);
+	size_t writesize = iov_iter_count(iter);
 	struct gfs2_inode *ip = GFS2_I(file_inode(file));
 	int ret;
 
@@ -715,7 +714,7 @@ static ssize_t gfs2_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
 		gfs2_glock_dq_uninit(&gh);
 	}
 
-	return generic_file_aio_write(iocb, iov, nr_segs, pos);
+	return generic_file_write_iter(iocb, iter, pos);
 }
 
 static int fallocate_chunk(struct inode *inode, loff_t offset, loff_t len,
@@ -1047,9 +1046,9 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
 const struct file_operations gfs2_file_fops = {
 	.llseek		= gfs2_llseek,
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.write		= do_sync_write,
-	.aio_write	= gfs2_file_aio_write,
+	.write_iter	= gfs2_file_write_iter,
 	.unlocked_ioctl	= gfs2_ioctl,
 	.mmap		= gfs2_mmap,
 	.open		= gfs2_open,
@@ -1079,9 +1078,9 @@ const struct file_operations gfs2_dir_fops = {
 const struct file_operations gfs2_file_fops_nolock = {
 	.llseek		= gfs2_llseek,
 	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
+	.read_iter	= generic_file_read_iter,
 	.write		= do_sync_write,
-	.aio_write	= gfs2_file_aio_write,
+	.write_iter	= gfs2_file_write_iter,
 	.unlocked_ioctl	= gfs2_ioctl,
 	.mmap		= gfs2_mmap,
 	.open		= gfs2_open,
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 29/33] udf: convert file ops from aio_read/write to read/write_iter
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (27 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 28/33] gfs2: Convert aio_read/write ops to read/write_iter Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 21:34   ` Jan Kara
  2013-07-25 17:50 ` [PATCH V8 30/33] afs: add support for read_iter and write_iter Dave Kleikamp
                   ` (8 subsequent siblings)
  37 siblings, 1 reply; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp, Jan Kara

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Jan Kara <jack@suse.cz>
---
 fs/udf/file.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/udf/file.c b/fs/udf/file.c
index 339df8b..e392d60 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -133,8 +133,8 @@ const struct address_space_operations udf_adinicb_aops = {
 	.direct_IO	= udf_adinicb_direct_IO,
 };
 
-static ssize_t udf_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
-				  unsigned long nr_segs, loff_t ppos)
+static ssize_t udf_file_write_iter(struct kiocb *iocb, struct iov_iter *iter,
+				   loff_t ppos)
 {
 	ssize_t retval;
 	struct file *file = iocb->ki_filp;
@@ -168,7 +168,7 @@ static ssize_t udf_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
 	} else
 		up_write(&iinfo->i_data_sem);
 
-	retval = generic_file_aio_write(iocb, iov, nr_segs, ppos);
+	retval = generic_file_write_iter(iocb, iter, ppos);
 	if (retval > 0)
 		mark_inode_dirty(inode);
 
@@ -242,12 +242,12 @@ static int udf_release_file(struct inode *inode, struct file *filp)
 
 const struct file_operations udf_file_operations = {
 	.read			= do_sync_read,
-	.aio_read		= generic_file_aio_read,
+	.read_iter		= generic_file_read_iter,
 	.unlocked_ioctl		= udf_ioctl,
 	.open			= generic_file_open,
 	.mmap			= generic_file_mmap,
 	.write			= do_sync_write,
-	.aio_write		= udf_file_aio_write,
+	.write_iter		= udf_file_write_iter,
 	.release		= udf_release_file,
 	.fsync			= generic_file_fsync,
 	.splice_read		= generic_file_splice_read,
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 30/33] afs: add support for read_iter and write_iter
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (28 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 29/33] udf: convert file ops from aio_read/write " Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 31/33] ecrpytfs: Convert aio_read/write ops to read/write_iter Dave Kleikamp
                   ` (7 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp, David Howells, linux-afs

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: David Howells <dhowells@redhat.com>
Cc: linux-afs@lists.infradead.org
---
 fs/afs/file.c     | 4 ++--
 fs/afs/internal.h | 3 +--
 fs/afs/write.c    | 9 ++++-----
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/fs/afs/file.c b/fs/afs/file.c
index 66d50fe..3b71622 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -33,8 +33,8 @@ const struct file_operations afs_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read	= generic_file_aio_read,
-	.aio_write	= afs_file_write,
+	.read_iter	= generic_file_read_iter,
+	.write_iter	= afs_file_write,
 	.mmap		= generic_file_readonly_mmap,
 	.splice_read	= generic_file_splice_read,
 	.fsync		= afs_fsync,
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index a306bb6..9c048ff 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -747,8 +747,7 @@ extern int afs_write_end(struct file *file, struct address_space *mapping,
 extern int afs_writepage(struct page *, struct writeback_control *);
 extern int afs_writepages(struct address_space *, struct writeback_control *);
 extern void afs_pages_written_back(struct afs_vnode *, struct afs_call *);
-extern ssize_t afs_file_write(struct kiocb *, const struct iovec *,
-			      unsigned long, loff_t);
+extern ssize_t afs_file_write(struct kiocb *, struct iov_iter *, loff_t);
 extern int afs_writeback_all(struct afs_vnode *);
 extern int afs_fsync(struct file *, loff_t, loff_t, int);
 
diff --git a/fs/afs/write.c b/fs/afs/write.c
index a890db4..9fa2f59 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -625,15 +625,14 @@ void afs_pages_written_back(struct afs_vnode *vnode, struct afs_call *call)
 /*
  * write to an AFS file
  */
-ssize_t afs_file_write(struct kiocb *iocb, const struct iovec *iov,
-		       unsigned long nr_segs, loff_t pos)
+ssize_t afs_file_write(struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
 {
 	struct afs_vnode *vnode = AFS_FS_I(file_inode(iocb->ki_filp));
 	ssize_t result;
-	size_t count = iov_length(iov, nr_segs);
+	size_t count = iov_iter_count(iter);
 
 	_enter("{%x.%u},{%zu},%lu,",
-	       vnode->fid.vid, vnode->fid.vnode, count, nr_segs);
+	       vnode->fid.vid, vnode->fid.vnode, count, iter->nr_segs);
 
 	if (IS_SWAPFILE(&vnode->vfs_inode)) {
 		printk(KERN_INFO
@@ -644,7 +643,7 @@ ssize_t afs_file_write(struct kiocb *iocb, const struct iovec *iov,
 	if (!count)
 		return 0;
 
-	result = generic_file_aio_write(iocb, iov, nr_segs, pos);
+	result = generic_file_write_iter(iocb, iter, pos);
 	if (IS_ERR_VALUE(result)) {
 		_leave(" = %zd", result);
 		return result;
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 31/33] ecrpytfs: Convert aio_read/write ops to read/write_iter
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (29 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 30/33] afs: add support for read_iter and write_iter Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 32/33] ubifs: convert file ops from aio_read/write " Dave Kleikamp
                   ` (6 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Dave Kleikamp, Tyler Hicks, Dustin Kirkland, ecryptfs

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Tyler Hicks <tyhicks@canonical.com>
Cc: Dustin Kirkland <dustin.kirkland@gazzang.com>
Cc: ecryptfs@vger.kernel.org
---
 fs/ecryptfs/file.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c
index 992cf95..3ed6e5f 100644
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -37,22 +37,21 @@
 /**
  * ecryptfs_read_update_atime
  *
- * generic_file_read updates the atime of upper layer inode.  But, it
+ * generic_file_read_iter updates the atime of upper layer inode.  But, it
  * doesn't give us a chance to update the atime of the lower layer
- * inode.  This function is a wrapper to generic_file_read.  It
- * updates the atime of the lower level inode if generic_file_read
+ * inode.  This function is a wrapper to generic_file_read_iter.  It
+ * updates the atime of the lower level inode if generic_file_read_iter
  * returns without any errors. This is to be used only for file reads.
  * The function to be used for directory reads is ecryptfs_read.
  */
 static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb,
-				const struct iovec *iov,
-				unsigned long nr_segs, loff_t pos)
+				struct iov_iter *iter, loff_t pos)
 {
 	ssize_t rc;
 	struct path *path;
 	struct file *file = iocb->ki_filp;
 
-	rc = generic_file_aio_read(iocb, iov, nr_segs, pos);
+	rc = generic_file_read_iter(iocb, iter, pos);
 	/*
 	 * Even though this is a async interface, we need to wait
 	 * for IO to finish to update atime
@@ -357,9 +356,9 @@ const struct file_operations ecryptfs_dir_fops = {
 const struct file_operations ecryptfs_main_fops = {
 	.llseek = generic_file_llseek,
 	.read = do_sync_read,
-	.aio_read = ecryptfs_read_update_atime,
+	.read_iter = ecryptfs_read_update_atime,
 	.write = do_sync_write,
-	.aio_write = generic_file_aio_write,
+	.write_iter = generic_file_write_iter,
 	.iterate = ecryptfs_readdir,
 	.unlocked_ioctl = ecryptfs_unlocked_ioctl,
 #ifdef CONFIG_COMPAT
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 32/33] ubifs: convert file ops from aio_read/write to read/write_iter
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (30 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 31/33] ecrpytfs: Convert aio_read/write ops to read/write_iter Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-25 17:50 ` [PATCH V8 33/33] tmpfs: add support for read_iter and write_iter Dave Kleikamp
                   ` (5 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Artem Bityutskiy, Adrian Hunter, Dave Kleikamp, linux-mtd,
	linux-fsdevel, Andrew Morton, Zach Brown, Maxim V. Patlasov

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-mtd@lists.infradead.org
---
 fs/ubifs/file.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 123c79b..22924e0 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -44,7 +44,7 @@
  * 'ubifs_writepage()' we are only guaranteed that the page is locked.
  *
  * Similarly, @i_mutex is not always locked in 'ubifs_readpage()', e.g., the
- * read-ahead path does not lock it ("sys_read -> generic_file_aio_read ->
+ * read-ahead path does not lock it ("sys_read -> generic_file_read_iter ->
  * ondemand_readahead -> readpage"). In case of readahead, @I_SYNC flag is not
  * set as well. However, UBIFS disables readahead.
  */
@@ -1396,8 +1396,8 @@ static int update_mctime(struct ubifs_info *c, struct inode *inode)
 	return 0;
 }
 
-static ssize_t ubifs_aio_write(struct kiocb *iocb, const struct iovec *iov,
-			       unsigned long nr_segs, loff_t pos)
+static ssize_t ubifs_write_iter(struct kiocb *iocb, struct iov_iter *iter,
+				loff_t pos)
 {
 	int err;
 	struct inode *inode = iocb->ki_filp->f_mapping->host;
@@ -1407,7 +1407,7 @@ static ssize_t ubifs_aio_write(struct kiocb *iocb, const struct iovec *iov,
 	if (err)
 		return err;
 
-	return generic_file_aio_write(iocb, iov, nr_segs, pos);
+	return generic_file_write_iter(iocb, iter, pos);
 }
 
 static int ubifs_set_page_dirty(struct page *page)
@@ -1583,8 +1583,8 @@ const struct file_operations ubifs_file_operations = {
 	.llseek         = generic_file_llseek,
 	.read           = do_sync_read,
 	.write          = do_sync_write,
-	.aio_read       = generic_file_aio_read,
-	.aio_write      = ubifs_aio_write,
+	.read_iter       = generic_file_read_iter,
+	.write_iter      = ubifs_write_iter,
 	.mmap           = ubifs_file_mmap,
 	.fsync          = ubifs_fsync,
 	.unlocked_ioctl = ubifs_ioctl,
-- 
1.8.3.4


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [PATCH V8 33/33] tmpfs: add support for read_iter and write_iter
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (31 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 32/33] ubifs: convert file ops from aio_read/write " Dave Kleikamp
@ 2013-07-25 17:50 ` Dave Kleikamp
  2013-07-30 21:28 ` [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Andrew Morton
                   ` (4 subsequent siblings)
  37 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-07-25 17:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown,
	Hugh Dickins, Dave Kleikamp

From: Hugh Dickins <hughd@google.com>

Convert tmpfs do_shmem_file_read() to shmem_file_read_iter().
Make file_read_iter_actor() global so tmpfs can use it too: delete
file_read_actor(), which was made global in 2.4.4 for use by tmpfs.
Replace tmpfs generic_file_aio_write() by generic_file_write_iter().

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
---
 include/linux/fs.h |  5 +++--
 mm/filemap.c       | 42 ++-----------------------------------
 mm/shmem.c         | 61 +++++++++++++++++-------------------------------------
 3 files changed, 24 insertions(+), 84 deletions(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 269ef07..48209c8 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2499,8 +2499,9 @@ extern int sb_min_blocksize(struct super_block *, int);
 extern int generic_file_mmap(struct file *, struct vm_area_struct *);
 extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *);
 extern int generic_file_remap_pages(struct vm_area_struct *, unsigned long addr,
-		unsigned long size, pgoff_t pgoff);
-extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
+				unsigned long size, pgoff_t pgoff);
+extern int file_read_iter_actor(read_descriptor_t *desc, struct page *page,
+				unsigned long offset, unsigned long size);
 int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk);
 extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
 extern ssize_t generic_file_read_iter(struct kiocb *, struct iov_iter *,
diff --git a/mm/filemap.c b/mm/filemap.c
index 41b9672..45cfcfc 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1313,44 +1313,6 @@ out:
 	file_accessed(filp);
 }
 
-int file_read_actor(read_descriptor_t *desc, struct page *page,
-			unsigned long offset, unsigned long size)
-{
-	char *kaddr;
-	unsigned long left, count = desc->count;
-
-	if (size > count)
-		size = count;
-
-	/*
-	 * Faults on the destination of a read are common, so do it before
-	 * taking the kmap.
-	 */
-	if (!fault_in_pages_writeable(desc->arg.buf, size)) {
-		kaddr = kmap_atomic(page);
-		left = __copy_to_user_inatomic(desc->arg.buf,
-						kaddr + offset, size);
-		kunmap_atomic(kaddr);
-		if (left == 0)
-			goto success;
-	}
-
-	/* Do it the slow way */
-	kaddr = kmap(page);
-	left = __copy_to_user(desc->arg.buf, kaddr + offset, size);
-	kunmap(page);
-
-	if (left) {
-		size -= left;
-		desc->error = -EFAULT;
-	}
-success:
-	desc->count = count - size;
-	desc->written += size;
-	desc->arg.buf += size;
-	return size;
-}
-
 /*
  * Performs necessary checks before doing a write
  * @iov:	io vector request
@@ -1390,8 +1352,8 @@ int generic_segment_checks(const struct iovec *iov,
 }
 EXPORT_SYMBOL(generic_segment_checks);
 
-static int file_read_iter_actor(read_descriptor_t *desc, struct page *page,
-				unsigned long offset, unsigned long size)
+int file_read_iter_actor(read_descriptor_t *desc, struct page *page,
+			 unsigned long offset, unsigned long size)
 {
 	struct iov_iter *iter = desc->arg.data;
 	unsigned long copied = 0;
diff --git a/mm/shmem.c b/mm/shmem.c
index a87990c..67cd5e5 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1464,14 +1464,23 @@ shmem_write_end(struct file *file, struct address_space *mapping,
 	return copied;
 }
 
-static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_t *desc, read_actor_t actor)
+static ssize_t shmem_file_read_iter(struct kiocb *iocb,
+				    struct iov_iter *iter, loff_t pos)
 {
+	read_descriptor_t desc;
+	loff_t *ppos = &iocb->ki_pos;
+	struct file *filp = iocb->ki_filp;
 	struct inode *inode = file_inode(filp);
 	struct address_space *mapping = inode->i_mapping;
 	pgoff_t index;
 	unsigned long offset;
 	enum sgp_type sgp = SGP_READ;
 
+	desc.written = 0;
+	desc.count = iov_iter_count(iter);
+	desc.arg.data = iter;
+	desc.error = 0;
+
 	/*
 	 * Might this read be for a stacking filesystem?  Then when reading
 	 * holes of a sparse file, we actually need to allocate those pages,
@@ -1498,10 +1507,10 @@ static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_
 				break;
 		}
 
-		desc->error = shmem_getpage(inode, index, &page, sgp, NULL);
-		if (desc->error) {
-			if (desc->error == -EINVAL)
-				desc->error = 0;
+		desc.error = shmem_getpage(inode, index, &page, sgp, NULL);
+		if (desc.error) {
+			if (desc.error == -EINVAL)
+				desc.error = 0;
 			break;
 		}
 		if (page)
@@ -1552,13 +1561,13 @@ static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_
 		 * "pos" here (the actor routine has to update the user buffer
 		 * pointers and the remaining count).
 		 */
-		ret = actor(desc, page, offset, nr);
+		ret = file_read_iter_actor(&desc, page, offset, nr);
 		offset += ret;
 		index += offset >> PAGE_CACHE_SHIFT;
 		offset &= ~PAGE_CACHE_MASK;
 
 		page_cache_release(page);
-		if (ret != nr || !desc->count)
+		if (ret != nr || !desc.count)
 			break;
 
 		cond_resched();
@@ -1566,40 +1575,8 @@ static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_
 
 	*ppos = ((loff_t) index << PAGE_CACHE_SHIFT) + offset;
 	file_accessed(filp);
-}
-
-static ssize_t shmem_file_aio_read(struct kiocb *iocb,
-		const struct iovec *iov, unsigned long nr_segs, loff_t pos)
-{
-	struct file *filp = iocb->ki_filp;
-	ssize_t retval;
-	unsigned long seg;
-	size_t count;
-	loff_t *ppos = &iocb->ki_pos;
 
-	retval = generic_segment_checks(iov, &nr_segs, &count, VERIFY_WRITE);
-	if (retval)
-		return retval;
-
-	for (seg = 0; seg < nr_segs; seg++) {
-		read_descriptor_t desc;
-
-		desc.written = 0;
-		desc.arg.buf = iov[seg].iov_base;
-		desc.count = iov[seg].iov_len;
-		if (desc.count == 0)
-			continue;
-		desc.error = 0;
-		do_shmem_file_read(filp, ppos, &desc, file_read_actor);
-		retval += desc.written;
-		if (desc.error) {
-			retval = retval ?: desc.error;
-			break;
-		}
-		if (desc.count > 0)
-			break;
-	}
-	return retval;
+	return desc.written ? desc.written : desc.error;
 }
 
 static ssize_t shmem_file_splice_read(struct file *in, loff_t *ppos,
@@ -2721,8 +2698,8 @@ static const struct file_operations shmem_file_operations = {
 	.llseek		= shmem_file_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
-	.aio_read	= shmem_file_aio_read,
-	.aio_write	= generic_file_aio_write,
+	.read_iter	= shmem_file_read_iter,
+	.write_iter	= generic_file_write_iter,
 	.fsync		= noop_fsync,
 	.splice_read	= shmem_file_splice_read,
 	.splice_write	= generic_file_splice_write,
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 29/33] udf: convert file ops from aio_read/write to read/write_iter
  2013-07-25 17:50 ` [PATCH V8 29/33] udf: convert file ops from aio_read/write " Dave Kleikamp
@ 2013-07-25 21:34   ` Jan Kara
  0 siblings, 0 replies; 72+ messages in thread
From: Jan Kara @ 2013-07-25 21:34 UTC (permalink / raw)
  To: Dave Kleikamp
  Cc: linux-kernel, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown, Jan Kara

On Thu 25-07-13 12:50:55, Dave Kleikamp wrote:
> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
> Cc: Jan Kara <jack@suse.cz>
  Looks good. You can add:
Acked-by: Jan Kara <jack@suse.cz>

								Honza
> ---
>  fs/udf/file.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/udf/file.c b/fs/udf/file.c
> index 339df8b..e392d60 100644
> --- a/fs/udf/file.c
> +++ b/fs/udf/file.c
> @@ -133,8 +133,8 @@ const struct address_space_operations udf_adinicb_aops = {
>  	.direct_IO	= udf_adinicb_direct_IO,
>  };
>  
> -static ssize_t udf_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
> -				  unsigned long nr_segs, loff_t ppos)
> +static ssize_t udf_file_write_iter(struct kiocb *iocb, struct iov_iter *iter,
> +				   loff_t ppos)
>  {
>  	ssize_t retval;
>  	struct file *file = iocb->ki_filp;
> @@ -168,7 +168,7 @@ static ssize_t udf_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
>  	} else
>  		up_write(&iinfo->i_data_sem);
>  
> -	retval = generic_file_aio_write(iocb, iov, nr_segs, ppos);
> +	retval = generic_file_write_iter(iocb, iter, ppos);
>  	if (retval > 0)
>  		mark_inode_dirty(inode);
>  
> @@ -242,12 +242,12 @@ static int udf_release_file(struct inode *inode, struct file *filp)
>  
>  const struct file_operations udf_file_operations = {
>  	.read			= do_sync_read,
> -	.aio_read		= generic_file_aio_read,
> +	.read_iter		= generic_file_read_iter,
>  	.unlocked_ioctl		= udf_ioctl,
>  	.open			= generic_file_open,
>  	.mmap			= generic_file_mmap,
>  	.write			= do_sync_write,
> -	.aio_write		= udf_file_aio_write,
> +	.write_iter		= udf_file_write_iter,
>  	.release		= udf_release_file,
>  	.fsync			= generic_file_fsync,
>  	.splice_read		= generic_file_splice_read,
> -- 
> 1.8.3.4
> 
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 27/33] xfs: add support for read_iter and write_iter
  2013-07-25 17:50 ` [PATCH V8 27/33] xfs: add support for read_iter and write_iter Dave Kleikamp
@ 2013-07-26 11:51   ` Dave Chinner
  0 siblings, 0 replies; 72+ messages in thread
From: Dave Chinner @ 2013-07-26 11:51 UTC (permalink / raw)
  To: Dave Kleikamp
  Cc: Alex Elder, linux-kernel, xfs, Ben Myers, linux-fsdevel,
	Andrew Morton, Zach Brown, Maxim V. Patlasov

On Thu, Jul 25, 2013 at 12:50:53PM -0500, Dave Kleikamp wrote:
> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
> Cc: Ben Myers <bpm@sgi.com>
> Cc: Alex Elder <elder@kernel.org>
> Cc: xfs@oss.sgi.com

Looks fine.

Acked-by: Dave Chinner <dchinner@redhat.com>

-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (32 preceding siblings ...)
  2013-07-25 17:50 ` [PATCH V8 33/33] tmpfs: add support for read_iter and write_iter Dave Kleikamp
@ 2013-07-30 21:28 ` Andrew Morton
  2013-07-31  0:43   ` Dave Chinner
  2013-07-31  9:51   ` Maxim Patlasov
  2013-08-01  8:58 ` Christoph Hellwig
                   ` (3 subsequent siblings)
  37 siblings, 2 replies; 72+ messages in thread
From: Andrew Morton @ 2013-07-30 21:28 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linux-kernel, linux-fsdevel, Maxim V. Patlasov, Zach Brown

On Thu, 25 Jul 2013 12:50:26 -0500 Dave Kleikamp <dave.kleikamp@oracle.com> wrote:

> This patch series adds a kernel interface to fs/aio.c so that kernel code can
> issue concurrent asynchronous IO to file systems.  It adds an aio command and
> file system methods which specify io memory with pages instead of userspace
> addresses.
> 
> This series was written to reduce the current overhead loop imposes by
> performing synchronus buffered file system IO from a kernel thread.  These
> patches turn loop into a light weight layer that translates bios into iocbs.

Do you have any performance numbers?

Does anyone care much about loop performance?  What's the value here?

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-07-30 21:28 ` [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Andrew Morton
@ 2013-07-31  0:43   ` Dave Chinner
  2013-07-31  6:40     ` Sedat Dilek
  2013-07-31  9:51   ` Maxim Patlasov
  1 sibling, 1 reply; 72+ messages in thread
From: Dave Chinner @ 2013-07-31  0:43 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Dave Kleikamp, linux-kernel, linux-fsdevel, Maxim V. Patlasov,
	Zach Brown

On Tue, Jul 30, 2013 at 02:28:20PM -0700, Andrew Morton wrote:
> On Thu, 25 Jul 2013 12:50:26 -0500 Dave Kleikamp <dave.kleikamp@oracle.com> wrote:
> 
> > This patch series adds a kernel interface to fs/aio.c so that kernel code can
> > issue concurrent asynchronous IO to file systems.  It adds an aio command and
> > file system methods which specify io memory with pages instead of userspace
> > addresses.
> > 
> > This series was written to reduce the current overhead loop imposes by
> > performing synchronus buffered file system IO from a kernel thread.  These
> > patches turn loop into a light weight layer that translates bios into iocbs.
> 
> Do you have any performance numbers?
> 
> Does anyone care much about loop performance?  What's the value here?

Yes. Anyone using loopback devices for file-backed devices exposed
to containers and VMs cares about the memory and CPU overhead
the double caching the existing loop device has.

Or those of us how use loopback devices to examine metadumps from
broken filesystems and run repair/fsck on the filesystem image via
loopback devices. When I'm dealing with images containing tens to
hundreds of gigabytes of metadata, caching a second time in the
backing file is a significant overhead. It's especially annoying
when the application is already using direct IO because the kernel
based block device caching isn't at all efficient and just consumes
needless amount of memory holding on to pages that are never going
to be read again.

And on small memory machines xfstests can trigger OOM killer when it
uses loopback devices in certain tests. Thats generally caused by
the writeback of a dirty page causing a new page to be allocated and
dirtied and so writeback of dirty memory under memory pressure can
a) increase memory usage, and b) increase the percentage of dirty
memory that can't be reclaimed immediately....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-07-31  0:43   ` Dave Chinner
@ 2013-07-31  6:40     ` Sedat Dilek
  2013-07-31  8:41       ` Sedat Dilek
  0 siblings, 1 reply; 72+ messages in thread
From: Sedat Dilek @ 2013-07-31  6:40 UTC (permalink / raw)
  To: Dave Chinner, Dave Kleikamp
  Cc: Andrew Morton, linux-kernel, linux-fsdevel, Maxim V. Patlasov,
	Zach Brown, Stephen Rothwell, Al Viro

On Wed, Jul 31, 2013 at 2:43 AM, Dave Chinner <david@fromorbit.com> wrote:
> On Tue, Jul 30, 2013 at 02:28:20PM -0700, Andrew Morton wrote:
>> On Thu, 25 Jul 2013 12:50:26 -0500 Dave Kleikamp <dave.kleikamp@oracle.com> wrote:
>>
>> > This patch series adds a kernel interface to fs/aio.c so that kernel code can
>> > issue concurrent asynchronous IO to file systems.  It adds an aio command and
>> > file system methods which specify io memory with pages instead of userspace
>> > addresses.
>> >
>> > This series was written to reduce the current overhead loop imposes by
>> > performing synchronus buffered file system IO from a kernel thread.  These
>> > patches turn loop into a light weight layer that translates bios into iocbs.
>>
>> Do you have any performance numbers?
>>

[ CC Al and Linux-next maintainer ]

The more important question how to test and then provide performance numbers.
If you give me a test-case I give you numbers!

>> Does anyone care much about loop performance?  What's the value here?
>
> Yes. Anyone using loopback devices for file-backed devices exposed
> to containers and VMs cares about the memory and CPU overhead
> the double caching the existing loop device has.
>

Yupp, I am here on Ubuntu/precise AMD64 in a so-called WUBI
environment which makes intensive usage of loopback-device plus FUSE
driver and $fs-of-your-choice (here: ext4).

Today, I have pulled Dave's aio_loop GIT branch into v3.11-rc3.
After successful compilation I am running it right now.

I had also tested v6 of the series [1] from February 2013 and
encouraged Dave to put it into Linux-next [2].
Unfortunately, there was no response from Al.
Again, Dave try to get it into Linux-next!

- Sedat -

[1] http://marc.info/?t=135947707100013&r=1&w=4
[2] http://marc.info/?l=linux-fsdevel&m=136122569807203&w=4

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-07-31  6:40     ` Sedat Dilek
@ 2013-07-31  8:41       ` Sedat Dilek
  2013-07-31 11:22         ` Sedat Dilek
  0 siblings, 1 reply; 72+ messages in thread
From: Sedat Dilek @ 2013-07-31  8:41 UTC (permalink / raw)
  To: Dave Chinner, Dave Kleikamp
  Cc: Andrew Morton, linux-kernel, linux-fsdevel, Maxim V. Patlasov,
	Zach Brown, Stephen Rothwell, Al Viro

[-- Attachment #1: Type: text/plain, Size: 2146 bytes --]

On Wed, Jul 31, 2013 at 8:40 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Wed, Jul 31, 2013 at 2:43 AM, Dave Chinner <david@fromorbit.com> wrote:
>> On Tue, Jul 30, 2013 at 02:28:20PM -0700, Andrew Morton wrote:
>>> On Thu, 25 Jul 2013 12:50:26 -0500 Dave Kleikamp <dave.kleikamp@oracle.com> wrote:
>>>
>>> > This patch series adds a kernel interface to fs/aio.c so that kernel code can
>>> > issue concurrent asynchronous IO to file systems.  It adds an aio command and
>>> > file system methods which specify io memory with pages instead of userspace
>>> > addresses.
>>> >
>>> > This series was written to reduce the current overhead loop imposes by
>>> > performing synchronus buffered file system IO from a kernel thread.  These
>>> > patches turn loop into a light weight layer that translates bios into iocbs.
>>>
>>> Do you have any performance numbers?
>>>
>
> [ CC Al and Linux-next maintainer ]
>
> The more important question how to test and then provide performance numbers.
> If you give me a test-case I give you numbers!
>
>>> Does anyone care much about loop performance?  What's the value here?
>>
>> Yes. Anyone using loopback devices for file-backed devices exposed
>> to containers and VMs cares about the memory and CPU overhead
>> the double caching the existing loop device has.
>>
>
> Yupp, I am here on Ubuntu/precise AMD64 in a so-called WUBI
> environment which makes intensive usage of loopback-device plus FUSE
> driver and $fs-of-your-choice (here: ext4).
>
> Today, I have pulled Dave's aio_loop GIT branch into v3.11-rc3.
> After successful compilation I am running it right now.
>
> I had also tested v6 of the series [1] from February 2013 and
> encouraged Dave to put it into Linux-next [2].
> Unfortunately, there was no response from Al.
> Again, Dave try to get it into Linux-next!
>

I have run runltp-lite from latest stable LTP (ltp-full-20130109), but
this reports errors.
I will see later if this happens with a vanilla v3.11-rc3.

See also attached files.

- Sedat -

> - Sedat -
>
> [1] http://marc.info/?t=135947707100013&r=1&w=4
> [2] http://marc.info/?l=linux-fsdevel&m=136122569807203&w=4

[-- Attachment #2: dmesg_3.11.0-rc3-1-aio-small.txt --]
[-- Type: text/plain, Size: 84913 bytes --]

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.11.0-rc3-1-aio-small (sedat.dilek@gmail.com@fambox) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #1 SMP Wed Jul 31 08:22:45 CEST 2013
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz.upstream root=UUID=001AADA61AAD9964 loop=/ubuntu/disks/root.disk ro
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Centaur CentaurHauls
[    0.000000] Disabled fast string operations
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009d800-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001fffffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000020000000-0x00000000201fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000020200000-0x000000003fffffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000040000000-0x00000000401fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000040200000-0x00000000d9c9efff] usable
[    0.000000] BIOS-e820: [mem 0x00000000d9c9f000-0x00000000dae7efff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000dae7f000-0x00000000daf9efff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000daf9f000-0x00000000daffefff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000dafff000-0x00000000daffffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000db000000-0x00000000df9fffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed08000-0x00000000fed08fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed10000-0x00000000fed19fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ffd80000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000011fdfffff] usable
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] SMBIOS 2.6 present.
[    0.000000] DMI: SAMSUNG ELECTRONICS CO., LTD. 530U3BI/530U4BI/530U4BH/530U3BI/530U4BI/530U4BH, BIOS 13XK 03/28/2013
[    0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.000000] No AGP bridge found
[    0.000000] e820: last_pfn = 0x11fe00 max_arch_pfn = 0x400000000
[    0.000000] MTRR default type: uncachable
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-9FFFF write-back
[    0.000000]   A0000-BFFFF uncachable
[    0.000000]   C0000-FFFFF write-protect
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 000000000 mask F80000000 write-back
[    0.000000]   1 base 080000000 mask FC0000000 write-back
[    0.000000]   2 base 0C0000000 mask FE0000000 write-back
[    0.000000]   3 base 0DC000000 mask FFC000000 uncachable
[    0.000000]   4 base 0DB000000 mask FFF000000 uncachable
[    0.000000]   5 base 100000000 mask FE0000000 write-back
[    0.000000]   6 base 11FE00000 mask FFFE00000 uncachable
[    0.000000]   7 base 0FFC00000 mask FFFC00000 write-protect
[    0.000000]   8 disabled
[    0.000000]   9 disabled
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[    0.000000] e820: last_pfn = 0xdb000 max_arch_pfn = 0x400000000
[    0.000000] found SMP MP-table at [mem 0x000f00e0-0x000f00ef] mapped at [ffff8800000f00e0]
[    0.000000] Scanning 1 areas for low memory corruption
[    0.000000] Base memory trampoline at [ffff880000097000] 97000 size 24576
[    0.000000] reserving inaccessible SNB gfx pages
[    0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
[    0.000000]  [mem 0x00000000-0x000fffff] page 4k
[    0.000000] BRK [0x0204c000, 0x0204cfff] PGTABLE
[    0.000000] BRK [0x0204d000, 0x0204dfff] PGTABLE
[    0.000000] BRK [0x0204e000, 0x0204efff] PGTABLE
[    0.000000] init_memory_mapping: [mem 0x11fc00000-0x11fdfffff]
[    0.000000]  [mem 0x11fc00000-0x11fdfffff] page 2M
[    0.000000] BRK [0x0204f000, 0x0204ffff] PGTABLE
[    0.000000] init_memory_mapping: [mem 0x11c000000-0x11fbfffff]
[    0.000000]  [mem 0x11c000000-0x11fbfffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x100000000-0x11bffffff]
[    0.000000]  [mem 0x100000000-0x11bffffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x00100000-0x1fffffff]
[    0.000000]  [mem 0x00100000-0x001fffff] page 4k
[    0.000000]  [mem 0x00200000-0x1fffffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x20200000-0x3fffffff]
[    0.000000]  [mem 0x20200000-0x3fffffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x40200000-0xd9c9efff]
[    0.000000]  [mem 0x40200000-0xd9bfffff] page 2M
[    0.000000]  [mem 0xd9c00000-0xd9c9efff] page 4k
[    0.000000] BRK [0x02050000, 0x02050fff] PGTABLE
[    0.000000] init_memory_mapping: [mem 0xdafff000-0xdaffffff]
[    0.000000]  [mem 0xdafff000-0xdaffffff] page 4k
[    0.000000] RAMDISK: [mem 0x37964000-0x37ca9fff]
[    0.000000] ACPI: RSDP 00000000000f0100 00024 (v02 SECCSD)
[    0.000000] ACPI: XSDT 00000000daffe170 0008C (v01 SECCSD LH43STAR 00000002 PTEC 00000002)
[    0.000000] ACPI: FACP 00000000dafef000 0010C (v05 SECCSD LH43STAR 00000002 PTL  00000002)
[    0.000000] ACPI: DSDT 00000000daff2000 083AC (v02 SECCSD  SNB-CPT 00000000 INTL 20061109)
[    0.000000] ACPI: FACS 00000000daf47000 00040
[    0.000000] ACPI: SLIC 00000000daffd000 00176 (v01 SECCSD LH43STAR 00000002 PTEC 00000001)
[    0.000000] ACPI: SSDT 00000000daffb000 01068 (v01 SECCSD PtidDevc 00001000 INTL 20061109)
[    0.000000] ACPI: ASF! 00000000daff1000 000A5 (v32 SECCSD LH43STAR 00000002 PTL  00000002)
[    0.000000] ACPI: HPET 00000000dafee000 00038 (v01 SECCSD LH43STAR 00000002 PTL  00000002)
[    0.000000] ACPI: APIC 00000000dafed000 00098 (v03 SECCSD LH43STAR 00000002 PTL  00000002)
[    0.000000] ACPI: MCFG 00000000dafec000 0003C (v01 SECCSD LH43STAR 00000002 PTL  00000002)
[    0.000000] ACPI: SSDT 00000000dafeb000 00804 (v01  PmRef  Cpu0Ist 00003000 INTL 20061109)
[    0.000000] ACPI: SSDT 00000000dafea000 00996 (v01  PmRef    CpuPm 00003000 INTL 20061109)
[    0.000000] ACPI: UEFI 00000000dafe9000 0003E (v01 SECCSD LH43STAR 00000002 PTL  00000002)
[    0.000000] ACPI: UEFI 00000000dafe8000 00042 (v01 PTL      COMBUF 00000001 PTL  00000001)
[    0.000000] ACPI: UEFI 00000000dafe7000 0026A (v01 SECCSD LH43STAR 00000002 PTL  00000002)
[    0.000000] ACPI: SSDT 00000000dafe6000 000D0 (v01   Iffs  IffsAsl 00003000 INTL 20061109)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at [mem 0x0000000000000000-0x000000011fdfffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x11fdfffff]
[    0.000000]   NODE_DATA [mem 0x11fdf7000-0x11fdfbfff]
[    0.000000]  [ffffea0000000000-ffffea0003ffffff] PMD -> [ffff88011b400000-ffff88011edfffff] on node 0
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x00001000-0x00ffffff]
[    0.000000]   DMA32    [mem 0x01000000-0xffffffff]
[    0.000000]   Normal   [mem 0x100000000-0x11fdfffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00001000-0x0009cfff]
[    0.000000]   node   0: [mem 0x00100000-0x1fffffff]
[    0.000000]   node   0: [mem 0x20200000-0x3fffffff]
[    0.000000]   node   0: [mem 0x40200000-0xd9c9efff]
[    0.000000]   node   0: [mem 0xdafff000-0xdaffffff]
[    0.000000]   node   0: [mem 0x100000000-0x11fdfffff]
[    0.000000] On node 0 totalpages: 1021500
[    0.000000]   DMA zone: 56 pages used for memmap
[    0.000000]   DMA zone: 156 pages reserved
[    0.000000]   DMA zone: 3996 pages, LIFO batch:0
[    0.000000]   DMA32 zone: 12127 pages used for memmap
[    0.000000]   DMA32 zone: 886944 pages, LIFO batch:31
[    0.000000]   Normal zone: 1785 pages used for memmap
[    0.000000]   Normal zone: 130560 pages, LIFO batch:31
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x03] lapic_id[0x02] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x04] lapic_id[0x03] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x05] lapic_id[0x00] disabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x06] lapic_id[0x00] disabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x07] lapic_id[0x00] disabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x08] lapic_id[0x00] disabled)
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[    0.000000] ACPI: IOAPIC (id[0x0e] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 14, version 32, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ2 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a301 base: 0xfed00000
[    0.000000] smpboot: Allowing 8 CPUs, 4 hotplug CPUs
[    0.000000] nr_irqs_gsi: 40
[    0.000000] PM: Registered nosave memory: [mem 0x0009d000-0x0009dfff]
[    0.000000] PM: Registered nosave memory: [mem 0x0009e000-0x0009ffff]
[    0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000dffff]
[    0.000000] PM: Registered nosave memory: [mem 0x000e0000-0x000fffff]
[    0.000000] PM: Registered nosave memory: [mem 0x20000000-0x201fffff]
[    0.000000] PM: Registered nosave memory: [mem 0x40000000-0x401fffff]
[    0.000000] PM: Registered nosave memory: [mem 0xd9c9f000-0xdae7efff]
[    0.000000] PM: Registered nosave memory: [mem 0xdae7f000-0xdaf9efff]
[    0.000000] PM: Registered nosave memory: [mem 0xdaf9f000-0xdaffefff]
[    0.000000] PM: Registered nosave memory: [mem 0xdb000000-0xdf9fffff]
[    0.000000] PM: Registered nosave memory: [mem 0xdfa00000-0xf7ffffff]
[    0.000000] PM: Registered nosave memory: [mem 0xf8000000-0xfbffffff]
[    0.000000] PM: Registered nosave memory: [mem 0xfc000000-0xfebfffff]
[    0.000000] PM: Registered nosave memory: [mem 0xfec00000-0xfec00fff]
[    0.000000] PM: Registered nosave memory: [mem 0xfec01000-0xfed07fff]
[    0.000000] PM: Registered nosave memory: [mem 0xfed08000-0xfed08fff]
[    0.000000] PM: Registered nosave memory: [mem 0xfed09000-0xfed0ffff]
[    0.000000] PM: Registered nosave memory: [mem 0xfed10000-0xfed19fff]
[    0.000000] PM: Registered nosave memory: [mem 0xfed1a000-0xfed1bfff]
[    0.000000] PM: Registered nosave memory: [mem 0xfed1c000-0xfed1ffff]
[    0.000000] PM: Registered nosave memory: [mem 0xfed20000-0xfedfffff]
[    0.000000] PM: Registered nosave memory: [mem 0xfee00000-0xfee00fff]
[    0.000000] PM: Registered nosave memory: [mem 0xfee01000-0xffd7ffff]
[    0.000000] PM: Registered nosave memory: [mem 0xffd80000-0xffffffff]
[    0.000000] e820: [mem 0xdfa00000-0xf7ffffff] available for PCI devices
[    0.000000] Booting paravirtualized kernel on bare hardware
[    0.000000] setup_percpu: NR_CPUS:256 nr_cpumask_bits:256 nr_cpu_ids:8 nr_node_ids:1
[    0.000000] PERCPU: Embedded 29 pages/cpu @ffff88011fa00000 s87616 r8192 d22976 u262144
[    0.000000] pcpu-alloc: s87616 r8192 d22976 u262144 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 1 2 3 4 5 6 7 
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 1007376
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz.upstream root=UUID=001AADA61AAD9964 loop=/ubuntu/disks/root.disk ro
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] xsave: enabled xstate_bv 0x7, cntxt size 0x340
[    0.000000] Checking aperture...
[    0.000000] No AGP bridge found
[    0.000000] Calgary: detecting Calgary via BIOS EBDA area
[    0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing!
[    0.000000] Memory: 3938464K/4086000K available (7115K kernel code, 1044K rwdata, 3144K rodata, 1332K init, 1984K bss, 147536K reserved)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=8.
[    0.000000] NR_IRQS:16640 nr_irqs:744 16
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] allocated 16777216 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] ODEBUG: 0 of 0 active objects replaced
[    0.000000] hpet clockevent registered
[    0.000000] tsc: Fast TSC calibration using PIT
[    0.004000] tsc: Detected 1596.415 MHz processor
[    0.000003] Calibrating delay loop (skipped), value calculated using timer frequency.. 3192.83 BogoMIPS (lpj=6385660)
[    0.000081] pid_max: default: 32768 minimum: 301
[    0.000246] Security Framework initialized
[    0.000292] AppArmor: AppArmor initialized
[    0.000329] Yama: becoming mindful.
[    0.000751] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.001859] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.002361] Mount-cache hash table entries: 256
[    0.002908] Initializing cgroup subsys memory
[    0.003008] Initializing cgroup subsys devices
[    0.003046] Initializing cgroup subsys freezer
[    0.003085] Initializing cgroup subsys blkio
[    0.003122] Initializing cgroup subsys perf_event
[    0.003160] Initializing cgroup subsys hugetlb
[    0.003246] Disabled fast string operations
[    0.003283] CPU: Physical Processor ID: 0
[    0.003320] CPU: Processor Core ID: 0
[    0.003360] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[    0.003360] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)
[    0.003426] mce: CPU supports 7 MCE banks
[    0.003478] CPU0: Thermal monitoring enabled (TM1)
[    0.003524] Last level iTLB entries: 4KB 512, 2MB 0, 4MB 0
[    0.003524] Last level dTLB entries: 4KB 512, 2MB 32, 4MB 32
[    0.003524] tlb_flushall_shift: 5
[    0.003697] Freeing SMP alternatives memory: 24K (ffffffff81e54000 - ffffffff81e5a000)
[    0.004784] ACPI: Core revision 20130517
[    0.015613] ACPI: All ACPI Tables successfully acquired
[    0.029703] ftrace: allocating 27076 entries in 106 pages
[    0.045113] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.084813] smpboot: CPU0: Intel(R) Core(TM) i5-2467M CPU @ 1.60GHz (fam: 06, model: 2a, stepping: 07)
[    0.085429] TSC deadline timer enabled
[    0.085441] Performance Events: PEBS fmt1+, 16-deep LBR, SandyBridge events, full-width counters, Intel PMU driver.
[    0.085590] ... version:                3
[    0.085626] ... bit width:              48
[    0.085662] ... generic registers:      4
[    0.085699] ... value mask:             0000ffffffffffff
[    0.085737] ... max period:             0000ffffffffffff
[    0.085775] ... fixed-purpose events:   3
[    0.085811] ... event mask:             000000070000000f
[    0.098943] Disabled fast string operations
[    0.102125] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
[    0.113802] Disabled fast string operations
[    0.127513] Disabled fast string operations
[    0.087856] smpboot: Booting Node   0, Processors  #1 #2 #3
[    0.129645] Brought up 4 CPUs
[    0.129746] smpboot: Total of 4 processors activated (12771.32 BogoMIPS)
[    0.133806] devtmpfs: initialized
[    0.135848] EVM: security.selinux
[    0.135883] EVM: security.SMACK64
[    0.135918] EVM: security.capability
[    0.136040] PM: Registering ACPI NVS region [mem 0xdae7f000-0xdaf9efff] (1179648 bytes)
[    0.137578] regulator-dummy: no parameters
[    0.137771] NET: Registered protocol family 16
[    0.138149] ACPI: bus type PCI registered
[    0.138300] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xf8000000-0xfbffffff] (base 0xf8000000)
[    0.138359] PCI: MMCONFIG at [mem 0xf8000000-0xfbffffff] reserved in E820
[    0.145142] PCI: Using configuration type 1 for base access
[    0.148533] bio: create slab <bio-0> at 0
[    0.148996] ACPI: Added _OSI(Module Device)
[    0.149035] ACPI: Added _OSI(Processor Device)
[    0.149073] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.149111] ACPI: Added _OSI(Processor Aggregator Device)
[    0.150891] ACPI: EC: Look up EC in DSDT
[    0.177452] ACPI: Executed 1 blocks of module-level executable AML code
[    0.183465] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored
[    0.195226] ACPI: SSDT 00000000dae70718 00688 (v01  PmRef  Cpu0Cst 00003001 INTL 20061109)
[    0.195824] ACPI: Dynamic OEM Table Load:
[    0.195894] ACPI: SSDT           (null) 00688 (v01  PmRef  Cpu0Cst 00003001 INTL 20061109)
[    0.205888] ACPI: SSDT 00000000dae71a98 00303 (v01  PmRef    ApIst 00003000 INTL 20061109)
[    0.206563] ACPI: Dynamic OEM Table Load:
[    0.206633] ACPI: SSDT           (null) 00303 (v01  PmRef    ApIst 00003000 INTL 20061109)
[    0.217848] ACPI: SSDT 00000000dae6fd98 00119 (v01  PmRef    ApCst 00003000 INTL 20061109)
[    0.218420] ACPI: Dynamic OEM Table Load:
[    0.218490] ACPI: SSDT           (null) 00119 (v01  PmRef    ApCst 00003000 INTL 20061109)
[    0.231830] ACPI: Interpreter enabled
[    0.231881] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20130517/hwxface-571)
[    0.231990] ACPI: (supports S0 S1 S3 S4 S5)
[    0.232027] ACPI: Using IOAPIC for interrupt routing
[    0.232120] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.232351] ACPI: No dock devices found.
[    0.256089] ACPI: Power Resource [FN00] (off)
[    0.256316] ACPI: Power Resource [FN01] (off)
[    0.256531] ACPI: Power Resource [FN02] (off)
[    0.256746] ACPI: Power Resource [FN03] (off)
[    0.256965] ACPI: Power Resource [FN04] (off)
[    0.258157] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[    0.258532] \_SB_.PCI0:_OSC invalid UUID
[    0.258534] _OSC request data:1 8 0 
[    0.259504] PCI host bridge to bus 0000:00
[    0.259543] pci_bus 0000:00: root bus resource [bus 00-3e]
[    0.259583] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7]
[    0.259624] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff]
[    0.259664] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff]
[    0.259706] pci_bus 0000:00: root bus resource [mem 0xdfa00000-0xfeafffff]
[    0.259748] pci_bus 0000:00: root bus resource [mem 0xfed40000-0xfed44fff]
[    0.259804] pci 0000:00:00.0: [8086:0104] type 00 class 0x060000
[    0.259960] pci 0000:00:02.0: [8086:0116] type 00 class 0x030000
[    0.259973] pci 0000:00:02.0: reg 0x10: [mem 0xf0000000-0xf03fffff 64bit]
[    0.259980] pci 0000:00:02.0: reg 0x18: [mem 0xe0000000-0xefffffff 64bit pref]
[    0.259985] pci 0000:00:02.0: reg 0x20: [io  0x3000-0x303f]
[    0.260168] pci 0000:00:16.0: [8086:1c3a] type 00 class 0x078000
[    0.260196] pci 0000:00:16.0: reg 0x10: [mem 0xf0705000-0xf070500f 64bit]
[    0.260280] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
[    0.260441] pci 0000:00:1a.0: [8086:1c2d] type 00 class 0x0c0320
[    0.260466] pci 0000:00:1a.0: reg 0x10: [mem 0xf070a000-0xf070a3ff]
[    0.260567] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
[    0.260673] pci 0000:00:1b.0: [8086:1c20] type 00 class 0x040300
[    0.260691] pci 0000:00:1b.0: reg 0x10: [mem 0xf0700000-0xf0703fff 64bit]
[    0.260770] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[    0.260816] pci 0000:00:1b.0: System wakeup disabled by ACPI
[    0.260922] pci 0000:00:1c.0: [8086:1c10] type 01 class 0x060400
[    0.261013] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    0.261062] pci 0000:00:1c.0: System wakeup disabled by ACPI
[    0.261170] pci 0000:00:1c.3: [8086:1c16] type 01 class 0x060400
[    0.261261] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
[    0.261322] pci 0000:00:1c.3: System wakeup disabled by ACPI
[    0.261430] pci 0000:00:1c.4: [8086:1c18] type 01 class 0x060400
[    0.261522] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
[    0.261648] pci 0000:00:1d.0: [8086:1c26] type 00 class 0x0c0320
[    0.261676] pci 0000:00:1d.0: reg 0x10: [mem 0xf0709000-0xf07093ff]
[    0.261777] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    0.261880] pci 0000:00:1f.0: [8086:1c49] type 00 class 0x060100
[    0.262076] pci 0000:00:1f.2: [8086:1c03] type 00 class 0x010601
[    0.262098] pci 0000:00:1f.2: reg 0x10: [io  0x3088-0x308f]
[    0.262108] pci 0000:00:1f.2: reg 0x14: [io  0x3094-0x3097]
[    0.262118] pci 0000:00:1f.2: reg 0x18: [io  0x3080-0x3087]
[    0.262128] pci 0000:00:1f.2: reg 0x1c: [io  0x3090-0x3093]
[    0.262138] pci 0000:00:1f.2: reg 0x20: [io  0x3060-0x307f]
[    0.262148] pci 0000:00:1f.2: reg 0x24: [mem 0xf0708000-0xf07087ff]
[    0.262200] pci 0000:00:1f.2: PME# supported from D3hot
[    0.262316] pci 0000:00:1f.3: [8086:1c22] type 00 class 0x0c0500
[    0.262335] pci 0000:00:1f.3: reg 0x10: [mem 0xf0704000-0xf07040ff 64bit]
[    0.262359] pci 0000:00:1f.3: reg 0x20: [io  0xefa0-0xefbf]
[    0.262728] pci 0000:01:00.0: [8086:0091] type 00 class 0x028000
[    0.262909] pci 0000:01:00.0: reg 0x10: [mem 0xf0600000-0xf0601fff 64bit]
[    0.263626] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.263796] pci 0000:01:00.0: System wakeup disabled by ACPI
[    0.269800] pci 0000:00:1c.0: PCI bridge to [bus 01]
[    0.269844] pci 0000:00:1c.0:   bridge window [mem 0xf0600000-0xf06fffff]
[    0.270015] pci 0000:02:00.0: [10ec:8168] type 00 class 0x020000
[    0.270081] pci 0000:02:00.0: reg 0x10: [io  0x2000-0x20ff]
[    0.270204] pci 0000:02:00.0: reg 0x18: [mem 0xf0404000-0xf0404fff 64bit pref]
[    0.270280] pci 0000:02:00.0: reg 0x20: [mem 0xf0400000-0xf0403fff 64bit pref]
[    0.270618] pci 0000:02:00.0: supports D1 D2
[    0.270620] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    0.270743] pci 0000:02:00.0: System wakeup disabled by ACPI
[    0.277735] pci 0000:00:1c.3: PCI bridge to [bus 02]
[    0.277796] pci 0000:00:1c.3:   bridge window [io  0x2000-0x2fff]
[    0.277805] pci 0000:00:1c.3:   bridge window [mem 0xf0400000-0xf04fffff 64bit pref]
[    0.277931] pci 0000:03:00.0: [1b21:1042] type 00 class 0x0c0330
[    0.277969] pci 0000:03:00.0: reg 0x10: [mem 0xf0500000-0xf0507fff 64bit]
[    0.278167] pci 0000:03:00.0: PME# supported from D3hot D3cold
[    0.285705] pci 0000:00:1c.4: PCI bridge to [bus 03]
[    0.285781] pci 0000:00:1c.4:   bridge window [mem 0xf0500000-0xf05fffff]
[    0.285966] \_SB_.PCI0:_OSC invalid UUID
[    0.285967] _OSC request data:1 1f 0 
[    0.285972] acpi PNP0A08:00: ACPI _OSC support notification failed, disabling PCIe ASPM
[    0.286028] acpi PNP0A08:00: Unable to request _OSC control (_OSC support mask: 0x08)
[    0.286957] ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 10 *11 12 14 15)
[    0.287307] ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 5 6 10 11 12 14 15) *0, disabled.
[    0.287701] ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 5 6 *10 11 12 14 15)
[    0.288048] ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 5 6 *10 11 12 14 15)
[    0.288394] ACPI: PCI Interrupt Link [LNKE] (IRQs 1 3 4 5 6 10 11 12 14 15) *9
[    0.288768] ACPI: PCI Interrupt Link [LNKF] (IRQs 1 3 4 5 6 10 11 12 14 15) *0, disabled.
[    0.289160] ACPI: PCI Interrupt Link [LNKG] (IRQs 1 3 4 5 6 10 *11 12 14 15)
[    0.289510] ACPI: PCI Interrupt Link [LNKH] (IRQs 1 3 4 5 6 10 11 12 14 15) *9
[    0.290382] ACPI: Enabled 4 GPEs in block 00 to 3F
[    0.290461] ACPI: \_SB_.PCI0: notify handler is installed
[    0.290524] Found 1 acpi root devices
[    0.290594] ACPI: EC: GPE = 0x17, I/O: command/status = 0x66, data = 0x62
[    0.290952] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    0.291010] vgaarb: loaded
[    0.291044] vgaarb: bridge control possible 0000:00:02.0
[    0.291756] SCSI subsystem initialized
[    0.291793] ACPI: bus type ATA registered
[    0.291927] libata version 3.00 loaded.
[    0.291989] ACPI: bus type USB registered
[    0.292069] usbcore: registered new interface driver usbfs
[    0.292131] usbcore: registered new interface driver hub
[    0.292226] usbcore: registered new device driver usb
[    0.292619] PCI: Using ACPI for IRQ routing
[    0.294358] PCI: pci_cache_line_size set to 64 bytes
[    0.294471] e820: reserve RAM buffer [mem 0x0009d800-0x0009ffff]
[    0.294474] e820: reserve RAM buffer [mem 0xd9c9f000-0xdbffffff]
[    0.294477] e820: reserve RAM buffer [mem 0xdb000000-0xdbffffff]
[    0.294478] e820: reserve RAM buffer [mem 0x11fe00000-0x11fffffff]
[    0.294723] NetLabel: Initializing
[    0.294758] NetLabel:  domain hash size = 128
[    0.294795] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.294877] NetLabel:  unlabeled traffic allowed by default
[    0.295006] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0
[    0.295196] hpet0: 8 comparators, 64-bit 14.318180 MHz counter
[    0.297258] Switched to clocksource hpet
[    0.314999] AppArmor: AppArmor Filesystem Enabled
[    0.315093] pnp: PnP ACPI init
[    0.315143] ACPI: bus type PNP registered
[    0.315608] pnp 00:00: [dma 4]
[    0.315651] pnp 00:00: Plug and Play ACPI device, IDs PNP0200 (active)
[    0.315697] pnp 00:01: Plug and Play ACPI device, IDs INT0800 (active)
[    0.315863] pnp 00:02: Plug and Play ACPI device, IDs PNP0103 (active)
[    0.315921] pnp 00:03: Plug and Play ACPI device, IDs PNP0c04 (active)
[    0.316000] system 00:04: [io  0x0680-0x069f] has been reserved
[    0.316042] system 00:04: [io  0x1000-0x100f] has been reserved
[    0.316083] system 00:04: [io  0x5000-0x5003] has been reserved
[    0.316124] system 00:04: [io  0xffff] has been reserved
[    0.316164] system 00:04: [io  0x0400-0x0453] could not be reserved
[    0.316205] system 00:04: [io  0x0458-0x047f] has been reserved
[    0.316245] system 00:04: [io  0x0500-0x057f] has been reserved
[    0.316286] system 00:04: [io  0x0a00-0x0a0f] has been reserved
[    0.316326] system 00:04: [io  0x164e-0x164f] has been reserved
[    0.316367] system 00:04: [io  0x5000-0x500f] could not be reserved
[    0.316409] system 00:04: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.316458] pnp 00:05: Plug and Play ACPI device, IDs PNP0b00 (active)
[    0.316549] system 00:06: [io  0x0454-0x0457] has been reserved
[    0.316591] system 00:06: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[    0.316649] pnp 00:07: Plug and Play ACPI device, IDs PNP0303 (active)
[    0.316733] pnp 00:08: Plug and Play ACPI device, IDs ETD0b00 SYN0002 PNP0f13 (active)
[    0.317044] system 00:09: [mem 0xfed1c000-0xfed1ffff] has been reserved
[    0.317087] system 00:09: [mem 0xfed10000-0xfed17fff] has been reserved
[    0.317128] system 00:09: [mem 0xfed18000-0xfed18fff] has been reserved
[    0.317170] system 00:09: [mem 0xfed19000-0xfed19fff] has been reserved
[    0.317212] system 00:09: [mem 0xf8000000-0xfbffffff] has been reserved
[    0.317264] system 00:09: [mem 0xfed20000-0xfed3ffff] has been reserved
[    0.317308] system 00:09: [mem 0xfed90000-0xfed93fff] has been reserved
[    0.317350] system 00:09: [mem 0xfed45000-0xfed8ffff] has been reserved
[    0.317392] system 00:09: [mem 0xff000000-0xffffffff] could not be reserved
[    0.317435] system 00:09: [mem 0xfee00000-0xfeefffff] could not be reserved
[    0.317478] system 00:09: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.318253] system 00:0a: Plug and Play ACPI device, IDs PNP0c01 (active)
[    0.318292] pnp: PnP ACPI: found 11 devices
[    0.318329] ACPI: bus type PNP unregistered
[    0.326415] pci 0000:00:1c.0: PCI bridge to [bus 01]
[    0.326459] pci 0000:00:1c.0:   bridge window [mem 0xf0600000-0xf06fffff]
[    0.326511] pci 0000:00:1c.3: PCI bridge to [bus 02]
[    0.326551] pci 0000:00:1c.3:   bridge window [io  0x2000-0x2fff]
[    0.326598] pci 0000:00:1c.3:   bridge window [mem 0xf0400000-0xf04fffff 64bit pref]
[    0.326660] pci 0000:00:1c.4: PCI bridge to [bus 03]
[    0.326702] pci 0000:00:1c.4:   bridge window [mem 0xf0500000-0xf05fffff]
[    0.327171] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7]
[    0.327173] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff]
[    0.327175] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff]
[    0.327177] pci_bus 0000:00: resource 7 [mem 0xdfa00000-0xfeafffff]
[    0.327179] pci_bus 0000:00: resource 8 [mem 0xfed40000-0xfed44fff]
[    0.327181] pci_bus 0000:01: resource 1 [mem 0xf0600000-0xf06fffff]
[    0.327184] pci_bus 0000:02: resource 0 [io  0x2000-0x2fff]
[    0.327186] pci_bus 0000:02: resource 2 [mem 0xf0400000-0xf04fffff 64bit pref]
[    0.327188] pci_bus 0000:03: resource 1 [mem 0xf0500000-0xf05fffff]
[    0.327324] NET: Registered protocol family 2
[    0.327732] TCP established hash table entries: 32768 (order: 7, 524288 bytes)
[    0.327967] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes)
[    0.328282] TCP: Hash tables configured (established 32768 bind 32768)
[    0.328580] TCP: reno registered
[    0.328633] UDP hash table entries: 2048 (order: 5, 196608 bytes)
[    0.328737] UDP-Lite hash table entries: 2048 (order: 5, 196608 bytes)
[    0.329034] NET: Registered protocol family 1
[    0.329089] pci 0000:00:02.0: Boot video device
[    0.329877] PCI: CLS 64 bytes, default 64
[    0.330087] Trying to unpack rootfs image as initramfs...
[    0.406566] Freeing initrd memory: 3352K (ffff880037964000 - ffff880037caa000)
[    0.406627] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    0.406668] software IO TLB [mem 0xd5c9f000-0xd9c9f000] (64MB) mapped at [ffff8800d5c9f000-ffff8800d9c9efff]
[    0.407100] microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x28
[    0.407147] microcode: CPU1 sig=0x206a7, pf=0x10, revision=0x28
[    0.407198] microcode: CPU2 sig=0x206a7, pf=0x10, revision=0x28
[    0.407249] microcode: CPU3 sig=0x206a7, pf=0x10, revision=0x28
[    0.407374] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[    0.407431] Scanning for low memory corruption every 60 seconds
[    0.408072] Initialise module verification
[    0.408171] audit: initializing netlink socket (disabled)
[    0.408230] type=2000 audit(1375259234.396:1): initialized
[    0.439056] bounce pool size: 64 pages
[    0.439118] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.439837] VFS: Disk quotas dquot_6.5.2
[    0.440418] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.441300] fuse init (API version 7.22)
[    0.441443] msgmni has been set to 7698
[    0.442149] Key type asymmetric registered
[    0.442188] Asymmetric key parser 'x509' registered
[    0.442274] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.442386] io scheduler noop registered
[    0.442423] io scheduler deadline registered (default)
[    0.442496] io scheduler cfq registered
[    0.442910] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    0.442991] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[    0.443178] intel_idle: MWAIT substates: 0x21120
[    0.443179] intel_idle: v0.4 model 0x2A
[    0.443181] intel_idle: lapic_timer_reliable_states 0xffffffff
[    0.443676] ACPI: AC Adapter [ADP1] (on-line)
[    0.444126] input: Lid Switch as /devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input0
[    0.444202] ACPI: Lid Switch [LID0]
[    0.444300] input: Power Button as /devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input1
[    0.444359] ACPI: Power Button [PWRB]
[    0.444459] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
[    0.444515] ACPI: Power Button [PWRF]
[    0.444640] ACPI: Fan [FAN0] (off)
[    0.444727] ACPI: Fan [FAN1] (off)
[    0.444815] ACPI: Fan [FAN2] (off)
[    0.444898] ACPI: Fan [FAN3] (off)
[    0.444983] ACPI: Fan [FAN4] (off)
[    0.445099] ACPI: Requesting acpi_cpufreq
[    0.448472] thermal LNXTHERM:00: registered as thermal_zone0
[    0.448513] ACPI: Thermal Zone [TZ00] (69 C)
[    0.448978] thermal LNXTHERM:01: registered as thermal_zone1
[    0.449018] ACPI: Thermal Zone [TZ01] (30 C)
[    0.449103] GHES: HEST is not enabled!
[    0.449440] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[    0.454414] ACPI: Battery Slot [BAT1] (battery present)
[    0.454430] Linux agpgart interface v0.103
[    0.457064] brd: module loaded
[    0.458518] loop: module loaded
[    0.458782] mei_me 0000:00:16.0: setting latency timer to 64
[    0.458828] mei_me 0000:00:16.0: irq 40 for MSI/MSI-X
[    0.461957] ahci 0000:00:1f.2: version 3.0
[    0.462143] ahci 0000:00:1f.2: irq 41 for MSI/MSI-X
[    0.462349] ahci: SSS flag set, parallel bus scan disabled
[    0.477173] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x1b impl SATA mode
[    0.477230] ahci 0000:00:1f.2: flags: 64bit ncq sntf ilck stag pm led clo pio slum part ems sxs apst 
[    0.477291] ahci 0000:00:1f.2: setting latency timer to 64
[    0.501973] scsi0 : ahci
[    0.502216] scsi1 : ahci
[    0.502372] scsi2 : ahci
[    0.502526] scsi3 : ahci
[    0.502682] scsi4 : ahci
[    0.502841] scsi5 : ahci
[    0.502952] ata1: SATA max UDMA/133 abar m2048@0xf0708000 port 0xf0708100 irq 41
[    0.503007] ata2: SATA max UDMA/133 abar m2048@0xf0708000 port 0xf0708180 irq 41
[    0.503060] ata3: DUMMY
[    0.503094] ata4: SATA max UDMA/133 abar m2048@0xf0708000 port 0xf0708280 irq 41
[    0.503148] ata5: SATA max UDMA/133 abar m2048@0xf0708000 port 0xf0708300 irq 41
[    0.503201] ata6: DUMMY
[    0.504092] libphy: Fixed MDIO Bus: probed
[    0.504407] tun: Universal TUN/TAP device driver, 1.6
[    0.504444] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    0.504564] PPP generic driver version 2.4.2
[    0.504714] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.504755] ehci_hcd: block sizes: qh 112 qtd 96 itd 192 sitd 96
[    0.504764] ehci-pci: EHCI PCI platform driver
[    0.504983] ehci-pci 0000:00:1a.0: setting latency timer to 64
[    0.504993] ehci-pci 0000:00:1a.0: EHCI Host Controller
[    0.505038] ehci-pci 0000:00:1a.0: new USB bus registered, assigned bus number 1
[    0.505120] ehci-pci 0000:00:1a.0: debug port 2
[    0.505161] ehci-pci 0000:00:1a.0: reset hcs_params 0x200002 dbg=2 cc=0 pcc=0 ordered !ppc ports=2
[    0.505164] ehci-pci 0000:00:1a.0: reset hcc_params 36881 caching frame 1024 64 bit addr
[    0.505203] ehci-pci 0000:00:1a.0: reset command 0080002 (park)=0 ithresh=8 period=1024 Reset HALT
[    0.509088] ehci-pci 0000:00:1a.0: cache line size of 64 is not supported
[    0.509090] ehci-pci 0000:00:1a.0: supports USB remote wakeup
[    0.509142] ehci-pci 0000:00:1a.0: irq 16, io mem 0xf070a000
[    0.509184] ehci-pci 0000:00:1a.0: init command 0010001 (park)=0 ithresh=1 period=1024 RUN
[    0.521113] ehci-pci 0000:00:1a.0: USB 2.0 started, EHCI 1.00
[    0.521189] usb usb1: default language 0x0409
[    0.521202] usb usb1: udev 1, busnum 1, minor = 0
[    0.521204] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.521245] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.521299] usb usb1: Product: EHCI Host Controller
[    0.521337] usb usb1: Manufacturer: Linux 3.11.0-rc3-1-aio-small ehci_hcd
[    0.521378] usb usb1: SerialNumber: 0000:00:1a.0
[    0.521544] usb usb1: usb_probe_device
[    0.521546] usb usb1: configuration #1 chosen from 1 choice
[    0.521557] usb usb1: adding 1-0:1.0 (config #1, interface 0)
[    0.521591] hub 1-0:1.0: usb_probe_interface
[    0.521593] hub 1-0:1.0: usb_probe_interface - got id
[    0.521596] hub 1-0:1.0: USB hub found
[    0.521639] hub 1-0:1.0: 2 ports detected
[    0.521675] hub 1-0:1.0: standalone hub
[    0.521677] hub 1-0:1.0: no power switching (usb 1.0)
[    0.521678] hub 1-0:1.0: individual port over-current protection
[    0.521680] hub 1-0:1.0: power on to power good time: 20ms
[    0.521686] hub 1-0:1.0: local power source is good
[    0.521740] hub 1-0:1.0: trying to enable port power on non-switchable hub
[    0.521967] ehci-pci 0000:00:1d.0: setting latency timer to 64
[    0.521974] ehci-pci 0000:00:1d.0: EHCI Host Controller
[    0.522018] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 2
[    0.522088] ehci-pci 0000:00:1d.0: debug port 2
[    0.522127] ehci-pci 0000:00:1d.0: reset hcs_params 0x200002 dbg=2 cc=0 pcc=0 ordered !ppc ports=2
[    0.522131] ehci-pci 0000:00:1d.0: reset hcc_params 36881 caching frame 1024 64 bit addr
[    0.522165] ehci-pci 0000:00:1d.0: reset command 0080002 (park)=0 ithresh=8 period=1024 Reset HALT
[    0.526041] ehci-pci 0000:00:1d.0: cache line size of 64 is not supported
[    0.526043] ehci-pci 0000:00:1d.0: supports USB remote wakeup
[    0.526087] ehci-pci 0000:00:1d.0: irq 23, io mem 0xf0709000
[    0.526128] ehci-pci 0000:00:1d.0: init command 0010001 (park)=0 ithresh=1 period=1024 RUN
[    0.537106] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00
[    0.537182] usb usb2: default language 0x0409
[    0.537194] usb usb2: udev 1, busnum 2, minor = 128
[    0.537196] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    0.537237] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.537291] usb usb2: Product: EHCI Host Controller
[    0.537328] usb usb2: Manufacturer: Linux 3.11.0-rc3-1-aio-small ehci_hcd
[    0.537369] usb usb2: SerialNumber: 0000:00:1d.0
[    0.537520] usb usb2: usb_probe_device
[    0.537522] usb usb2: configuration #1 chosen from 1 choice
[    0.537531] usb usb2: adding 2-0:1.0 (config #1, interface 0)
[    0.537562] hub 2-0:1.0: usb_probe_interface
[    0.537564] hub 2-0:1.0: usb_probe_interface - got id
[    0.537566] hub 2-0:1.0: USB hub found
[    0.537607] hub 2-0:1.0: 2 ports detected
[    0.537643] hub 2-0:1.0: standalone hub
[    0.537644] hub 2-0:1.0: no power switching (usb 1.0)
[    0.537646] hub 2-0:1.0: individual port over-current protection
[    0.537648] hub 2-0:1.0: power on to power good time: 20ms
[    0.537653] hub 2-0:1.0: local power source is good
[    0.537706] hub 2-0:1.0: trying to enable port power on non-switchable hub
[    0.537784] ehci-platform: EHCI generic platform driver
[    0.537838] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.537878] ohci_hcd: block sizes: ed 80 td 96
[    0.537884] ohci-pci: OHCI PCI platform driver
[    0.537938] ohci-platform: OHCI generic platform driver
[    0.537991] uhci_hcd: USB Universal Host Controller Interface driver
[    0.538231] xhci_hcd 0000:03:00.0: xHCI Host Controller
[    0.538276] xhci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 3
[    0.548046] xhci_hcd 0000:03:00.0: supports USB remote wakeup
[    0.548076] xhci_hcd 0000:03:00.0: irq 42 for MSI/MSI-X
[    0.548084] xhci_hcd 0000:03:00.0: irq 43 for MSI/MSI-X
[    0.548091] xhci_hcd 0000:03:00.0: irq 44 for MSI/MSI-X
[    0.548098] xhci_hcd 0000:03:00.0: irq 45 for MSI/MSI-X
[    0.548107] xhci_hcd 0000:03:00.0: irq 46 for MSI/MSI-X
[    0.548380] usb usb3: default language 0x0409
[    0.548391] usb usb3: udev 1, busnum 3, minor = 256
[    0.548393] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[    0.548435] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.548488] usb usb3: Product: xHCI Host Controller
[    0.548526] usb usb3: Manufacturer: Linux 3.11.0-rc3-1-aio-small xhci_hcd
[    0.548567] usb usb3: SerialNumber: 0000:03:00.0
[    0.548749] usb usb3: usb_probe_device
[    0.548751] usb usb3: configuration #1 chosen from 1 choice
[    0.548756] xHCI xhci_add_endpoint called for root hub
[    0.548758] xHCI xhci_check_bandwidth called for root hub
[    0.548764] usb usb3: adding 3-0:1.0 (config #1, interface 0)
[    0.548796] hub 3-0:1.0: usb_probe_interface
[    0.548797] hub 3-0:1.0: usb_probe_interface - got id
[    0.548800] hub 3-0:1.0: USB hub found
[    0.548845] hub 3-0:1.0: 2 ports detected
[    0.548882] hub 3-0:1.0: standalone hub
[    0.548883] hub 3-0:1.0: no power switching (usb 1.0)
[    0.548885] hub 3-0:1.0: individual port over-current protection
[    0.548886] hub 3-0:1.0: Single TT
[    0.548888] hub 3-0:1.0: TT requires at most 8 FS bit times (666 ns)
[    0.548889] hub 3-0:1.0: power on to power good time: 20ms
[    0.548895] hub 3-0:1.0: local power source is good
[    0.548931] hub 3-0:1.0: trying to enable port power on non-switchable hub
[    0.548999] xhci_hcd 0000:03:00.0: xHCI Host Controller
[    0.549041] xhci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 4
[    0.549121] xhci_hcd 0000:03:00.0: supports USB remote wakeup
[    0.549156] usb usb4: skipped 1 descriptor after endpoint
[    0.549161] usb usb4: default language 0x0409
[    0.549173] usb usb4: udev 1, busnum 4, minor = 384
[    0.549174] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003
[    0.549216] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.549269] usb usb4: Product: xHCI Host Controller
[    0.549307] usb usb4: Manufacturer: Linux 3.11.0-rc3-1-aio-small xhci_hcd
[    0.549348] usb usb4: SerialNumber: 0000:03:00.0
[    0.549484] usb usb4: usb_probe_device
[    0.549486] usb usb4: configuration #1 chosen from 1 choice
[    0.549492] xHCI xhci_add_endpoint called for root hub
[    0.549493] xHCI xhci_check_bandwidth called for root hub
[    0.549499] usb usb4: adding 4-0:1.0 (config #1, interface 0)
[    0.549528] hub 4-0:1.0: usb_probe_interface
[    0.549530] hub 4-0:1.0: usb_probe_interface - got id
[    0.549532] hub 4-0:1.0: USB hub found
[    0.549577] hub 4-0:1.0: 2 ports detected
[    0.549613] hub 4-0:1.0: standalone hub
[    0.549615] hub 4-0:1.0: no power switching (usb 1.0)
[    0.549616] hub 4-0:1.0: individual port over-current protection
[    0.549618] hub 4-0:1.0: TT requires at most 8 FS bit times (666 ns)
[    0.549620] hub 4-0:1.0: power on to power good time: 20ms
[    0.549625] hub 4-0:1.0: local power source is good
[    0.549660] hub 4-0:1.0: trying to enable port power on non-switchable hub
[    0.561155] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:EPAD] at 0x60,0x64 irq 1,12
[    0.567508] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.567550] serio: i8042 AUX port at 0x60,0x64 irq 12
[    0.567816] mousedev: PS/2 mouse device common for all mice
[    0.568324] rtc_cmos 00:05: rtc core: registered rtc_cmos as rtc0
[    0.568396] rtc_cmos 00:05: alarms up to one month, y3k, 242 bytes nvram, hpet irqs
[    0.568513] device-mapper: uevent: version 1.0.3
[    0.568646] device-mapper: ioctl: 4.25.0-ioctl (2013-06-26) initialised: dm-devel@redhat.com
[    0.568718] Intel P-state driver initializing.
[    0.568767] Intel pstate controlling: cpu 0
[    0.568830] Intel pstate controlling: cpu 1
[    0.568887] Intel pstate controlling: cpu 2
[    0.568943] Intel pstate controlling: cpu 3
[    0.569228] cpuidle: using governor ladder
[    0.569504] cpuidle: using governor menu
[    0.569548] ledtrig-cpu: registered to indicate activity on CPUs
[    0.569830] ashmem: initialized
[    0.570038] TCP: cubic registered
[    0.570363] NET: Registered protocol family 10
[    0.570989] NET: Registered protocol family 17
[    0.571048] Key type dns_resolver registered
[    0.571642] PM: Hibernation image not present or could not be loaded.
[    0.571648] Loading module verification certificates
[    0.573057] MODSIGN: Loaded cert 'Magrathea: Glacier signing key: 915c7b93269d3111b5f9afd3bddb4c2a54ae6140'
[    0.573171] registered taskstats version 1
[    0.576569] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3
[    0.578234] Key type trusted registered
[    0.586267] Key type encrypted registered
[    0.593781] rtc_cmos 00:05: setting system clock to 2013-07-31 08:27:15 UTC (1375259235)
[    0.594611] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[    0.594678] EDD information not available.
[    0.621154] ehci-pci 0000:00:1a.0: GetStatus port:1 status 001803 0  ACK POWER sig=j CSC CONNECT
[    0.621165] hub 1-0:1.0: port 1: status 0501 change 0001
[    0.637154] ehci-pci 0000:00:1d.0: GetStatus port:1 status 001803 0  ACK POWER sig=j CSC CONNECT
[    0.637167] hub 2-0:1.0: port 1: status 0501 change 0001
[    0.645171] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[    0.645529] hub 3-0:1.0: hub_suspend
[    0.645546] usb usb3: bus auto-suspend, wakeup 1
[    0.649187] hub 4-0:1.0: state 7 ports 2 chg 0000 evt 0000
[    0.649260] hub 4-0:1.0: hub_suspend
[    0.649272] usb usb4: bus auto-suspend, wakeup 1
[    0.657736] usb usb4: usb wakeup-resume
[    0.657748] usb usb4: usb auto-resume
[    0.669131] hub 4-0:1.0: hub_resume
[    0.669164] hub 4-0:1.0: port 1: status 0203 change 0001
[    0.721112] hub 1-0:1.0: state 7 ports 2 chg 0002 evt 0000
[    0.721153] hub 1-0:1.0: port 1, status 0501, change 0000, 480 Mb/s
[    0.777276] ehci-pci 0000:00:1a.0: port 1 reset complete, port enabled
[    0.777289] ehci-pci 0000:00:1a.0: GetStatus port:1 status 001005 0  ACK POWER sig=se0 PE CONNECT
[    0.821016] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    0.822278] ata1.00: ATA-8: Hitachi HTS545050A7E380, GG2OA6C0, max UDMA/133
[    0.822355] ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    0.823813] ata1.00: configured for UDMA/133
[    0.824335] scsi 0:0:0:0: Direct-Access     ATA      Hitachi HTS54505 GG2O PQ: 0 ANSI: 5
[    0.825046] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
[    0.825147] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    0.825226] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    0.825624] sd 0:0:0:0: [sda] Write Protect is off
[    0.825696] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    0.825936] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    0.832963] usb 1-1: new high-speed USB device number 2 using ehci-pci
[    0.835705]  sda: sda1 sda2 sda3
[    0.837048] sd 0:0:0:0: [sda] Attached SCSI disk
[    0.889198] ehci-pci 0000:00:1a.0: port 1 reset complete, port enabled
[    0.889213] ehci-pci 0000:00:1a.0: GetStatus port:1 status 001005 0  ACK POWER sig=se0 PE CONNECT
[    0.965639] usb 1-1: udev 2, busnum 1, minor = 1
[    0.965650] usb 1-1: New USB device found, idVendor=8087, idProduct=0024
[    0.965726] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    0.966150] usb 1-1: usb_probe_device
[    0.966160] usb 1-1: configuration #1 chosen from 1 choice
[    0.966394] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[    0.966479] hub 1-1:1.0: usb_probe_interface
[    0.966484] hub 1-1:1.0: usb_probe_interface - got id
[    0.966492] hub 1-1:1.0: USB hub found
[    0.966724] hub 1-1:1.0: 6 ports detected
[    0.966795] hub 1-1:1.0: standalone hub
[    0.966800] hub 1-1:1.0: individual port power switching
[    0.966804] hub 1-1:1.0: individual port over-current protection
[    0.966807] hub 1-1:1.0: Single TT
[    0.966811] hub 1-1:1.0: TT requires at most 8 FS bit times (666 ns)
[    0.966815] hub 1-1:1.0: power on to power good time: 100ms
[    0.967078] hub 1-1:1.0: local power source is good
[    0.967533] hub 1-1:1.0: enabling power on all ports
[    0.968881] hub 2-0:1.0: state 7 ports 2 chg 0002 evt 0000
[    0.968900] hub 2-0:1.0: port 1, status 0501, change 0000, 480 Mb/s
[    1.025102] ehci-pci 0000:00:1d.0: port 1 reset complete, port enabled
[    1.025118] ehci-pci 0000:00:1d.0: GetStatus port:1 status 001005 0  ACK POWER sig=se0 PE CONNECT
[    1.065298] hub 1-1:1.0: port 2: status 0101 change 0001
[    1.066042] hub 1-1:1.0: port 4: status 0101 change 0001
[    1.080832] usb 2-1: new high-speed USB device number 2 using ehci-pci
[    1.137021] ehci-pci 0000:00:1d.0: port 1 reset complete, port enabled
[    1.137037] ehci-pci 0000:00:1d.0: GetStatus port:1 status 001005 0  ACK POWER sig=se0 PE CONNECT
[    1.144790] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    1.145454] ata2.00: ATA-8: SanDisk iSSD P4 16GB, SSD 9.14, max UDMA/133
[    1.145533] ata2.00: 31277232 sectors, multi 1: LBA48 
[    1.146841] ata2.00: configured for UDMA/133
[    1.147395] scsi 1:0:0:0: Direct-Access     ATA      SanDisk iSSD P4  SSD  PQ: 0 ANSI: 5
[    1.147953] sd 1:0:0:0: [sdb] 31277232 512-byte logical blocks: (16.0 GB/14.9 GiB)
[    1.148032] sd 1:0:0:0: Attached scsi generic sg1 type 0
[    1.148363] sd 1:0:0:0: [sdb] Write Protect is off
[    1.148434] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    1.148491] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.149846]  sdb: sdb1 sdb2
[    1.150936] sd 1:0:0:0: [sdb] Attached SCSI disk
[    1.164771] usb 1-1: link qh256-0001/ffff880118425340 start 1 [1/0 us]
[    1.213462] usb 2-1: udev 2, busnum 2, minor = 129
[    1.213473] usb 2-1: New USB device found, idVendor=8087, idProduct=0024
[    1.213548] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.213965] usb 2-1: usb_probe_device
[    1.213975] usb 2-1: configuration #1 chosen from 1 choice
[    1.214223] usb 2-1: adding 2-1:1.0 (config #1, interface 0)
[    1.214316] hub 2-1:1.0: usb_probe_interface
[    1.214322] hub 2-1:1.0: usb_probe_interface - got id
[    1.214329] hub 2-1:1.0: USB hub found
[    1.214517] hub 2-1:1.0: 6 ports detected
[    1.214588] hub 2-1:1.0: standalone hub
[    1.214592] hub 2-1:1.0: individual port power switching
[    1.214595] hub 2-1:1.0: individual port over-current protection
[    1.214598] hub 2-1:1.0: Single TT
[    1.214602] hub 2-1:1.0: TT requires at most 8 FS bit times (666 ns)
[    1.214606] hub 2-1:1.0: power on to power good time: 100ms
[    1.215081] hub 2-1:1.0: local power source is good
[    1.215638] hub 2-1:1.0: enabling power on all ports
[    1.216823] hub 4-0:1.0: state 7 ports 2 chg 0002 evt 0000
[    1.216845] hub 4-0:1.0: port 1, status 0203, change 0000, 5.0 Gb/s
[    1.317884] hub 2-1:1.0: port 5: status 0101 change 0001
[    1.332247] usb 4-1: new SuperSpeed USB device number 2 using xhci_hcd
[    1.345246] usb 4-1: Parent hub missing LPM exit latency info.  Power management will be impacted.
[    1.345701] usb 4-1: skipped 1 descriptor after endpoint
[    1.345709] usb 4-1: skipped 1 descriptor after endpoint
[    1.345856] usb 4-1: default language 0x0409
[    1.346184] usb 4-1: udev 2, busnum 4, minor = 385
[    1.346190] usb 4-1: New USB device found, idVendor=174c, idProduct=55aa
[    1.346263] usb 4-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    1.346333] usb 4-1: Product: MEDION HDDrive-n-GO
[    1.346397] usb 4-1: Manufacturer: MEDION
[    1.346461] usb 4-1: SerialNumber: 3180000000000000092C
[    1.346828] usb 4-1: usb_probe_device
[    1.346834] usb 4-1: configuration #1 chosen from 1 choice
[    1.347933] usb 4-1: Successful Endpoint Configure command
[    1.348030] usb 4-1: adding 4-1:1.0 (config #1, interface 0)
[    1.348272] hub 1-1:1.0: state 7 ports 6 chg 0014 evt 0000
[    1.348471] hub 1-1:1.0: port 2, status 0101, change 0000, 12 Mb/s
[    1.404593] tsc: Refined TSC clocksource calibration: 1596.374 MHz
[    1.416615] usb 2-1: link qh256-0001/ffff880118776840 start 1 [1/0 us]
[    1.420804] usb 1-1.2: new low-speed USB device number 3 using ehci-pci
[    1.464555] ata4: SATA link down (SStatus 0 SControl 300)
[    1.515755] usb 1-1.2: skipped 1 descriptor after interface
[    1.516225] usb 1-1.2: default language 0x0409
[    1.518747] usb 1-1.2: udev 3, busnum 1, minor = 2
[    1.518757] usb 1-1.2: New USB device found, idVendor=046d, idProduct=c00e
[    1.518834] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.518922] usb 1-1.2: Product: USB-PS/2 Optical Mouse
[    1.518987] usb 1-1.2: Manufacturer: Logitech
[    1.519417] usb 1-1.2: usb_probe_device
[    1.519427] usb 1-1.2: configuration #1 chosen from 1 choice
[    1.519974] usb 1-1.2: adding 1-1.2:1.0 (config #1, interface 0)
[    1.520277] hub 1-1:1.0: port 4, status 0101, change 0000, 12 Mb/s
[    1.588690] usb 1-1.4: new high-speed USB device number 4 using ehci-pci
[    1.784375] ata5: SATA link down (SStatus 0 SControl 300)
[    1.787225] Freeing unused kernel memory: 1332K (ffffffff81d07000 - ffffffff81e54000)
[    1.787313] Write protecting the kernel read-only data: 12288k
[    1.792799] Freeing unused kernel memory: 1064K (ffff8800016f6000 - ffff880001800000)
[    1.797368] Freeing unused kernel memory: 952K (ffff880001b12000 - ffff880001c00000)
[    1.830236] usb 1-1.4: skipped 1 descriptor after configuration
[    1.830243] usb 1-1.4: skipped 5 descriptors after interface
[    1.830247] usb 1-1.4: skipped 1 descriptor after endpoint
[    1.830250] usb 1-1.4: skipped 23 descriptors after interface
[    1.832324] usb 1-1.4: default language 0x0409
[    1.840534] udevd[122]: starting version 175
[    1.844293] usb 1-1.4: udev 4, busnum 1, minor = 3
[    1.844300] usb 1-1.4: New USB device found, idVendor=2232, idProduct=1018
[    1.844358] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.844430] usb 1-1.4: Product: WebCam SC-13HDL11431N
[    1.844479] usb 1-1.4: Manufacturer: 123
[    1.844855] usb 1-1.4: usb_probe_device
[    1.844861] usb 1-1.4: configuration #1 chosen from 1 choice
[    1.845753] usb 1-1.4: adding 1-1.4:1.0 (config #1, interface 0)
[    1.979874] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    1.979960] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[    1.980483] r8169 0000:02:00.0: irq 47 for MSI/MSI-X
[    1.983500] r8169 0000:02:00.0 eth0: RTL8168evl/8111evl at 0xffffc90000620000, e8:03:9a:36:17:a9, XID 0c900800 IRQ 47
[    1.983570] r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    2.011357] usb-storage 4-1:1.0: usb_probe_interface
[    2.011367] usb-storage 4-1:1.0: usb_probe_interface - got id
[    2.011373] usb-storage 4-1:1.0: USB Mass Storage device detected
[    2.011588] scsi6 : usb-storage 4-1:1.0
[    2.011851] usbcore: registered new interface driver usb-storage
[    2.017011] usb 1-1.4: adding 1-1.4:1.1 (config #1, interface 1)
[    2.017208] hub 2-1:1.0: state 7 ports 6 chg 0020 evt 0000
[    2.017276] hub 2-1:1.0: port 5, status 0101, change 0000, 12 Mb/s
[    2.034747] hidraw: raw HID events driver (C) Jiri Kosina
[    2.038778] usbhid 1-1.2:1.0: usb_probe_interface
[    2.038784] usbhid 1-1.2:1.0: usb_probe_interface - got id
[    2.041494] usbcore: registered new interface driver usbhid
[    2.041536] usbhid: USB HID core driver
[    2.066750] input: Logitech USB-PS/2 Optical Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input4
[    2.067084] hid-generic 0003:046D:C00E.0001: input,hidraw0: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:1a.0-1.2/input0
[    2.092122] usb 2-1.5: new full-speed USB device number 3 using ehci-pci
[    2.197110] usb 2-1.5: udev 3, busnum 2, minor = 130
[    2.197120] usb 2-1.5: New USB device found, idVendor=8086, idProduct=0189
[    2.197196] usb 2-1.5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.197625] usb 2-1.5: usb_probe_device
[    2.197631] usb 2-1.5: configuration #1 chosen from 1 choice
[    2.198201] usb 2-1.5: adding 2-1.5:1.0 (config #1, interface 0)
[    2.198602] usb 2-1.5: adding 2-1.5:1.1 (config #1, interface 1)
[    2.199307] hub 1-1:1.0: state 7 ports 6 chg 0000 evt 0010
[    2.199420] hub 2-1:1.0: state 7 ports 6 chg 0000 evt 0020
[    2.404199] Switched to clocksource tsc
[    2.898385] EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null)
[    3.007764] scsi 6:0:0:0: Direct-Access     ASMT     2105             0    PQ: 0 ANSI: 6
[    3.008323] sd 6:0:0:0: Attached scsi generic sg2 type 0
[    3.008456] sd 6:0:0:0: [sdc] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[    3.008980] sd 6:0:0:0: [sdc] Write Protect is off
[    3.009036] sd 6:0:0:0: [sdc] Mode Sense: 43 00 00 00
[    3.009521] sd 6:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.012065]  sdc: sdc1 sdc2 sdc3
[    3.013899] sd 6:0:0:0: [sdc] Attached SCSI disk
[   14.266555] Adding 262140k swap on /host/ubuntu/disks/swap.disk.  Priority:-1 extents:1 across:262140k FS
[   14.280507] EXT4-fs (loop0): re-mounted. Opts: errors=remount-ro
[   14.335148] udevd[621]: starting version 175
[   14.591412] ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 1 (20130517/utaddress-251)
[   14.591420] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   14.591425] ACPI Warning: 0x0000000000000540-0x000000000000054f SystemIO conflicts with Region \GPIO 1 (20130517/utaddress-251)
[   14.591428] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   14.591430] ACPI Warning: 0x0000000000000530-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20130517/utaddress-251)
[   14.591433] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   14.591435] ACPI Warning: 0x0000000000000500-0x000000000000052f SystemIO conflicts with Region \GPIO 1 (20130517/utaddress-251)
[   14.591438] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   14.591439] lpc_ich: Resource conflict(s) found affecting gpio_ich
[   14.944945] wmi: Mapper loaded
[   14.945508] samsung_laptop: detected SABI interface: SwSmi@
[   14.945512] samsung_laptop: Backlight controlled by ACPI video driver
[   14.981099] lp: driver loaded but no devices found
[   15.206156] Bluetooth: Core ver 2.16
[   15.206211] NET: Registered protocol family 31
[   15.206214] Bluetooth: HCI device and connection manager initialized
[   15.206231] Bluetooth: HCI socket layer initialized
[   15.206242] Bluetooth: L2CAP socket layer initialized
[   15.206264] Bluetooth: SCO socket layer initialized
[   15.206327] type=1400 audit(1375252050.118:2): apparmor="STATUS" operation="profile_load" name="/sbin/dhclient" pid=866 comm="apparmor_parser"
[   15.207110] type=1400 audit(1375252050.122:3): apparmor="STATUS" operation="profile_load" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=866 comm="apparmor_parser"
[   15.207612] type=1400 audit(1375252050.122:4): apparmor="STATUS" operation="profile_load" name="/usr/lib/connman/scripts/dhclient-script" pid=866 comm="apparmor_parser"
[   15.208623] type=1400 audit(1375252050.122:5): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=720 comm="apparmor_parser"
[   15.208928] ppdev: user-space parallel port driver
[   15.209485] type=1400 audit(1375252050.122:6): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=720 comm="apparmor_parser"
[   15.210033] type=1400 audit(1375252050.122:7): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=720 comm="apparmor_parser"
[   15.227717] cfg80211: Calling CRDA to update world regulatory domain
[   15.254772] cfg80211: World regulatory domain updated:
[   15.254779] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   15.254783] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   15.254786] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   15.254788] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   15.254790] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   15.254793] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   15.293126] init: failsafe main process (970) killed by TERM signal
[   15.378991] type=1400 audit(1375252050.294:8): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=1086 comm="apparmor_parser"
[   15.379810] type=1400 audit(1375252050.294:9): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1086 comm="apparmor_parser"
[   15.380321] type=1400 audit(1375252050.294:10): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=1086 comm="apparmor_parser"
[   15.399675] Linux video capture interface: v2.00
[   16.095140] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   16.095145] Bluetooth: BNEP filters: protocol multicast
[   16.095167] Bluetooth: BNEP socket layer initialized
[   16.161419] btusb 2-1.5:1.0: usb_probe_interface
[   16.161430] btusb 2-1.5:1.0: usb_probe_interface - got id
[   16.162798] usbcore: registered new interface driver btusb
[   16.163712] usb 2-1.5: link qh1-0e01/ffff880115df2440 start 0 [1/2 us]
[   16.165998] Bluetooth: RFCOMM TTY layer initialized
[   16.166150] Bluetooth: RFCOMM socket layer initialized
[   16.166156] Bluetooth: RFCOMM ver 1.11
[   16.180291] type=1400 audit(1375252051.094:11): apparmor="STATUS" operation="profile_load" name="/usr/lib/telepathy/mission-control-5" pid=1089 comm="apparmor_parser"
[   16.192668] [drm] Initialized drm 1.1.0 20060810
[   16.687992] Intel(R) Wireless WiFi driver for Linux, in-tree:d
[   16.687997] Copyright(c) 2003-2013 Intel Corporation
[   16.688073] iwlwifi 0000:01:00.0: can't disable ASPM; OS doesn't have ASPM control
[   16.688470] iwlwifi 0000:01:00.0: irq 48 for MSI/MSI-X
[   16.729704] iwlwifi 0000:01:00.0: loaded firmware version 18.168.6.1 op_mode iwldvm
[   16.807649] uvcvideo 1-1.4:1.0: usb_probe_interface
[   16.807659] uvcvideo 1-1.4:1.0: usb_probe_interface - got id
[   16.807761] uvcvideo: Found UVC 1.00 device WebCam SC-13HDL11431N (2232:1018)
[   16.827397] input: WebCam SC-13HDL11431N as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/input/input5
[   16.827708] usbcore: registered new interface driver uvcvideo
[   16.827713] USB Video Class driver (1.1.1)
[   16.832779] usb 1-1.4: link qh16-0001/ffff8800bec071c0 start 2 [1/0 us]
[   16.832864] usb 1-1.4: unlink qh16-0001/ffff8800bec071c0 start 2 [1/0 us]
[   16.913330] [drm] Memory usable by graphics device = 2048M
[   16.913343] i915 0000:00:02.0: setting latency timer to 64
[   16.954720] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEBUG enabled
[   16.954726] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEBUGFS enabled
[   16.954730] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEVICE_TRACING enabled
[   16.954733] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_P2P disabled
[   16.954736] iwlwifi 0000:01:00.0: Detected Intel(R) Centrino(R) Advanced-N 6230 AGN, REV=0xB0
[   16.954789] iwlwifi 0000:01:00.0: L1 Enabled; Disabling L0S
[   16.955804] i915 0000:00:02.0: irq 49 for MSI/MSI-X
[   16.955838] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[   16.955840] [drm] Driver supports precise vblank timestamp query.
[   16.956111] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
[   16.980292] [drm] Wrong MCH_SSKPD value: 0x16040307
[   16.980297] [drm] This can cause pipe underruns and display issues.
[   16.980299] [drm] Please upgrade your BIOS to fix this.
[   16.981071] init: alsa-restore main process (1183) terminated with status 19
[   16.996496] fbcon: inteldrmfb (fb0) is primary device
[   17.007143] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[   17.034889] iwlwifi 0000:01:00.0: L1 Enabled; Disabling L0S
[   17.041724] iwlwifi 0000:01:00.0: Radio type=0x1-0x2-0x0
[   17.195152] psmouse serio1: elantech: assuming hardware version 3 (with firmware version 0x450f00)
[   17.210319] psmouse serio1: elantech: Synaptics capabilities query result 0x08, 0x17, 0x0c.
[   17.289106] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input6
[   17.318762] iwlwifi 0000:01:00.0: L1 Enabled; Disabling L0S
[   17.325440] iwlwifi 0000:01:00.0: Radio type=0x1-0x2-0x0
[   17.404934] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   18.006569] Console: switching to colour frame buffer device 170x48
[   18.011729] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[   18.011731] i915 0000:00:02.0: registered panic notifier
[   18.026766] acpi device:33: registered as cooling_device9
[   18.027264] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[   18.027382] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input7
[   18.027555] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
[   18.027823] snd_hda_intel 0000:00:1b.0: irq 50 for MSI/MSI-X
[   18.062063] init: plymouth-splash main process (1317) terminated with status 1
[   18.104959] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input8
[   18.105165] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9
[   18.105359] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
[   18.484924] init: plymouth-stop pre-start process (1464) terminated with status 1
[   18.812631] [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off
[   18.832385] usb 1-1.4: usb auto-suspend, wakeup 0
[   19.220990] usb 1-1.2: link qh8-0e01/ffff8800bb35b640 start 3 [1/2 us]
[   23.699533] wlan0: authenticate with 00:04:0e:e4:00:3d
[   23.704454] wlan0: send auth to 00:04:0e:e4:00:3d (try 1/3)
[   23.706202] wlan0: authenticated
[   23.706424] iwlwifi 0000:01:00.0 wlan0: disabling HT as WMM/QoS is not supported by the AP
[   23.706429] iwlwifi 0000:01:00.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP
[   23.708758] wlan0: associate with 00:04:0e:e4:00:3d (try 1/3)
[   23.713701] wlan0: RX AssocResp from 00:04:0e:e4:00:3d (capab=0x411 status=0 aid=1)
[   23.720436] wlan0: associated
[   23.720562] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   26.633482] usb usb3: usb auto-resume
[   26.633503] hub 3-0:1.0: hub_resume
[   26.633532] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   26.633550] hub 3-0:1.0: hub_suspend
[   26.633558] usb usb3: bus auto-suspend, wakeup 1
[   26.633581] usb usb3: usb auto-resume
[   26.642667] hub 3-0:1.0: hub_resume
[   26.642698] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   26.642712] hub 3-0:1.0: hub_suspend
[   26.642718] usb usb3: bus auto-suspend, wakeup 1
[   26.643161] usb 1-1.4: usb auto-resume
[   26.690877] usb 1-1.4: finish resume
[   26.853330] usb usb3: usb auto-resume
[   26.853355] hub 3-0:1.0: hub_resume
[   26.853423] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   26.853457] hub 3-0:1.0: hub_suspend
[   26.853467] usb usb3: bus auto-suspend, wakeup 1
[   26.853497] usb usb3: usb auto-resume
[   26.866621] hub 3-0:1.0: hub_resume
[   26.866676] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   26.866703] hub 3-0:1.0: hub_suspend
[   26.866712] usb usb3: bus auto-suspend, wakeup 1
[   26.885829] usb usb3: usb auto-resume
[   26.885852] hub 3-0:1.0: hub_resume
[   26.885885] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   26.885922] hub 3-0:1.0: hub_suspend
[   26.885929] usb usb3: bus auto-suspend, wakeup 1
[   26.885994] usb usb3: usb auto-resume
[   26.894485] hub 3-0:1.0: hub_resume
[   26.894517] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   26.894533] hub 3-0:1.0: hub_suspend
[   26.894541] usb usb3: bus auto-suspend, wakeup 1
[   26.939376] usb usb3: usb auto-resume
[   26.939399] hub 3-0:1.0: hub_resume
[   26.939434] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   26.939474] hub 3-0:1.0: hub_suspend
[   26.939481] usb usb3: bus auto-suspend, wakeup 1
[   26.939556] usb usb3: usb auto-resume
[   26.950483] hub 3-0:1.0: hub_resume
[   26.950512] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   26.950540] hub 3-0:1.0: hub_suspend
[   26.950548] usb usb3: bus auto-suspend, wakeup 1
[   27.001674] usb usb3: usb auto-resume
[   27.001695] hub 3-0:1.0: hub_resume
[   27.001722] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.001742] hub 3-0:1.0: hub_suspend
[   27.001751] usb usb3: bus auto-suspend, wakeup 1
[   27.001774] usb usb3: usb auto-resume
[   27.010383] hub 3-0:1.0: hub_resume
[   27.010411] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.010430] hub 3-0:1.0: hub_suspend
[   27.010438] usb usb3: bus auto-suspend, wakeup 1
[   27.017359] usb usb3: usb auto-resume
[   27.026473] hub 3-0:1.0: hub_resume
[   27.026502] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.026524] hub 3-0:1.0: hub_suspend
[   27.026530] usb usb3: bus auto-suspend, wakeup 1
[   27.026585] usb usb3: usb auto-resume
[   27.038415] hub 3-0:1.0: hub_resume
[   27.038441] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.038459] hub 3-0:1.0: hub_suspend
[   27.038465] usb usb3: bus auto-suspend, wakeup 1
[   27.043102] usb usb3: usb auto-resume
[   27.054361] hub 3-0:1.0: hub_resume
[   27.054412] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.054444] hub 3-0:1.0: hub_suspend
[   27.054451] usb usb3: bus auto-suspend, wakeup 1
[   27.054518] usb usb3: usb auto-resume
[   27.066468] hub 3-0:1.0: hub_resume
[   27.066580] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.066614] hub 3-0:1.0: hub_suspend
[   27.066622] usb usb3: bus auto-suspend, wakeup 1
[   27.154303] usb usb3: usb auto-resume
[   27.154324] hub 3-0:1.0: hub_resume
[   27.154356] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.154379] hub 3-0:1.0: hub_suspend
[   27.154388] usb usb3: bus auto-suspend, wakeup 1
[   27.154415] usb usb3: usb auto-resume
[   27.166337] hub 3-0:1.0: hub_resume
[   27.166372] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.166392] hub 3-0:1.0: hub_suspend
[   27.166401] usb usb3: bus auto-suspend, wakeup 1
[   27.175469] usb usb3: usb auto-resume
[   27.186397] hub 3-0:1.0: hub_resume
[   27.186431] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.186476] hub 3-0:1.0: hub_suspend
[   27.186483] usb usb3: bus auto-suspend, wakeup 1
[   27.186563] usb usb3: usb auto-resume
[   27.198268] hub 3-0:1.0: hub_resume
[   27.198308] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.198326] hub 3-0:1.0: hub_suspend
[   27.198335] usb usb3: bus auto-suspend, wakeup 1
[   27.637773] usb usb3: usb auto-resume
[   27.637798] hub 3-0:1.0: hub_resume
[   27.637868] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.637948] hub 3-0:1.0: hub_suspend
[   27.637959] usb usb3: bus auto-suspend, wakeup 1
[   27.637989] usb usb3: usb auto-resume
[   27.650015] hub 3-0:1.0: hub_resume
[   27.650056] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.650094] hub 3-0:1.0: hub_suspend
[   27.650106] usb usb3: bus auto-suspend, wakeup 1
[   27.823420] usb usb3: usb auto-resume
[   27.823443] hub 3-0:1.0: hub_resume
[   27.823469] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.823486] hub 3-0:1.0: hub_suspend
[   27.823493] usb usb3: bus auto-suspend, wakeup 1
[   27.823558] usb usb3: usb auto-resume
[   27.833812] hub 3-0:1.0: hub_resume
[   27.833878] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   27.833894] hub 3-0:1.0: hub_suspend
[   27.833901] usb usb3: bus auto-suspend, wakeup 1
[   28.902042] usb usb3: usb auto-resume
[   28.902063] hub 3-0:1.0: hub_resume
[   28.902549] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   28.902565] hub 3-0:1.0: hub_suspend
[   28.902572] usb usb3: bus auto-suspend, wakeup 1
[   28.919842] usb usb3: usb auto-resume
[   28.919865] hub 3-0:1.0: hub_resume
[   28.919892] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   28.919917] hub 3-0:1.0: hub_suspend
[   28.919925] usb usb3: bus auto-suspend, wakeup 1
[   28.919991] usb usb3: usb auto-resume
[   28.929024] hub 3-0:1.0: hub_resume
[   28.929054] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   28.929066] hub 3-0:1.0: hub_suspend
[   28.929075] usb usb3: bus auto-suspend, wakeup 1
[   28.931424] usb usb3: usb auto-resume
[   28.941040] hub 3-0:1.0: hub_resume
[   28.941070] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   28.941103] hub 3-0:1.0: hub_suspend
[   28.941112] usb usb3: bus auto-suspend, wakeup 1
[   28.941173] usb usb3: usb auto-resume
[   28.953018] hub 3-0:1.0: hub_resume
[   28.953087] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   28.953101] hub 3-0:1.0: hub_suspend
[   28.953106] usb usb3: bus auto-suspend, wakeup 1
[   29.014284] usb usb3: usb auto-resume
[   29.014308] hub 3-0:1.0: hub_resume
[   29.014358] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.014374] hub 3-0:1.0: hub_suspend
[   29.014381] usb usb3: bus auto-suspend, wakeup 1
[   29.014405] usb usb3: usb auto-resume
[   29.024994] hub 3-0:1.0: hub_resume
[   29.025022] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.025050] hub 3-0:1.0: hub_suspend
[   29.025056] usb usb3: bus auto-suspend, wakeup 1
[   29.025889] usb usb3: usb auto-resume
[   29.036965] hub 3-0:1.0: hub_resume
[   29.036989] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.037025] hub 3-0:1.0: hub_suspend
[   29.037031] usb usb3: bus auto-suspend, wakeup 1
[   29.037087] usb usb3: usb auto-resume
[   29.048951] hub 3-0:1.0: hub_resume
[   29.048975] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.048993] hub 3-0:1.0: hub_suspend
[   29.048999] usb usb3: bus auto-suspend, wakeup 1
[   29.050926] usb usb3: usb auto-resume
[   29.061014] hub 3-0:1.0: hub_resume
[   29.061072] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.061090] hub 3-0:1.0: hub_suspend
[   29.061095] usb usb3: bus auto-suspend, wakeup 1
[   29.061121] usb usb3: usb auto-resume
[   29.073035] hub 3-0:1.0: hub_resume
[   29.073113] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.073146] hub 3-0:1.0: hub_suspend
[   29.073155] usb usb3: bus auto-suspend, wakeup 1
[   29.084597] usb usb3: usb auto-resume
[   29.092973] hub 3-0:1.0: hub_resume
[   29.093024] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.093050] hub 3-0:1.0: hub_suspend
[   29.093056] usb usb3: bus auto-suspend, wakeup 1
[   29.093126] usb usb3: usb auto-resume
[   29.104942] hub 3-0:1.0: hub_resume
[   29.104968] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.104978] hub 3-0:1.0: hub_suspend
[   29.104986] usb usb3: bus auto-suspend, wakeup 1
[   29.111567] usb usb3: usb auto-resume
[   29.121047] hub 3-0:1.0: hub_resume
[   29.121092] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.121119] hub 3-0:1.0: hub_suspend
[   29.121133] usb usb3: bus auto-suspend, wakeup 1
[   29.121193] usb usb3: usb auto-resume
[   29.132944] hub 3-0:1.0: hub_resume
[   29.132988] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.133007] hub 3-0:1.0: hub_suspend
[   29.133012] usb usb3: bus auto-suspend, wakeup 1
[   29.137781] usb usb3: usb auto-resume
[   29.148949] hub 3-0:1.0: hub_resume
[   29.148986] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.149019] hub 3-0:1.0: hub_suspend
[   29.149025] usb usb3: bus auto-suspend, wakeup 1
[   29.149085] usb usb3: usb auto-resume
[   29.160955] hub 3-0:1.0: hub_resume
[   29.161033] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.161063] hub 3-0:1.0: hub_suspend
[   29.161070] usb usb3: bus auto-suspend, wakeup 1
[   29.162022] usb usb3: usb auto-resume
[   29.172854] hub 3-0:1.0: hub_resume
[   29.172893] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.172920] hub 3-0:1.0: hub_suspend
[   29.172927] usb usb3: bus auto-suspend, wakeup 1
[   29.172998] usb usb3: usb auto-resume
[   29.188905] hub 3-0:1.0: hub_resume
[   29.188970] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.189001] hub 3-0:1.0: hub_suspend
[   29.189008] usb usb3: bus auto-suspend, wakeup 1
[   29.220504] usb usb3: usb auto-resume
[   29.220527] hub 3-0:1.0: hub_resume
[   29.220561] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.220586] hub 3-0:1.0: hub_suspend
[   29.220592] usb usb3: bus auto-suspend, wakeup 1
[   29.220661] usb usb3: usb auto-resume
[   29.229653] hub 3-0:1.0: hub_resume
[   29.229689] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.229782] hub 3-0:1.0: hub_suspend
[   29.229791] usb usb3: bus auto-suspend, wakeup 1
[   29.235029] usb usb3: usb auto-resume
[   29.244918] hub 3-0:1.0: hub_resume
[   29.244961] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.244983] hub 3-0:1.0: hub_suspend
[   29.244989] usb usb3: bus auto-suspend, wakeup 1
[   29.245071] usb usb3: usb auto-resume
[   29.256848] hub 3-0:1.0: hub_resume
[   29.256906] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.256927] hub 3-0:1.0: hub_suspend
[   29.256933] usb usb3: bus auto-suspend, wakeup 1
[   29.296545] usb usb3: usb auto-resume
[   29.296567] hub 3-0:1.0: hub_resume
[   29.296600] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.296618] hub 3-0:1.0: hub_suspend
[   29.296625] usb usb3: bus auto-suspend, wakeup 1
[   29.296643] usb usb3: usb auto-resume
[   29.304871] hub 3-0:1.0: hub_resume
[   29.304951] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.304973] hub 3-0:1.0: hub_suspend
[   29.304989] usb usb3: bus auto-suspend, wakeup 1
[   29.325909] usb usb3: usb auto-resume
[   29.325930] hub 3-0:1.0: hub_resume
[   29.325965] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.325986] hub 3-0:1.0: hub_suspend
[   29.326002] usb usb3: bus auto-suspend, wakeup 1
[   29.326034] usb usb3: usb auto-resume
[   29.336751] hub 3-0:1.0: hub_resume
[   29.336796] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.336821] hub 3-0:1.0: hub_suspend
[   29.336829] usb usb3: bus auto-suspend, wakeup 1
[   29.347942] usb usb3: usb auto-resume
[   29.356759] hub 3-0:1.0: hub_resume
[   29.356839] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.356855] hub 3-0:1.0: hub_suspend
[   29.356861] usb usb3: bus auto-suspend, wakeup 1
[   29.356888] usb usb3: usb auto-resume
[   29.368729] hub 3-0:1.0: hub_resume
[   29.368763] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.368789] hub 3-0:1.0: hub_suspend
[   29.368797] usb usb3: bus auto-suspend, wakeup 1
[   29.448388] usb usb3: usb auto-resume
[   29.448408] hub 3-0:1.0: hub_resume
[   29.448435] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.448457] hub 3-0:1.0: hub_suspend
[   29.448465] usb usb3: bus auto-suspend, wakeup 1
[   29.448526] usb usb3: usb auto-resume
[   29.456666] hub 3-0:1.0: hub_resume
[   29.456699] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.456720] hub 3-0:1.0: hub_suspend
[   29.456729] usb usb3: bus auto-suspend, wakeup 1
[   29.485649] usb usb3: usb auto-resume
[   29.485671] hub 3-0:1.0: hub_resume
[   29.485700] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.485721] hub 3-0:1.0: hub_suspend
[   29.485727] usb usb3: bus auto-suspend, wakeup 1
[   29.485790] usb usb3: usb auto-resume
[   29.496634] hub 3-0:1.0: hub_resume
[   29.496676] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.496694] hub 3-0:1.0: hub_suspend
[   29.496702] usb usb3: bus auto-suspend, wakeup 1
[   29.499453] usb usb3: usb auto-resume
[   29.508624] hub 3-0:1.0: hub_resume
[   29.508664] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.508689] hub 3-0:1.0: hub_suspend
[   29.508698] usb usb3: bus auto-suspend, wakeup 1
[   29.508785] usb usb3: usb auto-resume
[   29.520635] hub 3-0:1.0: hub_resume
[   29.520664] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.520677] hub 3-0:1.0: hub_suspend
[   29.520684] usb usb3: bus auto-suspend, wakeup 1
[   29.543751] usb usb3: usb auto-resume
[   29.543773] hub 3-0:1.0: hub_resume
[   29.543834] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.543874] hub 3-0:1.0: hub_suspend
[   29.543881] usb usb3: bus auto-suspend, wakeup 1
[   29.550087] usb usb3: usb auto-resume
[   29.560645] hub 3-0:1.0: hub_resume
[   29.560713] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.560748] hub 3-0:1.0: hub_suspend
[   29.560755] usb usb3: bus auto-suspend, wakeup 1
[   29.560774] usb usb3: usb auto-resume
[   29.572638] hub 3-0:1.0: hub_resume
[   29.572717] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.572744] hub 3-0:1.0: hub_suspend
[   29.572756] usb usb3: bus auto-suspend, wakeup 1
[   29.585494] usb usb3: usb auto-resume
[   29.585517] hub 3-0:1.0: hub_resume
[   29.585565] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.585587] hub 3-0:1.0: hub_suspend
[   29.585608] usb usb3: bus auto-suspend, wakeup 1
[   29.585634] usb usb3: usb auto-resume
[   29.596649] hub 3-0:1.0: hub_resume
[   29.596690] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   29.596737] hub 3-0:1.0: hub_suspend
[   29.596743] usb usb3: bus auto-suspend, wakeup 1
[   30.626937] usb usb3: usb auto-resume
[   30.626960] hub 3-0:1.0: hub_resume
[   30.627029] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   30.627073] hub 3-0:1.0: hub_suspend
[   30.627080] usb usb3: bus auto-suspend, wakeup 1
[   30.935734] usb usb3: usb auto-resume
[   30.935757] hub 3-0:1.0: hub_resume
[   30.935826] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   30.935860] hub 3-0:1.0: hub_suspend
[   30.935866] usb usb3: bus auto-suspend, wakeup 1
[   30.958892] usb usb3: usb auto-resume
[   30.958916] hub 3-0:1.0: hub_resume
[   30.958986] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   30.959037] hub 3-0:1.0: hub_suspend
[   30.959044] usb usb3: bus auto-suspend, wakeup 1
[   30.962885] usb usb3: usb auto-resume
[   30.971630] hub 3-0:1.0: hub_resume
[   30.971709] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   30.971732] hub 3-0:1.0: hub_suspend
[   30.971740] usb usb3: bus auto-suspend, wakeup 1
[   30.971768] usb usb3: usb auto-resume
[   30.983665] hub 3-0:1.0: hub_resume
[   30.983768] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   30.983804] hub 3-0:1.0: hub_suspend
[   30.983813] usb usb3: bus auto-suspend, wakeup 1
[   30.988285] usb usb3: usb auto-resume
[   30.999687] hub 3-0:1.0: hub_resume
[   30.999728] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   30.999763] hub 3-0:1.0: hub_suspend
[   30.999771] usb usb3: bus auto-suspend, wakeup 1
[   30.999858] usb usb3: usb auto-resume
[   31.011588] hub 3-0:1.0: hub_resume
[   31.011630] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   31.011651] hub 3-0:1.0: hub_suspend
[   31.011660] usb usb3: bus auto-suspend, wakeup 1
[   31.053431] usb usb3: usb auto-resume
[   31.053457] hub 3-0:1.0: hub_resume
[   31.053503] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   31.053549] hub 3-0:1.0: hub_suspend
[   31.053559] usb usb3: bus auto-suspend, wakeup 1
[   31.053650] usb usb3: usb auto-resume
[   31.063643] hub 3-0:1.0: hub_resume
[   31.063697] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   31.063734] hub 3-0:1.0: hub_suspend
[   31.063744] usb usb3: bus auto-suspend, wakeup 1
[   31.069922] usb usb3: usb auto-resume
[   31.079636] hub 3-0:1.0: hub_resume
[   31.079723] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   31.079750] hub 3-0:1.0: hub_suspend
[   31.079759] usb usb3: bus auto-suspend, wakeup 1
[   31.079794] usb usb3: usb auto-resume
[   31.091604] hub 3-0:1.0: hub_resume
[   31.091703] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   31.091729] hub 3-0:1.0: hub_suspend
[   31.091738] usb usb3: bus auto-suspend, wakeup 1
[   31.220862] usb usb3: usb auto-resume
[   31.220884] hub 3-0:1.0: hub_resume
[   31.220917] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   31.220944] hub 3-0:1.0: hub_suspend
[   31.220950] usb usb3: bus auto-suspend, wakeup 1
[   31.221008] usb usb3: usb auto-resume
[   31.231484] hub 3-0:1.0: hub_resume
[   31.231532] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[   31.231565] hub 3-0:1.0: hub_suspend
[   31.231575] usb usb3: bus auto-suspend, wakeup 1
[   33.765922] usb 1-1.4: usb auto-suspend, wakeup 0
[   40.554766] EXT4-fs (sdc3): mounted filesystem with ordered data mode. Opts: (null)
[   40.888402] EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: (null)
[   48.795519] usb 2-1.5: unlink qh1-0e01/ffff880115df2440 start 0 [1/2 us]
[   48.876653] hub 2-1:1.0: state 7 ports 6 chg 0000 evt 0020
[   48.876884] hub 2-1:1.0: port 5, status 0100, change 0001, 12 Mb/s
[   48.876889] usb 2-1.5: USB disconnect, device number 3
[   48.876891] usb 2-1.5: unregistering device
[   48.876893] usb 2-1.5: unregistering interface 2-1.5:1.0
[   48.877366] usb 2-1.5: unregistering interface 2-1.5:1.1
[   48.877599] usb 2-1.5: usb_disable_device nuking all URBs
[   49.005964] hub 2-1:1.0: debounce: port 5: total 100ms stable 100ms status 0x100
[   49.005986] hub 2-1:1.0: hub_suspend
[   49.005993] usb 2-1: unlink qh256-0001/ffff880118776840 start 1 [1/0 us]
[   49.008320] usb 2-1: usb auto-suspend, wakeup 1
[   49.021780] hub 2-0:1.0: hub_suspend
[   49.021792] usb usb2: bus auto-suspend, wakeup 1
[   49.021796] ehci-pci 0000:00:1d.0: suspend root hub

[-- Attachment #3: config-3.11.0-rc3-1-aio-small --]
[-- Type: application/octet-stream, Size: 114641 bytes --]

#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.11.0-rc3 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_MMU=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_ARCH_HAS_CPU_AUTOPROBE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_ZONE_DMA32=y
CONFIG_AUDIT_ARCH=y
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_HAVE_INTEL_TXT=y
CONFIG_X86_64_SMP=y
CONFIG_X86_HT=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11"
CONFIG_ARCH_CPU_PROBE_RELEASE=y
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_EXTABLE_SORT=y

#
# General setup
#
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
# CONFIG_COMPILE_TEST is not set
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set
CONFIG_DEFAULT_HOSTNAME="(none)"
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
CONFIG_FHANDLE=y
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_WATCH=y
CONFIG_AUDIT_TREE=y
# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set
CONFIG_HAVE_GENERIC_HARDIRQS=y

#
# IRQ subsystem
#
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_IRQ_DOMAIN=y
# CONFIG_IRQ_DOMAIN_DEBUG is not set
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CMOS_UPDATE=y

#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
# CONFIG_NO_HZ is not set
CONFIG_HIGH_RES_TIMERS=y

#
# CPU/Task time and stats accounting
#
CONFIG_VIRT_CPU_ACCOUNTING=y
# CONFIG_TICK_CPU_ACCOUNTING is not set
CONFIG_VIRT_CPU_ACCOUNTING_GEN=y
# CONFIG_IRQ_TIME_ACCOUNTING is not set
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y

#
# RCU Subsystem
#
CONFIG_TREE_RCU=y
# CONFIG_PREEMPT_RCU is not set
CONFIG_RCU_STALL_COMMON=y
CONFIG_CONTEXT_TRACKING=y
CONFIG_RCU_USER_QS=y
CONFIG_CONTEXT_TRACKING_FORCE=y
CONFIG_RCU_FANOUT=64
CONFIG_RCU_FANOUT_LEAF=16
# CONFIG_RCU_FANOUT_EXACT is not set
# CONFIG_RCU_FAST_NO_HZ is not set
# CONFIG_TREE_RCU_TRACE is not set
CONFIG_RCU_NOCB_CPU=y
CONFIG_RCU_NOCB_CPU_NONE=y
# CONFIG_RCU_NOCB_CPU_ZERO is not set
# CONFIG_RCU_NOCB_CPU_ALL is not set
CONFIG_IKCONFIG=m
# CONFIG_IKCONFIG_PROC is not set
CONFIG_LOG_BUF_SHIFT=18
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_WANTS_PROT_NUMA_PROT_NONE=y
# CONFIG_NUMA_BALANCING is not set
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
CONFIG_PROC_PID_CPUSET=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_RESOURCE_COUNTERS=y
CONFIG_MEMCG=y
CONFIG_MEMCG_SWAP=y
# CONFIG_MEMCG_SWAP_ENABLED is not set
# CONFIG_MEMCG_KMEM is not set
CONFIG_CGROUP_HUGETLB=y
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_BLK_CGROUP=y
# CONFIG_DEBUG_BLK_CGROUP is not set
CONFIG_CHECKPOINT_RESTORE=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_MM_OWNER=y
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_XZ=y
CONFIG_RD_LZO=y
# CONFIG_RD_LZ4 is not set
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
CONFIG_HAVE_UID16=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_EXPERT=y
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_PCI_QUIRKS=y
# CONFIG_EMBEDDED is not set
CONFIG_HAVE_PERF_EVENTS=y

#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
CONFIG_VM_EVENT_COUNTERS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
CONFIG_PROFILING=y
CONFIG_TRACEPOINTS=y
# CONFIG_OPROFILE is not set
CONFIG_HAVE_OPROFILE=y
CONFIG_OPROFILE_NMI_TIMER=y
CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y
CONFIG_OPTPROBES=y
CONFIG_KPROBES_ON_FTRACE=y
CONFIG_UPROBES=y
# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
CONFIG_KRETPROBES=y
CONFIG_USER_RETURN_NOTIFIER=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_OPTPROBES=y
CONFIG_HAVE_KPROBES_ON_FTRACE=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_HW_BREAKPOINT=y
CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y
CONFIG_HAVE_USER_RETURN_NOTIFIER=y
CONFIG_HAVE_PERF_EVENTS_NMI=y
CONFIG_HAVE_PERF_REGS=y
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
CONFIG_HAVE_ARCH_JUMP_LABEL=y
CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
CONFIG_HAVE_CMPXCHG_LOCAL=y
CONFIG_HAVE_CMPXCHG_DOUBLE=y
CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y
CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_SECCOMP_FILTER=y
CONFIG_HAVE_CONTEXT_TRACKING=y
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
CONFIG_HAVE_ARCH_SOFT_DIRTY=y
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_OLD_SIGSUSPEND3=y
CONFIG_COMPAT_OLD_SIGACTION=y

#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_MODULE_SIG=y
# CONFIG_MODULE_SIG_FORCE is not set
CONFIG_MODULE_SIG_ALL=y
# CONFIG_MODULE_SIG_SHA1 is not set
# CONFIG_MODULE_SIG_SHA224 is not set
# CONFIG_MODULE_SIG_SHA256 is not set
# CONFIG_MODULE_SIG_SHA384 is not set
CONFIG_MODULE_SIG_SHA512=y
CONFIG_MODULE_SIG_HASH="sha512"
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
CONFIG_BLK_DEV_BSG=y
CONFIG_BLK_DEV_BSGLIB=y
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_BLK_DEV_THROTTLING=y

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
CONFIG_ACORN_PARTITION=y
# CONFIG_ACORN_PARTITION_CUMANA is not set
# CONFIG_ACORN_PARTITION_EESOX is not set
CONFIG_ACORN_PARTITION_ICS=y
# CONFIG_ACORN_PARTITION_ADFS is not set
# CONFIG_ACORN_PARTITION_POWERTEC is not set
CONFIG_ACORN_PARTITION_RISCIX=y
# CONFIG_AIX_PARTITION is not set
CONFIG_OSF_PARTITION=y
CONFIG_AMIGA_PARTITION=y
CONFIG_ATARI_PARTITION=y
CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
CONFIG_BSD_DISKLABEL=y
CONFIG_MINIX_SUBPARTITION=y
CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_UNIXWARE_DISKLABEL=y
CONFIG_LDM_PARTITION=y
# CONFIG_LDM_DEBUG is not set
CONFIG_SGI_PARTITION=y
CONFIG_ULTRIX_PARTITION=y
CONFIG_SUN_PARTITION=y
CONFIG_KARMA_PARTITION=y
CONFIG_EFI_PARTITION=y
CONFIG_SYSV68_PARTITION=y
CONFIG_BLOCK_COMPAT=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_CFQ_GROUP_IOSCHED=y
CONFIG_DEFAULT_DEADLINE=y
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="deadline"
CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_ASN1=y
CONFIG_UNINLINE_SPIN_UNLOCK=y
CONFIG_FREEZER=y

#
# Processor type and features
#
CONFIG_ZONE_DMA=y
CONFIG_SMP=y
CONFIG_X86_X2APIC=y
CONFIG_X86_MPPARSE=y
CONFIG_X86_EXTENDED_PLATFORM=y
CONFIG_X86_NUMACHIP=y
# CONFIG_X86_VSMP is not set
# CONFIG_X86_UV is not set
# CONFIG_X86_INTEL_LPSS is not set
CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_HYPERVISOR_GUEST=y
CONFIG_PARAVIRT=y
# CONFIG_PARAVIRT_DEBUG is not set
CONFIG_PARAVIRT_SPINLOCKS=y
CONFIG_XEN=y
CONFIG_XEN_DOM0=y
CONFIG_XEN_PRIVILEGED_GUEST=y
CONFIG_XEN_PVHVM=y
CONFIG_XEN_MAX_DOMAIN_MEMORY=500
CONFIG_XEN_SAVE_RESTORE=y
# CONFIG_XEN_DEBUG_FS is not set
CONFIG_KVM_GUEST=y
# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set
CONFIG_PARAVIRT_CLOCK=y
CONFIG_NO_BOOTMEM=y
CONFIG_MEMTEST=y
# CONFIG_MK8 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_MATOM is not set
CONFIG_GENERIC_CPU=y
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_TSC=y
CONFIG_X86_CMPXCHG64=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=64
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_PROCESSOR_SELECT=y
CONFIG_CPU_SUP_INTEL=y
CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_CENTAUR=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
CONFIG_DMI=y
CONFIG_GART_IOMMU=y
CONFIG_CALGARY_IOMMU=y
CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
CONFIG_SWIOTLB=y
CONFIG_IOMMU_HELPER=y
# CONFIG_MAXSMP is not set
CONFIG_NR_CPUS=256
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_INTEL=y
CONFIG_X86_MCE_AMD=y
CONFIG_X86_MCE_THRESHOLD=y
# CONFIG_X86_MCE_INJECT is not set
CONFIG_X86_THERMAL_VECTOR=y
# CONFIG_I8K is not set
CONFIG_MICROCODE=y
CONFIG_MICROCODE_INTEL=y
CONFIG_MICROCODE_AMD=y
CONFIG_MICROCODE_OLD_INTERFACE=y
CONFIG_MICROCODE_INTEL_LIB=y
CONFIG_MICROCODE_INTEL_EARLY=y
CONFIG_MICROCODE_AMD_EARLY=y
CONFIG_MICROCODE_EARLY=y
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
CONFIG_DIRECT_GBPAGES=y
CONFIG_NUMA=y
CONFIG_AMD_NUMA=y
CONFIG_X86_64_ACPI_NUMA=y
CONFIG_NODES_SPAN_OTHER_NODES=y
# CONFIG_NUMA_EMU is not set
CONFIG_NODES_SHIFT=6
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ARCH_MEMORY_PROBE=y
CONFIG_ARCH_PROC_KCORE_TEXT=y
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_SPARSEMEM_MANUAL=y
CONFIG_SPARSEMEM=y
CONFIG_NEED_MULTIPLE_NODES=y
CONFIG_HAVE_MEMORY_PRESENT=y
CONFIG_SPARSEMEM_EXTREME=y
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER=y
CONFIG_SPARSEMEM_VMEMMAP=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
CONFIG_ARCH_DISCARD_MEMBLOCK=y
CONFIG_MEMORY_ISOLATION=y
# CONFIG_MOVABLE_NODE is not set
CONFIG_HAVE_BOOTMEM_INFO_NODE=y
CONFIG_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTPLUG_SPARSE=y
CONFIG_MEMORY_HOTREMOVE=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=999999
CONFIG_COMPACTION=y
CONFIG_MIGRATION=y
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_NEED_BOUNCE_POOL=y
CONFIG_VIRT_TO_BUS=y
CONFIG_MMU_NOTIFIER=y
CONFIG_KSM=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
CONFIG_MEMORY_FAILURE=y
# CONFIG_HWPOISON_INJECT is not set
CONFIG_TRANSPARENT_HUGEPAGE=y
# CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not set
CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
CONFIG_CROSS_MEMORY_ATTACH=y
CONFIG_CLEANCACHE=y
CONFIG_FRONTSWAP=y
# CONFIG_ZBUD is not set
# CONFIG_ZSWAP is not set
# CONFIG_MEM_SOFT_DIRTY is not set
CONFIG_X86_CHECK_BIOS_CORRUPTION=y
CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
CONFIG_X86_RESERVE_LOW=64
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=1
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
CONFIG_X86_PAT=y
CONFIG_ARCH_USES_PG_UNCACHED=y
CONFIG_ARCH_RANDOM=y
CONFIG_X86_SMAP=y
CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_SECCOMP=y
CONFIG_CC_STACKPROTECTOR=y
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
CONFIG_SCHED_HRTICK=y
CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_KEXEC_JUMP=y
CONFIG_PHYSICAL_START=0x1000000
CONFIG_RELOCATABLE=y
CONFIG_PHYSICAL_ALIGN=0x1000000
CONFIG_HOTPLUG_CPU=y
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
# CONFIG_COMPAT_VDSO is not set
# CONFIG_CMDLINE_BOOL is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
CONFIG_USE_PERCPU_NUMA_NODE_ID=y

#
# Power management and ACPI options
#
CONFIG_ARCH_HIBERNATION_HEADER=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_HIBERNATE_CALLBACKS=y
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION=""
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
# CONFIG_PM_AUTOSLEEP is not set
# CONFIG_PM_WAKELOCKS is not set
CONFIG_PM_RUNTIME=y
CONFIG_PM=y
CONFIG_PM_DEBUG=y
# CONFIG_PM_ADVANCED_DEBUG is not set
# CONFIG_PM_TEST_SUSPEND is not set
CONFIG_PM_SLEEP_DEBUG=y
# CONFIG_PM_TRACE_RTC is not set
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
# CONFIG_ACPI_PROCFS is not set
# CONFIG_ACPI_PROCFS_POWER is not set
CONFIG_ACPI_EC_DEBUGFS=m
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_FAN=y
CONFIG_ACPI_DOCK=y
CONFIG_ACPI_I2C=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y
# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
CONFIG_ACPI_THERMAL=y
CONFIG_ACPI_NUMA=y
CONFIG_ACPI_CUSTOM_DSDT_FILE=""
# CONFIG_ACPI_CUSTOM_DSDT is not set
# CONFIG_ACPI_INITRD_TABLE_OVERRIDE is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
# CONFIG_ACPI_PCI_SLOT is not set
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=y
# CONFIG_ACPI_HOTPLUG_MEMORY is not set
# CONFIG_ACPI_SBS is not set
CONFIG_ACPI_HED=y
# CONFIG_ACPI_CUSTOM_METHOD is not set
CONFIG_ACPI_BGRT=y
CONFIG_ACPI_APEI=y
CONFIG_ACPI_APEI_GHES=y
CONFIG_ACPI_APEI_PCIEAER=y
CONFIG_ACPI_APEI_MEMORY_FAILURE=y
# CONFIG_ACPI_APEI_EINJ is not set
# CONFIG_ACPI_APEI_ERST_DEBUG is not set
CONFIG_SFI=y

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

#
# x86 CPU frequency scaling drivers
#
CONFIG_X86_INTEL_PSTATE=y
CONFIG_X86_PCC_CPUFREQ=y
CONFIG_X86_ACPI_CPUFREQ=y
CONFIG_X86_ACPI_CPUFREQ_CPB=y
CONFIG_X86_POWERNOW_K8=y
# CONFIG_X86_AMD_FREQ_SENSITIVITY is not set
CONFIG_X86_SPEEDSTEP_CENTRINO=y
# CONFIG_X86_P4_CLOCKMOD is not set

#
# shared options
#
# CONFIG_X86_SPEEDSTEP_LIB is not set
CONFIG_CPU_IDLE=y
# CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set
CONFIG_INTEL_IDLE=y

#
# Memory power savings
#
# CONFIG_I7300_IDLE is not set

#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCI_XEN=y
CONFIG_PCI_DOMAINS=y
# CONFIG_PCI_CNB20LE_QUIRK is not set
CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_PCIEAER=y
# CONFIG_PCIE_ECRC is not set
# CONFIG_PCIEAER_INJECT is not set
CONFIG_PCIEASPM=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM_DEFAULT=y
# CONFIG_PCIEASPM_POWERSAVE is not set
# CONFIG_PCIEASPM_PERFORMANCE is not set
CONFIG_PCIE_PME=y
CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y
# CONFIG_PCI_DEBUG is not set
CONFIG_PCI_REALLOC_ENABLE_AUTO=y
# CONFIG_PCI_STUB is not set
# CONFIG_XEN_PCIDEV_FRONTEND is not set
CONFIG_HT_IRQ=y
CONFIG_PCI_ATS=y
CONFIG_PCI_IOV=y
CONFIG_PCI_PRI=y
CONFIG_PCI_PASID=y
CONFIG_PCI_IOAPIC=y
CONFIG_PCI_LABEL=y

#
# PCI host controller drivers
#
CONFIG_ISA_DMA_API=y
CONFIG_AMD_NB=y
# CONFIG_PCCARD is not set
CONFIG_HOTPLUG_PCI=y
# CONFIG_HOTPLUG_PCI_ACPI is not set
CONFIG_HOTPLUG_PCI_CPCI=y
# CONFIG_HOTPLUG_PCI_CPCI_ZT5550 is not set
# CONFIG_HOTPLUG_PCI_CPCI_GENERIC is not set
# CONFIG_HOTPLUG_PCI_SHPC is not set
CONFIG_RAPIDIO=y
CONFIG_RAPIDIO_TSI721=y
CONFIG_RAPIDIO_DISC_TIMEOUT=30
# CONFIG_RAPIDIO_ENABLE_RX_TX_PORTS is not set
CONFIG_RAPIDIO_DMA_ENGINE=y
# CONFIG_RAPIDIO_DEBUG is not set
# CONFIG_RAPIDIO_ENUM_BASIC is not set

#
# RapidIO Switch drivers
#
CONFIG_RAPIDIO_TSI57X=y
CONFIG_RAPIDIO_CPS_XX=y
CONFIG_RAPIDIO_TSI568=y
CONFIG_RAPIDIO_CPS_GEN2=y

#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
CONFIG_COMPAT_BINFMT_ELF=y
CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_BINFMT_SCRIPT=y
# CONFIG_HAVE_AOUT is not set
# CONFIG_BINFMT_MISC is not set
CONFIG_COREDUMP=y
CONFIG_IA32_EMULATION=y
# CONFIG_IA32_AOUT is not set
CONFIG_X86_X32=y
CONFIG_COMPAT=y
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_KEYS_COMPAT=y
CONFIG_HAVE_TEXT_POKE_SMP=y
CONFIG_X86_DEV_DMA_OPS=y
CONFIG_NET=y
CONFIG_COMPAT_NETLINK_MESSAGES=y

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_DIAG is not set
CONFIG_UNIX=y
# CONFIG_UNIX_DIAG is not set
# CONFIG_XFRM_USER is not set
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_FIB_TRIE_STATS=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
# CONFIG_IP_PNP_BOOTP is not set
# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE_DEMUX is not set
# CONFIG_NET_IP_TUNNEL is not set
CONFIG_IP_MROUTE=y
# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
# CONFIG_ARPD is not set
CONFIG_SYN_COOKIES=y
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
CONFIG_INET_LRO=y
# CONFIG_INET_DIAG is not set
CONFIG_TCP_CONG_ADVANCED=y
# CONFIG_TCP_CONG_BIC is not set
CONFIG_TCP_CONG_CUBIC=y
# CONFIG_TCP_CONG_WESTWOOD is not set
# CONFIG_TCP_CONG_HTCP is not set
# CONFIG_TCP_CONG_HSTCP is not set
# CONFIG_TCP_CONG_HYBLA is not set
# CONFIG_TCP_CONG_VEGAS is not set
# CONFIG_TCP_CONG_SCALABLE is not set
# CONFIG_TCP_CONG_LP is not set
# CONFIG_TCP_CONG_VENO is not set
# CONFIG_TCP_CONG_YEAH is not set
# CONFIG_TCP_CONG_ILLINOIS is not set
CONFIG_DEFAULT_CUBIC=y
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_TCP_MD5SIG=y
CONFIG_IPV6=y
CONFIG_IPV6_PRIVACY=y
CONFIG_IPV6_ROUTER_PREF=y
CONFIG_IPV6_ROUTE_INFO=y
# CONFIG_IPV6_OPTIMISTIC_DAD is not set
# CONFIG_INET6_AH is not set
# CONFIG_INET6_ESP is not set
# CONFIG_INET6_IPCOMP is not set
# CONFIG_IPV6_MIP6 is not set
# CONFIG_INET6_XFRM_TUNNEL is not set
# CONFIG_INET6_TUNNEL is not set
# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
# CONFIG_INET6_XFRM_MODE_BEET is not set
# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
# CONFIG_IPV6_SIT is not set
# CONFIG_IPV6_TUNNEL is not set
# CONFIG_IPV6_GRE is not set
CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_IPV6_SUBTREES=y
CONFIG_IPV6_MROUTE=y
CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
CONFIG_IPV6_PIMSM_V2=y
CONFIG_NETLABEL=y
CONFIG_NETWORK_SECMARK=y
# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y

#
# Core Netfilter Configuration
#
# CONFIG_NETFILTER_NETLINK_ACCT is not set
# CONFIG_NETFILTER_NETLINK_QUEUE is not set
# CONFIG_NETFILTER_NETLINK_LOG is not set
# CONFIG_NF_CONNTRACK is not set
# CONFIG_NETFILTER_XTABLES is not set
# CONFIG_IP_VS is not set

#
# IP: Netfilter Configuration
#
# CONFIG_NF_DEFRAG_IPV4 is not set
# CONFIG_IP_NF_IPTABLES is not set
# CONFIG_IP_NF_ARPTABLES is not set

#
# IPv6: Netfilter Configuration
#
# CONFIG_NF_DEFRAG_IPV6 is not set
# CONFIG_IP6_NF_IPTABLES is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_L2TP is not set
# CONFIG_BRIDGE is not set
CONFIG_HAVE_NET_DSA=y
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_PHONET is not set
# CONFIG_IEEE802154 is not set
CONFIG_NET_SCHED=y

#
# Queueing/Scheduling
#
# CONFIG_NET_SCH_CBQ is not set
CONFIG_NET_SCH_HTB=m
# CONFIG_NET_SCH_HFSC is not set
# CONFIG_NET_SCH_PRIO is not set
# CONFIG_NET_SCH_MULTIQ is not set
# CONFIG_NET_SCH_RED is not set
# CONFIG_NET_SCH_SFB is not set
# CONFIG_NET_SCH_SFQ is not set
# CONFIG_NET_SCH_TEQL is not set
# CONFIG_NET_SCH_TBF is not set
# CONFIG_NET_SCH_GRED is not set
# CONFIG_NET_SCH_DSMARK is not set
# CONFIG_NET_SCH_NETEM is not set
# CONFIG_NET_SCH_DRR is not set
# CONFIG_NET_SCH_MQPRIO is not set
# CONFIG_NET_SCH_CHOKE is not set
# CONFIG_NET_SCH_QFQ is not set
CONFIG_NET_SCH_CODEL=m
CONFIG_NET_SCH_FQ_CODEL=m
# CONFIG_NET_SCH_INGRESS is not set
# CONFIG_NET_SCH_PLUG is not set

#
# Classification
#
CONFIG_NET_CLS=y
# CONFIG_NET_CLS_BASIC is not set
# CONFIG_NET_CLS_TCINDEX is not set
# CONFIG_NET_CLS_ROUTE4 is not set
# CONFIG_NET_CLS_FW is not set
# CONFIG_NET_CLS_U32 is not set
# CONFIG_NET_CLS_RSVP is not set
# CONFIG_NET_CLS_RSVP6 is not set
# CONFIG_NET_CLS_FLOW is not set
# CONFIG_NET_CLS_CGROUP is not set
CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_STACK=32
# CONFIG_NET_EMATCH_CMP is not set
# CONFIG_NET_EMATCH_NBYTE is not set
# CONFIG_NET_EMATCH_U32 is not set
# CONFIG_NET_EMATCH_META is not set
# CONFIG_NET_EMATCH_TEXT is not set
CONFIG_NET_CLS_ACT=y
# CONFIG_NET_ACT_POLICE is not set
# CONFIG_NET_ACT_GACT is not set
# CONFIG_NET_ACT_MIRRED is not set
# CONFIG_NET_ACT_NAT is not set
# CONFIG_NET_ACT_PEDIT is not set
# CONFIG_NET_ACT_SIMP is not set
# CONFIG_NET_ACT_SKBEDIT is not set
# CONFIG_NET_ACT_CSUM is not set
CONFIG_NET_SCH_FIFO=y
CONFIG_DCB=y
CONFIG_DNS_RESOLVER=y
# CONFIG_BATMAN_ADV is not set
# CONFIG_OPENVSWITCH is not set
# CONFIG_VSOCKETS is not set
# CONFIG_NETLINK_MMAP is not set
# CONFIG_NETLINK_DIAG is not set
# CONFIG_NET_MPLS_GSO is not set
CONFIG_RPS=y
CONFIG_RFS_ACCEL=y
CONFIG_XPS=y
# CONFIG_NETPRIO_CGROUP is not set
CONFIG_NET_LL_RX_POLL=y
CONFIG_BQL=y
CONFIG_BPF_JIT=y
CONFIG_NET_FLOW_LIMIT=y

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NET_TCPPROBE is not set
# CONFIG_NET_DROP_MONITOR is not set
CONFIG_HAMRADIO=y

#
# Packet Radio protocols
#
# CONFIG_AX25 is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
CONFIG_BT=m
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=m
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
# CONFIG_BT_HIDP is not set

#
# Bluetooth device drivers
#
CONFIG_BT_HCIBTUSB=m
# CONFIG_BT_HCIBTSDIO is not set
# CONFIG_BT_HCIUART is not set
# CONFIG_BT_HCIBCM203X is not set
# CONFIG_BT_HCIBPA10X is not set
# CONFIG_BT_HCIBFUSB is not set
# CONFIG_BT_HCIVHCI is not set
# CONFIG_BT_MRVL is not set
# CONFIG_BT_ATH3K is not set
# CONFIG_AF_RXRPC is not set
CONFIG_FIB_RULES=y
CONFIG_WIRELESS=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_CFG80211=m
CONFIG_NL80211_TESTMODE=y
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_REG_DEBUG is not set
# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
CONFIG_CFG80211_DEFAULT_PS=y
CONFIG_CFG80211_DEBUGFS=y
# CONFIG_CFG80211_INTERNAL_REGDB is not set
CONFIG_CFG80211_WEXT=y
# CONFIG_LIB80211 is not set
CONFIG_MAC80211=m
CONFIG_MAC80211_HAS_RC=y
CONFIG_MAC80211_RC_PID=y
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_MINSTREL_HT=y
# CONFIG_MAC80211_RC_DEFAULT_PID is not set
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
CONFIG_MAC80211_MESH=y
CONFIG_MAC80211_LEDS=y
CONFIG_MAC80211_DEBUGFS=y
# CONFIG_MAC80211_MESSAGE_TRACING is not set
# CONFIG_MAC80211_DEBUG_MENU is not set
# CONFIG_WIMAX is not set
CONFIG_RFKILL=y
CONFIG_RFKILL_LEDS=y
CONFIG_RFKILL_INPUT=y
# CONFIG_RFKILL_REGULATOR is not set
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
# CONFIG_NFC is not set
CONFIG_HAVE_BPF_JIT=y

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_STANDALONE is not set
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
CONFIG_FW_LOADER_USER_HELPER=y
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
CONFIG_SYS_HYPERVISOR=y
# CONFIG_GENERIC_CPU_DEVICES is not set
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=y
CONFIG_REGMAP_SPI=y
CONFIG_REGMAP_IRQ=y
CONFIG_DMA_SHARED_BUFFER=y

#
# Bus devices
#
CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y
# CONFIG_MTD is not set
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
# CONFIG_PARPORT_SERIAL is not set
CONFIG_PARPORT_PC_FIFO=y
# CONFIG_PARPORT_PC_SUPERIO is not set
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_AX88796 is not set
CONFIG_PARPORT_1284=y
CONFIG_PNP=y
# CONFIG_PNP_DEBUG_MESSAGES is not set

#
# Protocols
#
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_FD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_BLK_DEV_DRBD is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_NVME is not set
# CONFIG_BLK_DEV_SX8 is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=65536
# CONFIG_BLK_DEV_XIP is not set
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set
CONFIG_XEN_BLKDEV_FRONTEND=y
# CONFIG_XEN_BLKDEV_BACKEND is not set
CONFIG_VIRTIO_BLK=y
# CONFIG_BLK_DEV_HD is not set
# CONFIG_BLK_DEV_RBD is not set
# CONFIG_BLK_DEV_RSXX is not set

#
# Misc devices
#
# CONFIG_SENSORS_LIS3LV02D is not set
# CONFIG_AD525X_DPOT is not set
# CONFIG_DUMMY_IRQ is not set
# CONFIG_IBM_ASM is not set
# CONFIG_PHANTOM is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_ICS932S401 is not set
# CONFIG_ATMEL_SSC is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_HP_ILO is not set
# CONFIG_APDS9802ALS is not set
# CONFIG_ISL29003 is not set
# CONFIG_ISL29020 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_SENSORS_BH1780 is not set
# CONFIG_SENSORS_BH1770 is not set
# CONFIG_SENSORS_APDS990X is not set
# CONFIG_HMC6352 is not set
# CONFIG_DS1682 is not set
# CONFIG_TI_DAC7512 is not set
# CONFIG_VMWARE_BALLOON is not set
# CONFIG_BMP085_I2C is not set
# CONFIG_BMP085_SPI is not set
# CONFIG_PCH_PHUB is not set
# CONFIG_USB_SWITCH_FSA9480 is not set
# CONFIG_LATTICE_ECP3_CONFIG is not set
# CONFIG_SRAM is not set
# CONFIG_C2PORT is not set

#
# EEPROM support
#
# CONFIG_EEPROM_AT24 is not set
# CONFIG_EEPROM_AT25 is not set
# CONFIG_EEPROM_LEGACY is not set
# CONFIG_EEPROM_MAX6875 is not set
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_EEPROM_93XX46 is not set
# CONFIG_CB710_CORE is not set

#
# Texas Instruments shared transport line discipline
#
# CONFIG_TI_ST is not set
# CONFIG_SENSORS_LIS3_I2C is not set

#
# Altera FPGA firmware download module
#
# CONFIG_ALTERA_STAPL is not set
CONFIG_INTEL_MEI=y
CONFIG_INTEL_MEI_ME=y
# CONFIG_VMWARE_VMCI is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set

#
# SCSI device support
#
CONFIG_SCSI_MOD=y
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
# CONFIG_SCSI_NETLINK is not set
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
CONFIG_BLK_DEV_SR=y
# CONFIG_BLK_DEV_SR_VENDOR is not set
CONFIG_CHR_DEV_SG=y
# CONFIG_CHR_DEV_SCH is not set
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SCAN_ASYNC=y

#
# SCSI Transports
#
CONFIG_SCSI_SPI_ATTRS=y
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_ISCSI_BOOT_SYSFS is not set
# CONFIG_SCSI_CXGB3_ISCSI is not set
# CONFIG_SCSI_CXGB4_ISCSI is not set
# CONFIG_SCSI_BNX2_ISCSI is not set
# CONFIG_SCSI_BNX2X_FCOE is not set
# CONFIG_BE2ISCSI is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_HPSA is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_3W_SAS is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_MVSAS is not set
# CONFIG_SCSI_MVUMI is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_ARCMSR is not set
CONFIG_MEGARAID_NEWGEN=y
# CONFIG_MEGARAID_MM is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_MPT2SAS is not set
# CONFIG_SCSI_MPT3SAS is not set
# CONFIG_SCSI_UFSHCD is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_VMWARE_PVSCSI is not set
# CONFIG_LIBFC is not set
# CONFIG_LIBFCOE is not set
# CONFIG_FCOE is not set
# CONFIG_FCOE_FNIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_ISCI is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_PMCRAID is not set
# CONFIG_SCSI_PM8001 is not set
# CONFIG_SCSI_SRP is not set
# CONFIG_SCSI_BFA_FC is not set
# CONFIG_SCSI_VIRTIO is not set
# CONFIG_SCSI_CHELSIO_FCOE is not set
# CONFIG_SCSI_DH is not set
# CONFIG_SCSI_OSD_INITIATOR is not set
CONFIG_ATA=y
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_ATA_ACPI=y
# CONFIG_SATA_ZPODD is not set
CONFIG_SATA_PMP=y

#
# Controllers with non-SFF native interface
#
CONFIG_SATA_AHCI=y
# CONFIG_SATA_AHCI_PLATFORM is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_SATA_ACARD_AHCI is not set
# CONFIG_SATA_SIL24 is not set
CONFIG_ATA_SFF=y

#
# SFF controllers with custom DMA interface
#
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_SX4 is not set
CONFIG_ATA_BMDMA=y

#
# SATA SFF controllers with BMDMA
#
CONFIG_ATA_PIIX=y
# CONFIG_SATA_HIGHBANK is not set
# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_RCAR is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_SVW is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set

#
# PATA SFF controllers with BMDMA
#
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARASAN_CF is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_ATP867X is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CS5536 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RDC is not set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SCH is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_SIL680 is not set
CONFIG_PATA_SIS=y
# CONFIG_PATA_TOSHIBA is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set

#
# PIO-only SFF controllers
#
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_PLATFORM is not set
# CONFIG_PATA_RZ1000 is not set

#
# Generic fallback / legacy drivers
#
CONFIG_PATA_ACPI=y
CONFIG_ATA_GENERIC=y
# CONFIG_PATA_LEGACY is not set
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_AUTODETECT=y
# CONFIG_MD_LINEAR is not set
# CONFIG_MD_RAID0 is not set
# CONFIG_MD_RAID1 is not set
# CONFIG_MD_RAID10 is not set
# CONFIG_MD_RAID456 is not set
# CONFIG_MD_MULTIPATH is not set
# CONFIG_MD_FAULTY is not set
# CONFIG_BCACHE is not set
CONFIG_BLK_DEV_DM=y
# CONFIG_DM_DEBUG is not set
# CONFIG_DM_CRYPT is not set
# CONFIG_DM_SNAPSHOT is not set
# CONFIG_DM_THIN_PROVISIONING is not set
# CONFIG_DM_CACHE is not set
# CONFIG_DM_MIRROR is not set
# CONFIG_DM_RAID is not set
# CONFIG_DM_ZERO is not set
# CONFIG_DM_MULTIPATH is not set
# CONFIG_DM_DELAY is not set
CONFIG_DM_UEVENT=y
# CONFIG_DM_FLAKEY is not set
# CONFIG_DM_VERITY is not set
# CONFIG_DM_SWITCH is not set
# CONFIG_TARGET_CORE is not set
CONFIG_FUSION=y
# CONFIG_FUSION_SPI is not set
# CONFIG_FUSION_FC is not set
# CONFIG_FUSION_SAS is not set
CONFIG_FUSION_MAX_SGE=128
CONFIG_FUSION_LOGGING=y

#
# IEEE 1394 (FireWire) support
#
# CONFIG_FIREWIRE is not set
# CONFIG_FIREWIRE_NOSY is not set
# CONFIG_I2O is not set
CONFIG_MACINTOSH_DRIVERS=y
CONFIG_MAC_EMUMOUSEBTN=m
CONFIG_NETDEVICES=y
CONFIG_MII=m
CONFIG_NET_CORE=y
# CONFIG_BONDING is not set
# CONFIG_DUMMY is not set
# CONFIG_EQUALIZER is not set
CONFIG_NET_FC=y
# CONFIG_IFB is not set
# CONFIG_NET_TEAM is not set
# CONFIG_MACVLAN is not set
# CONFIG_VXLAN is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_RIONET is not set
CONFIG_TUN=y
# CONFIG_VETH is not set
CONFIG_VIRTIO_NET=y
# CONFIG_NLMON is not set
# CONFIG_ARCNET is not set

#
# CAIF transport drivers
#
# CONFIG_VHOST_NET is not set

#
# Distributed Switch Architecture drivers
#
# CONFIG_NET_DSA_MV88E6XXX is not set
# CONFIG_NET_DSA_MV88E6060 is not set
# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set
# CONFIG_NET_DSA_MV88E6131 is not set
# CONFIG_NET_DSA_MV88E6123_61_65 is not set
CONFIG_ETHERNET=y
CONFIG_NET_VENDOR_3COM=y
# CONFIG_VORTEX is not set
# CONFIG_TYPHOON is not set
CONFIG_NET_VENDOR_ADAPTEC=y
# CONFIG_ADAPTEC_STARFIRE is not set
CONFIG_NET_VENDOR_ALTEON=y
# CONFIG_ACENIC is not set
CONFIG_NET_VENDOR_AMD=y
# CONFIG_AMD8111_ETH is not set
# CONFIG_PCNET32 is not set
CONFIG_NET_VENDOR_ARC=y
CONFIG_NET_VENDOR_ATHEROS=y
# CONFIG_ATL2 is not set
# CONFIG_ATL1 is not set
# CONFIG_ATL1E is not set
# CONFIG_ATL1C is not set
# CONFIG_ALX is not set
CONFIG_NET_CADENCE=y
# CONFIG_ARM_AT91_ETHER is not set
# CONFIG_MACB is not set
CONFIG_NET_VENDOR_BROADCOM=y
# CONFIG_B44 is not set
# CONFIG_BNX2 is not set
# CONFIG_CNIC is not set
# CONFIG_TIGON3 is not set
# CONFIG_BNX2X is not set
CONFIG_NET_VENDOR_BROCADE=y
# CONFIG_BNA is not set
# CONFIG_NET_CALXEDA_XGMAC is not set
CONFIG_NET_VENDOR_CHELSIO=y
# CONFIG_CHELSIO_T1 is not set
# CONFIG_CHELSIO_T3 is not set
# CONFIG_CHELSIO_T4 is not set
# CONFIG_CHELSIO_T4VF is not set
CONFIG_NET_VENDOR_CISCO=y
# CONFIG_ENIC is not set
# CONFIG_DNET is not set
CONFIG_NET_VENDOR_DEC=y
CONFIG_NET_TULIP=y
# CONFIG_DE2104X is not set
# CONFIG_TULIP is not set
# CONFIG_DE4X5 is not set
# CONFIG_WINBOND_840 is not set
# CONFIG_DM9102 is not set
# CONFIG_ULI526X is not set
CONFIG_NET_VENDOR_DLINK=y
# CONFIG_DL2K is not set
# CONFIG_SUNDANCE is not set
CONFIG_NET_VENDOR_EMULEX=y
# CONFIG_BE2NET is not set
CONFIG_NET_VENDOR_EXAR=y
# CONFIG_S2IO is not set
# CONFIG_VXGE is not set
CONFIG_NET_VENDOR_HP=y
# CONFIG_HP100 is not set
CONFIG_NET_VENDOR_INTEL=y
# CONFIG_E100 is not set
# CONFIG_E1000 is not set
# CONFIG_E1000E is not set
# CONFIG_IGB is not set
# CONFIG_IGBVF is not set
# CONFIG_IXGB is not set
# CONFIG_IXGBE is not set
# CONFIG_IXGBEVF is not set
CONFIG_NET_VENDOR_I825XX=y
# CONFIG_IP1000 is not set
# CONFIG_JME is not set
CONFIG_NET_VENDOR_MARVELL=y
# CONFIG_MVMDIO is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
CONFIG_NET_VENDOR_MELLANOX=y
# CONFIG_MLX4_EN is not set
# CONFIG_MLX4_CORE is not set
# CONFIG_MLX5_CORE is not set
CONFIG_NET_VENDOR_MICREL=y
# CONFIG_KS8842 is not set
# CONFIG_KS8851 is not set
# CONFIG_KS8851_MLL is not set
# CONFIG_KSZ884X_PCI is not set
CONFIG_NET_VENDOR_MICROCHIP=y
# CONFIG_ENC28J60 is not set
CONFIG_NET_VENDOR_MYRI=y
# CONFIG_MYRI10GE is not set
# CONFIG_FEALNX is not set
CONFIG_NET_VENDOR_NATSEMI=y
# CONFIG_NATSEMI is not set
# CONFIG_NS83820 is not set
CONFIG_NET_VENDOR_8390=y
# CONFIG_NE2K_PCI is not set
CONFIG_NET_VENDOR_NVIDIA=y
# CONFIG_FORCEDETH is not set
CONFIG_NET_VENDOR_OKI=y
# CONFIG_PCH_GBE is not set
# CONFIG_ETHOC is not set
CONFIG_NET_PACKET_ENGINE=y
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
CONFIG_NET_VENDOR_QLOGIC=y
# CONFIG_QLA3XXX is not set
# CONFIG_QLCNIC is not set
# CONFIG_QLGE is not set
# CONFIG_NETXEN_NIC is not set
CONFIG_NET_VENDOR_REALTEK=y
# CONFIG_ATP is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
CONFIG_R8169=m
# CONFIG_SH_ETH is not set
CONFIG_NET_VENDOR_RDC=y
# CONFIG_R6040 is not set
CONFIG_NET_VENDOR_SEEQ=y
CONFIG_NET_VENDOR_SILAN=y
# CONFIG_SC92031 is not set
CONFIG_NET_VENDOR_SIS=y
# CONFIG_SIS900 is not set
# CONFIG_SIS190 is not set
# CONFIG_SFC is not set
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_EPIC100 is not set
# CONFIG_SMSC911X is not set
# CONFIG_SMSC9420 is not set
CONFIG_NET_VENDOR_STMICRO=y
# CONFIG_STMMAC_ETH is not set
CONFIG_NET_VENDOR_SUN=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NIU is not set
CONFIG_NET_VENDOR_TEHUTI=y
# CONFIG_TEHUTI is not set
CONFIG_NET_VENDOR_TI=y
# CONFIG_TLAN is not set
CONFIG_NET_VENDOR_VIA=y
# CONFIG_VIA_RHINE is not set
# CONFIG_VIA_VELOCITY is not set
CONFIG_NET_VENDOR_WIZNET=y
# CONFIG_WIZNET_W5100 is not set
# CONFIG_WIZNET_W5300 is not set
CONFIG_FDDI=y
# CONFIG_DEFXX is not set
# CONFIG_SKFP is not set
# CONFIG_HIPPI is not set
# CONFIG_NET_SB1000 is not set
CONFIG_PHYLIB=y

#
# MII PHY device drivers
#
CONFIG_AT803X_PHY=y
CONFIG_AMD_PHY=y
CONFIG_MARVELL_PHY=y
CONFIG_DAVICOM_PHY=y
CONFIG_QSEMI_PHY=y
CONFIG_LXT_PHY=y
CONFIG_CICADA_PHY=y
CONFIG_VITESSE_PHY=y
CONFIG_SMSC_PHY=y
CONFIG_BROADCOM_PHY=y
CONFIG_BCM87XX_PHY=y
CONFIG_ICPLUS_PHY=y
CONFIG_REALTEK_PHY=y
CONFIG_NATIONAL_PHY=y
CONFIG_STE10XP=y
CONFIG_LSI_ET1011C_PHY=y
CONFIG_MICREL_PHY=y
CONFIG_FIXED_PHY=y
CONFIG_MDIO_BITBANG=y
CONFIG_MDIO_GPIO=y
# CONFIG_MICREL_KS8995MA is not set
# CONFIG_PLIP is not set
CONFIG_PPP=y
# CONFIG_PPP_BSDCOMP is not set
# CONFIG_PPP_DEFLATE is not set
CONFIG_PPP_FILTER=y
# CONFIG_PPP_MPPE is not set
CONFIG_PPP_MULTILINK=y
# CONFIG_PPPOE is not set
# CONFIG_PPP_ASYNC is not set
# CONFIG_PPP_SYNC_TTY is not set
# CONFIG_SLIP is not set
CONFIG_SLHC=y

#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_RTL8152 is not set
# CONFIG_USB_USBNET is not set
# CONFIG_USB_HSO is not set
# CONFIG_USB_IPHETH is not set
CONFIG_WLAN=y
# CONFIG_LIBERTAS_THINFIRM is not set
# CONFIG_AIRO is not set
# CONFIG_ATMEL is not set
# CONFIG_AT76C50X_USB is not set
# CONFIG_PRISM54 is not set
# CONFIG_USB_ZD1201 is not set
# CONFIG_USB_NET_RNDIS_WLAN is not set
# CONFIG_RTL8180 is not set
# CONFIG_RTL8187 is not set
# CONFIG_ADM8211 is not set
# CONFIG_MAC80211_HWSIM is not set
# CONFIG_MWL8K is not set
# CONFIG_ATH_CARDS is not set
# CONFIG_B43 is not set
# CONFIG_B43LEGACY is not set
# CONFIG_BRCMFMAC is not set
# CONFIG_HOSTAP is not set
# CONFIG_IPW2100 is not set
# CONFIG_IPW2200 is not set
CONFIG_IWLWIFI=m
CONFIG_IWLDVM=m
# CONFIG_IWLMVM is not set
CONFIG_IWLWIFI_OPMODE_MODULAR=y

#
# Debugging Options
#
CONFIG_IWLWIFI_DEBUG=y
CONFIG_IWLWIFI_DEBUGFS=y
# CONFIG_IWLWIFI_DEBUG_EXPERIMENTAL_UCODE is not set
CONFIG_IWLWIFI_DEVICE_TRACING=y
# CONFIG_IWLWIFI_P2P is not set
# CONFIG_IWL4965 is not set
# CONFIG_IWL3945 is not set
# CONFIG_LIBERTAS is not set
# CONFIG_HERMES is not set
# CONFIG_P54_COMMON is not set
# CONFIG_RT2X00 is not set
# CONFIG_RTLWIFI is not set
CONFIG_WL_TI=y
# CONFIG_WL1251 is not set
# CONFIG_WL12XX is not set
# CONFIG_WL18XX is not set
# CONFIG_WLCORE is not set
# CONFIG_ZD1211RW is not set
# CONFIG_MWIFIEX is not set
# CONFIG_CW1200 is not set

#
# Enable WiMAX (Networking options) to see the WiMAX drivers
#
CONFIG_WAN=y
# CONFIG_HDLC is not set
# CONFIG_DLCI is not set
# CONFIG_SBNI is not set
CONFIG_XEN_NETDEV_FRONTEND=y
# CONFIG_XEN_NETDEV_BACKEND is not set
# CONFIG_VMXNET3 is not set
CONFIG_ISDN=y
# CONFIG_ISDN_I4L is not set
# CONFIG_ISDN_CAPI is not set
# CONFIG_ISDN_DRV_GIGASET is not set
# CONFIG_HYSDN is not set
# CONFIG_MISDN is not set

#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set
# CONFIG_INPUT_SPARSEKMAP is not set
# CONFIG_INPUT_MATRIXKMAP is not set

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_ADP5520 is not set
# CONFIG_KEYBOARD_ADP5588 is not set
# CONFIG_KEYBOARD_ADP5589 is not set
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_QT1070 is not set
# CONFIG_KEYBOARD_QT2160 is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_GPIO is not set
# CONFIG_KEYBOARD_GPIO_POLLED is not set
# CONFIG_KEYBOARD_TCA6416 is not set
# CONFIG_KEYBOARD_TCA8418 is not set
# CONFIG_KEYBOARD_MATRIX is not set
# CONFIG_KEYBOARD_LM8323 is not set
# CONFIG_KEYBOARD_LM8333 is not set
# CONFIG_KEYBOARD_MAX7359 is not set
# CONFIG_KEYBOARD_MCS is not set
# CONFIG_KEYBOARD_MPR121 is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_OPENCORES is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_STMPE is not set
# CONFIG_KEYBOARD_TC3589X is not set
# CONFIG_KEYBOARD_XTKBD is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=m
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_CYPRESS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
CONFIG_MOUSE_PS2_ELANTECH=y
CONFIG_MOUSE_PS2_SENTELIC=y
CONFIG_MOUSE_PS2_TOUCHKIT=y
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_BCM5974 is not set
# CONFIG_MOUSE_CYAPA is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_MOUSE_GPIO is not set
# CONFIG_MOUSE_SYNAPTICS_I2C is not set
# CONFIG_MOUSE_SYNAPTICS_USB is not set
CONFIG_INPUT_JOYSTICK=y
# CONFIG_JOYSTICK_ANALOG is not set
# CONFIG_JOYSTICK_A3D is not set
# CONFIG_JOYSTICK_ADI is not set
# CONFIG_JOYSTICK_COBRA is not set
# CONFIG_JOYSTICK_GF2K is not set
# CONFIG_JOYSTICK_GRIP is not set
# CONFIG_JOYSTICK_GRIP_MP is not set
# CONFIG_JOYSTICK_GUILLEMOT is not set
# CONFIG_JOYSTICK_INTERACT is not set
# CONFIG_JOYSTICK_SIDEWINDER is not set
# CONFIG_JOYSTICK_TMDC is not set
# CONFIG_JOYSTICK_IFORCE is not set
# CONFIG_JOYSTICK_WARRIOR is not set
# CONFIG_JOYSTICK_MAGELLAN is not set
# CONFIG_JOYSTICK_SPACEORB is not set
# CONFIG_JOYSTICK_SPACEBALL is not set
# CONFIG_JOYSTICK_STINGER is not set
# CONFIG_JOYSTICK_TWIDJOY is not set
# CONFIG_JOYSTICK_ZHENHUA is not set
# CONFIG_JOYSTICK_DB9 is not set
# CONFIG_JOYSTICK_GAMECON is not set
# CONFIG_JOYSTICK_TURBOGRAFX is not set
# CONFIG_JOYSTICK_AS5011 is not set
# CONFIG_JOYSTICK_JOYDUMP is not set
# CONFIG_JOYSTICK_XPAD is not set
# CONFIG_JOYSTICK_WALKERA0701 is not set
CONFIG_INPUT_TABLET=y
# CONFIG_TABLET_USB_ACECAD is not set
# CONFIG_TABLET_USB_AIPTEK is not set
# CONFIG_TABLET_USB_GTCO is not set
# CONFIG_TABLET_USB_HANWANG is not set
# CONFIG_TABLET_USB_KBTAB is not set
# CONFIG_TABLET_USB_WACOM is not set
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_88PM860X is not set
# CONFIG_TOUCHSCREEN_ADS7846 is not set
# CONFIG_TOUCHSCREEN_AD7877 is not set
# CONFIG_TOUCHSCREEN_AD7879 is not set
# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set
# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set
# CONFIG_TOUCHSCREEN_BU21013 is not set
# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set
# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set
# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set
# CONFIG_TOUCHSCREEN_DA9034 is not set
# CONFIG_TOUCHSCREEN_DA9052 is not set
# CONFIG_TOUCHSCREEN_DYNAPRO is not set
# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
# CONFIG_TOUCHSCREEN_EETI is not set
# CONFIG_TOUCHSCREEN_FUJITSU is not set
# CONFIG_TOUCHSCREEN_ILI210X is not set
# CONFIG_TOUCHSCREEN_GUNZE is not set
# CONFIG_TOUCHSCREEN_ELO is not set
# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
# CONFIG_TOUCHSCREEN_WACOM_I2C is not set
# CONFIG_TOUCHSCREEN_MAX11801 is not set
# CONFIG_TOUCHSCREEN_MCS5000 is not set
# CONFIG_TOUCHSCREEN_MMS114 is not set
# CONFIG_TOUCHSCREEN_MTOUCH is not set
# CONFIG_TOUCHSCREEN_INEXIO is not set
# CONFIG_TOUCHSCREEN_MK712 is not set
# CONFIG_TOUCHSCREEN_PENMOUNT is not set
# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set
# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
# CONFIG_TOUCHSCREEN_PIXCIR is not set
# CONFIG_TOUCHSCREEN_WM831X is not set
# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
# CONFIG_TOUCHSCREEN_TSC_SERIO is not set
# CONFIG_TOUCHSCREEN_TSC2005 is not set
# CONFIG_TOUCHSCREEN_TSC2007 is not set
# CONFIG_TOUCHSCREEN_PCAP is not set
# CONFIG_TOUCHSCREEN_ST1232 is not set
# CONFIG_TOUCHSCREEN_STMPE is not set
# CONFIG_TOUCHSCREEN_TPS6507X is not set
CONFIG_INPUT_MISC=y
# CONFIG_INPUT_88PM860X_ONKEY is not set
# CONFIG_INPUT_AD714X is not set
# CONFIG_INPUT_BMA150 is not set
# CONFIG_INPUT_PCSPKR is not set
# CONFIG_INPUT_MAX8925_ONKEY is not set
# CONFIG_INPUT_MMA8450 is not set
# CONFIG_INPUT_MPU3050 is not set
# CONFIG_INPUT_APANEL is not set
# CONFIG_INPUT_GP2A is not set
# CONFIG_INPUT_GPIO_TILT_POLLED is not set
# CONFIG_INPUT_ATLAS_BTNS is not set
# CONFIG_INPUT_ATI_REMOTE2 is not set
# CONFIG_INPUT_KEYSPAN_REMOTE is not set
# CONFIG_INPUT_KXTJ9 is not set
# CONFIG_INPUT_POWERMATE is not set
# CONFIG_INPUT_YEALINK is not set
# CONFIG_INPUT_CM109 is not set
# CONFIG_INPUT_TWL6040_VIBRA is not set
CONFIG_INPUT_UINPUT=y
# CONFIG_INPUT_PCF8574 is not set
# CONFIG_INPUT_PWM_BEEPER is not set
# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
# CONFIG_INPUT_DA9052_ONKEY is not set
# CONFIG_INPUT_DA9055_ONKEY is not set
# CONFIG_INPUT_WM831X_ON is not set
# CONFIG_INPUT_PCAP is not set
# CONFIG_INPUT_ADXL34X is not set
# CONFIG_INPUT_IMS_PCU is not set
# CONFIG_INPUT_CMA3000 is not set
# CONFIG_INPUT_XEN_KBDDEV_FRONTEND is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
CONFIG_SERIO_RAW=m
# CONFIG_SERIO_ALTERA_PS2 is not set
# CONFIG_SERIO_PS2MULT is not set
# CONFIG_SERIO_ARC_PS2 is not set
# CONFIG_GAMEPORT is not set

#
# Character devices
#
CONFIG_TTY=y
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_VT_CONSOLE_SLEEP=y
CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
CONFIG_UNIX98_PTYS=y
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=0
CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_ROCKETPORT is not set
# CONFIG_CYCLADES is not set
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
# CONFIG_SYNCLINK is not set
# CONFIG_SYNCLINKMP is not set
# CONFIG_SYNCLINK_GT is not set
# CONFIG_NOZOMI is not set
# CONFIG_ISI is not set
# CONFIG_N_HDLC is not set
# CONFIG_N_GSM is not set
# CONFIG_TRACE_SINK is not set
# CONFIG_DEVKMEM is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_DMA=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_NR_UARTS=48
CONFIG_SERIAL_8250_RUNTIME_UARTS=32
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
CONFIG_SERIAL_8250_RSA=y
# CONFIG_SERIAL_8250_DW is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_KGDB_NMI=y
# CONFIG_SERIAL_MAX3100 is not set
CONFIG_SERIAL_MAX310X=y
# CONFIG_SERIAL_MFD_HSU is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_CONSOLE_POLL=y
# CONFIG_SERIAL_JSM is not set
CONFIG_SERIAL_SCCNXP=y
CONFIG_SERIAL_SCCNXP_CONSOLE=y
# CONFIG_SERIAL_TIMBERDALE is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
# CONFIG_SERIAL_IFX6X60 is not set
# CONFIG_SERIAL_PCH_UART is not set
# CONFIG_SERIAL_ARC is not set
# CONFIG_SERIAL_RP2 is not set
# CONFIG_SERIAL_FSL_LPUART is not set
CONFIG_TTY_PRINTK=y
CONFIG_PRINTER=m
# CONFIG_LP_CONSOLE is not set
CONFIG_PPDEV=m
CONFIG_HVC_DRIVER=y
CONFIG_HVC_IRQ=y
CONFIG_HVC_XEN=y
CONFIG_HVC_XEN_FRONTEND=y
# CONFIG_VIRTIO_CONSOLE is not set
# CONFIG_IPMI_HANDLER is not set
CONFIG_HW_RANDOM=y
# CONFIG_HW_RANDOM_TIMERIOMEM is not set
# CONFIG_HW_RANDOM_INTEL is not set
# CONFIG_HW_RANDOM_AMD is not set
# CONFIG_HW_RANDOM_VIA is not set
# CONFIG_HW_RANDOM_VIRTIO is not set
# CONFIG_HW_RANDOM_TPM is not set
# CONFIG_NVRAM is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_MWAVE is not set
# CONFIG_RAW_DRIVER is not set
CONFIG_HPET=y
CONFIG_HPET_MMAP=y
# CONFIG_HANGCHECK_TIMER is not set
CONFIG_TCG_TPM=y
# CONFIG_TCG_TIS is not set
# CONFIG_TCG_TIS_I2C_INFINEON is not set
# CONFIG_TCG_NSC is not set
# CONFIG_TCG_ATMEL is not set
# CONFIG_TCG_INFINEON is not set
# CONFIG_TCG_ST33_I2C is not set
# CONFIG_TELCLOCK is not set
CONFIG_DEVPORT=y
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
# CONFIG_I2C_CHARDEV is not set
# CONFIG_I2C_MUX is not set
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=m

#
# I2C Hardware Bus support
#

#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_ISMT is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set

#
# ACPI drivers
#
# CONFIG_I2C_SCMI is not set

#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_CBUS_GPIO is not set
# CONFIG_I2C_DESIGNWARE_PCI is not set
# CONFIG_I2C_EG20T is not set
# CONFIG_I2C_GPIO is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_PXA_PCI is not set
# CONFIG_I2C_SIMTEC is not set
# CONFIG_I2C_XILINX is not set

#
# External I2C/SMBus adapter drivers
#
# CONFIG_I2C_DIOLAN_U2C is not set
# CONFIG_I2C_PARPORT is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_TINY_USB is not set

#
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_STUB is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
CONFIG_SPI=y
# CONFIG_SPI_DEBUG is not set
CONFIG_SPI_MASTER=y

#
# SPI Master Controller Drivers
#
# CONFIG_SPI_ALTERA is not set
# CONFIG_SPI_BITBANG is not set
# CONFIG_SPI_BUTTERFLY is not set
# CONFIG_SPI_GPIO is not set
# CONFIG_SPI_LM70_LLP is not set
# CONFIG_SPI_OC_TINY is not set
# CONFIG_SPI_PXA2XX is not set
# CONFIG_SPI_PXA2XX_PCI is not set
# CONFIG_SPI_SC18IS602 is not set
# CONFIG_SPI_TOPCLIFF_PCH is not set
# CONFIG_SPI_XCOMM is not set
# CONFIG_SPI_XILINX is not set
# CONFIG_SPI_DESIGNWARE is not set

#
# SPI Protocol Masters
#
# CONFIG_SPI_SPIDEV is not set
# CONFIG_SPI_TLE62X0 is not set
# CONFIG_HSI is not set

#
# PPS support
#
# CONFIG_PPS is not set

#
# PPS generators support
#

#
# PTP clock support
#
# CONFIG_PTP_1588_CLOCK is not set

#
# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
#
# CONFIG_PTP_1588_CLOCK_PCH is not set
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
CONFIG_GPIO_DEVRES=y
CONFIG_GPIOLIB=y
CONFIG_GPIO_ACPI=y
# CONFIG_DEBUG_GPIO is not set
# CONFIG_GPIO_SYSFS is not set
# CONFIG_GPIO_DA9052 is not set
# CONFIG_GPIO_DA9055 is not set

#
# Memory mapped GPIO drivers:
#
# CONFIG_GPIO_GENERIC_PLATFORM is not set
# CONFIG_GPIO_IT8761E is not set
# CONFIG_GPIO_TS5500 is not set
# CONFIG_GPIO_SCH is not set
# CONFIG_GPIO_ICH is not set
# CONFIG_GPIO_VX855 is not set
# CONFIG_GPIO_LYNXPOINT is not set

#
# I2C GPIO expanders:
#
# CONFIG_GPIO_MAX7300 is not set
# CONFIG_GPIO_MAX732X is not set
# CONFIG_GPIO_PCA953X is not set
# CONFIG_GPIO_PCF857X is not set
CONFIG_GPIO_RC5T583=y
CONFIG_GPIO_SX150X=y
CONFIG_GPIO_STMPE=y
CONFIG_GPIO_TC3589X=y
# CONFIG_GPIO_TPS65912 is not set
# CONFIG_GPIO_TWL6040 is not set
# CONFIG_GPIO_WM831X is not set
# CONFIG_GPIO_WM8350 is not set
# CONFIG_GPIO_WM8994 is not set
# CONFIG_GPIO_ADP5520 is not set
# CONFIG_GPIO_ADP5588 is not set

#
# PCI GPIO expanders:
#
# CONFIG_GPIO_BT8XX is not set
# CONFIG_GPIO_AMD8111 is not set
CONFIG_GPIO_LANGWELL=y
# CONFIG_GPIO_PCH is not set
# CONFIG_GPIO_ML_IOH is not set
# CONFIG_GPIO_RDC321X is not set

#
# SPI GPIO expanders:
#
# CONFIG_GPIO_MAX7301 is not set
# CONFIG_GPIO_MCP23S08 is not set
# CONFIG_GPIO_MC33880 is not set
# CONFIG_GPIO_74X164 is not set

#
# AC97 GPIO expanders:
#

#
# MODULbus GPIO expanders:
#
# CONFIG_GPIO_PALMAS is not set
CONFIG_GPIO_TPS6586X=y
CONFIG_GPIO_TPS65910=y

#
# USB GPIO expanders:
#
# CONFIG_W1 is not set
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_PDA_POWER is not set
# CONFIG_MAX8925_POWER is not set
# CONFIG_WM831X_BACKUP is not set
# CONFIG_WM831X_POWER is not set
# CONFIG_WM8350_POWER is not set
# CONFIG_TEST_POWER is not set
# CONFIG_BATTERY_88PM860X is not set
# CONFIG_BATTERY_DS2780 is not set
# CONFIG_BATTERY_DS2781 is not set
# CONFIG_BATTERY_DS2782 is not set
# CONFIG_BATTERY_SBS is not set
# CONFIG_BATTERY_BQ27x00 is not set
# CONFIG_BATTERY_DA9030 is not set
# CONFIG_BATTERY_DA9052 is not set
# CONFIG_BATTERY_MAX17040 is not set
# CONFIG_BATTERY_MAX17042 is not set
# CONFIG_CHARGER_MAX8903 is not set
# CONFIG_CHARGER_LP8727 is not set
# CONFIG_CHARGER_GPIO is not set
CONFIG_CHARGER_MANAGER=y
# CONFIG_CHARGER_BQ2415X is not set
# CONFIG_CHARGER_SMB347 is not set
# CONFIG_CHARGER_TPS65090 is not set
# CONFIG_BATTERY_GOLDFISH is not set
# CONFIG_POWER_RESET is not set
CONFIG_POWER_AVS=y
CONFIG_HWMON=y
# CONFIG_HWMON_VID is not set
# CONFIG_HWMON_DEBUG_CHIP is not set

#
# Native drivers
#
# CONFIG_SENSORS_ABITUGURU is not set
# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_AD7314 is not set
# CONFIG_SENSORS_AD7414 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADCXX is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADT7310 is not set
# CONFIG_SENSORS_ADT7410 is not set
# CONFIG_SENSORS_ADT7411 is not set
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7475 is not set
# CONFIG_SENSORS_ASC7621 is not set
# CONFIG_SENSORS_K8TEMP is not set
# CONFIG_SENSORS_K10TEMP is not set
# CONFIG_SENSORS_FAM15H_POWER is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_DS620 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_DA9052_ADC is not set
# CONFIG_SENSORS_DA9055 is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_FSCHMD is not set
# CONFIG_SENSORS_G760A is not set
# CONFIG_SENSORS_G762 is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_GPIO_FAN is not set
# CONFIG_SENSORS_HIH6130 is not set
CONFIG_SENSORS_CORETEMP=m
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_JC42 is not set
# CONFIG_SENSORS_LINEAGE is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM70 is not set
# CONFIG_SENSORS_LM73 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_LTC4151 is not set
# CONFIG_SENSORS_LTC4215 is not set
# CONFIG_SENSORS_LTC4245 is not set
# CONFIG_SENSORS_LTC4261 is not set
# CONFIG_SENSORS_LM95234 is not set
# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_LM95245 is not set
# CONFIG_SENSORS_MAX1111 is not set
# CONFIG_SENSORS_MAX16065 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX1668 is not set
# CONFIG_SENSORS_MAX197 is not set
# CONFIG_SENSORS_MAX6639 is not set
# CONFIG_SENSORS_MAX6642 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_MAX6697 is not set
# CONFIG_SENSORS_MCP3021 is not set
# CONFIG_SENSORS_NCT6775 is not set
# CONFIG_SENSORS_NTC_THERMISTOR is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_PMBUS is not set
# CONFIG_SENSORS_SHT15 is not set
# CONFIG_SENSORS_SHT21 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_SMM665 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_EMC1403 is not set
# CONFIG_SENSORS_EMC2103 is not set
# CONFIG_SENSORS_EMC6W201 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_SCH56XX_COMMON is not set
# CONFIG_SENSORS_SCH5627 is not set
# CONFIG_SENSORS_SCH5636 is not set
# CONFIG_SENSORS_ADS1015 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_ADS7871 is not set
# CONFIG_SENSORS_AMC6821 is not set
# CONFIG_SENSORS_INA209 is not set
# CONFIG_SENSORS_INA2XX is not set
# CONFIG_SENSORS_THMC50 is not set
# CONFIG_SENSORS_TMP102 is not set
# CONFIG_SENSORS_TMP401 is not set
# CONFIG_SENSORS_TMP421 is not set
# CONFIG_SENSORS_VIA_CPUTEMP is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83795 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83L786NG is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_SENSORS_WM831X is not set
# CONFIG_SENSORS_WM8350 is not set
# CONFIG_SENSORS_APPLESMC is not set

#
# ACPI drivers
#
# CONFIG_SENSORS_ACPI_POWER is not set
# CONFIG_SENSORS_ATK0110 is not set
CONFIG_THERMAL=y
CONFIG_THERMAL_HWMON=y
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
# CONFIG_THERMAL_GOV_FAIR_SHARE is not set
CONFIG_THERMAL_GOV_STEP_WISE=y
CONFIG_THERMAL_GOV_USER_SPACE=y
CONFIG_CPU_THERMAL=y
# CONFIG_THERMAL_EMULATION is not set
# CONFIG_INTEL_POWERCLAMP is not set
CONFIG_X86_PKG_TEMP_THERMAL=m

#
# Texas Instruments thermal drivers
#
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_CORE=y
# CONFIG_WATCHDOG_NOWAYOUT is not set

#
# Watchdog Device Drivers
#
# CONFIG_SOFT_WATCHDOG is not set
# CONFIG_DA9052_WATCHDOG is not set
# CONFIG_DA9055_WATCHDOG is not set
# CONFIG_WM831X_WATCHDOG is not set
# CONFIG_WM8350_WATCHDOG is not set
# CONFIG_ACQUIRE_WDT is not set
# CONFIG_ADVANTECH_WDT is not set
# CONFIG_ALIM1535_WDT is not set
# CONFIG_ALIM7101_WDT is not set
# CONFIG_F71808E_WDT is not set
# CONFIG_SP5100_TCO is not set
# CONFIG_SC520_WDT is not set
# CONFIG_SBC_FITPC2_WATCHDOG is not set
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_IBMASR is not set
# CONFIG_WAFER_WDT is not set
# CONFIG_I6300ESB_WDT is not set
# CONFIG_IE6XX_WDT is not set
# CONFIG_ITCO_WDT is not set
# CONFIG_IT8712F_WDT is not set
# CONFIG_IT87_WDT is not set
# CONFIG_HP_WATCHDOG is not set
# CONFIG_SC1200_WDT is not set
# CONFIG_PC87413_WDT is not set
# CONFIG_NV_TCO is not set
# CONFIG_60XX_WDT is not set
# CONFIG_SBC8360_WDT is not set
# CONFIG_CPU5_WDT is not set
# CONFIG_SMSC_SCH311X_WDT is not set
# CONFIG_SMSC37B787_WDT is not set
# CONFIG_VIA_WDT is not set
# CONFIG_W83627HF_WDT is not set
# CONFIG_W83697HF_WDT is not set
# CONFIG_W83697UG_WDT is not set
# CONFIG_W83877F_WDT is not set
# CONFIG_W83977F_WDT is not set
# CONFIG_MACHZ_WDT is not set
# CONFIG_SBC_EPX_C3_WATCHDOG is not set
# CONFIG_MEN_A21_WDT is not set
# CONFIG_XEN_WDT is not set

#
# PCI-based Watchdog Cards
#
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_WDTPCI is not set

#
# USB-based Watchdog Cards
#
# CONFIG_USBPCWATCHDOG is not set
CONFIG_SSB_POSSIBLE=y

#
# Sonics Silicon Backplane
#
# CONFIG_SSB is not set
CONFIG_BCMA_POSSIBLE=y

#
# Broadcom specific AMBA
#
# CONFIG_BCMA is not set

#
# Multifunction device drivers
#
CONFIG_MFD_CORE=y
# CONFIG_MFD_CS5535 is not set
# CONFIG_MFD_AS3711 is not set
CONFIG_PMIC_ADP5520=y
CONFIG_MFD_AAT2870_CORE=y
# CONFIG_MFD_CROS_EC is not set
CONFIG_PMIC_DA903X=y
CONFIG_PMIC_DA9052=y
CONFIG_MFD_DA9052_SPI=y
CONFIG_MFD_DA9052_I2C=y
CONFIG_MFD_DA9055=y
# CONFIG_MFD_MC13XXX_SPI is not set
# CONFIG_MFD_MC13XXX_I2C is not set
# CONFIG_HTC_PASIC3 is not set
CONFIG_HTC_I2CPLD=y
CONFIG_LPC_ICH=m
# CONFIG_LPC_SCH is not set
# CONFIG_MFD_JANZ_CMODIO is not set
# CONFIG_MFD_KEMPLD is not set
# CONFIG_MFD_88PM800 is not set
# CONFIG_MFD_88PM805 is not set
CONFIG_MFD_88PM860X=y
CONFIG_MFD_MAX77686=y
CONFIG_MFD_MAX77693=y
# CONFIG_MFD_MAX8907 is not set
CONFIG_MFD_MAX8925=y
CONFIG_MFD_MAX8997=y
CONFIG_MFD_MAX8998=y
CONFIG_EZX_PCAP=y
# CONFIG_MFD_VIPERBOARD is not set
# CONFIG_MFD_RETU is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_MFD_RDC321X is not set
# CONFIG_MFD_RTSX_PCI is not set
CONFIG_MFD_RC5T583=y
CONFIG_MFD_SEC_CORE=y
# CONFIG_MFD_SI476X_CORE is not set
# CONFIG_MFD_SM501 is not set
CONFIG_MFD_SMSC=y
CONFIG_ABX500_CORE=y
CONFIG_AB3100_CORE=y
# CONFIG_AB3100_OTP is not set
CONFIG_MFD_STMPE=y

#
# STMicroelectronics STMPE Interface Drivers
#
CONFIG_STMPE_I2C=y
CONFIG_STMPE_SPI=y
# CONFIG_MFD_SYSCON is not set
# CONFIG_MFD_TI_AM335X_TSCADC is not set
CONFIG_MFD_LP8788=y
CONFIG_MFD_PALMAS=y
# CONFIG_TPS6105X is not set
# CONFIG_TPS65010 is not set
# CONFIG_TPS6507X is not set
CONFIG_MFD_TPS65090=y
# CONFIG_MFD_TPS65217 is not set
CONFIG_MFD_TPS6586X=y
CONFIG_MFD_TPS65910=y
CONFIG_MFD_TPS65912=y
CONFIG_MFD_TPS65912_I2C=y
CONFIG_MFD_TPS65912_SPI=y
# CONFIG_MFD_TPS80031 is not set
# CONFIG_TWL4030_CORE is not set
CONFIG_TWL6040_CORE=y
# CONFIG_MFD_WL1273_CORE is not set
# CONFIG_MFD_LM3533 is not set
# CONFIG_MFD_TIMBERDALE is not set
CONFIG_MFD_TC3589X=y
# CONFIG_MFD_TMIO is not set
# CONFIG_MFD_VX855 is not set
# CONFIG_MFD_ARIZONA_I2C is not set
# CONFIG_MFD_ARIZONA_SPI is not set
CONFIG_MFD_WM8400=y
CONFIG_MFD_WM831X=y
CONFIG_MFD_WM831X_I2C=y
CONFIG_MFD_WM831X_SPI=y
CONFIG_MFD_WM8350=y
CONFIG_MFD_WM8350_I2C=y
CONFIG_MFD_WM8994=y
CONFIG_REGULATOR=y
# CONFIG_REGULATOR_DEBUG is not set
# CONFIG_REGULATOR_DUMMY is not set
# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
# CONFIG_REGULATOR_GPIO is not set
# CONFIG_REGULATOR_AD5398 is not set
# CONFIG_REGULATOR_AAT2870 is not set
# CONFIG_REGULATOR_DA903X is not set
# CONFIG_REGULATOR_DA9052 is not set
# CONFIG_REGULATOR_DA9055 is not set
# CONFIG_REGULATOR_FAN53555 is not set
# CONFIG_REGULATOR_ISL6271A is not set
CONFIG_REGULATOR_88PM8607=y
# CONFIG_REGULATOR_MAX1586 is not set
# CONFIG_REGULATOR_MAX8649 is not set
# CONFIG_REGULATOR_MAX8660 is not set
# CONFIG_REGULATOR_MAX8925 is not set
# CONFIG_REGULATOR_MAX8952 is not set
# CONFIG_REGULATOR_MAX8973 is not set
# CONFIG_REGULATOR_MAX8997 is not set
# CONFIG_REGULATOR_MAX8998 is not set
# CONFIG_REGULATOR_MAX77686 is not set
# CONFIG_REGULATOR_MAX77693 is not set
# CONFIG_REGULATOR_PCAP is not set
# CONFIG_REGULATOR_LP3971 is not set
# CONFIG_REGULATOR_LP3972 is not set
CONFIG_REGULATOR_LP872X=y
# CONFIG_REGULATOR_LP8755 is not set
CONFIG_REGULATOR_LP8788=y
# CONFIG_REGULATOR_RC5T583 is not set
# CONFIG_REGULATOR_S2MPS11 is not set
# CONFIG_REGULATOR_S5M8767 is not set
# CONFIG_REGULATOR_AB3100 is not set
# CONFIG_REGULATOR_PALMAS is not set
# CONFIG_REGULATOR_TPS51632 is not set
# CONFIG_REGULATOR_TPS62360 is not set
# CONFIG_REGULATOR_TPS65023 is not set
# CONFIG_REGULATOR_TPS6507X is not set
# CONFIG_REGULATOR_TPS65090 is not set
# CONFIG_REGULATOR_TPS6524X is not set
# CONFIG_REGULATOR_TPS6586X is not set
# CONFIG_REGULATOR_TPS65910 is not set
# CONFIG_REGULATOR_TPS65912 is not set
# CONFIG_REGULATOR_WM831X is not set
# CONFIG_REGULATOR_WM8350 is not set
# CONFIG_REGULATOR_WM8400 is not set
# CONFIG_REGULATOR_WM8994 is not set
CONFIG_MEDIA_SUPPORT=m

#
# Multimedia core support
#
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
CONFIG_MEDIA_RADIO_SUPPORT=y
CONFIG_MEDIA_RC_SUPPORT=y
# CONFIG_MEDIA_CONTROLLER is not set
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L2=m
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
CONFIG_VIDEOBUF2_CORE=m
CONFIG_VIDEOBUF2_MEMOPS=m
CONFIG_VIDEOBUF2_VMALLOC=m
# CONFIG_VIDEO_V4L2_INT_DEVICE is not set
CONFIG_DVB_CORE=m
CONFIG_DVB_NET=y
# CONFIG_TTPCI_EEPROM is not set
CONFIG_DVB_MAX_ADAPTERS=8
CONFIG_DVB_DYNAMIC_MINORS=y

#
# Media drivers
#
CONFIG_RC_CORE=m
# CONFIG_RC_MAP is not set
CONFIG_RC_DECODERS=y
# CONFIG_LIRC is not set
# CONFIG_IR_NEC_DECODER is not set
# CONFIG_IR_RC5_DECODER is not set
# CONFIG_IR_RC6_DECODER is not set
# CONFIG_IR_JVC_DECODER is not set
# CONFIG_IR_SONY_DECODER is not set
# CONFIG_IR_RC5_SZ_DECODER is not set
# CONFIG_IR_SANYO_DECODER is not set
# CONFIG_IR_MCE_KBD_DECODER is not set
CONFIG_RC_DEVICES=y
# CONFIG_RC_ATI_REMOTE is not set
# CONFIG_IR_ENE is not set
# CONFIG_IR_IMON is not set
# CONFIG_IR_MCEUSB is not set
# CONFIG_IR_ITE_CIR is not set
# CONFIG_IR_FINTEK is not set
# CONFIG_IR_NUVOTON is not set
# CONFIG_IR_REDRAT3 is not set
# CONFIG_IR_STREAMZAP is not set
# CONFIG_IR_WINBOND_CIR is not set
# CONFIG_IR_IGUANA is not set
# CONFIG_IR_TTUSBIR is not set
# CONFIG_RC_LOOPBACK is not set
# CONFIG_IR_GPIO_CIR is not set
CONFIG_MEDIA_USB_SUPPORT=y

#
# Webcam devices
#
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
# CONFIG_USB_GSPCA is not set
# CONFIG_USB_PWC is not set
# CONFIG_VIDEO_CPIA2 is not set
# CONFIG_USB_ZR364XX is not set
# CONFIG_USB_STKWEBCAM is not set
# CONFIG_USB_S2255 is not set
# CONFIG_USB_SN9C102 is not set
# CONFIG_VIDEO_USBTV is not set

#
# Analog TV USB devices
#
# CONFIG_VIDEO_PVRUSB2 is not set
# CONFIG_VIDEO_HDPVR is not set
# CONFIG_VIDEO_TLG2300 is not set
# CONFIG_VIDEO_USBVISION is not set
# CONFIG_VIDEO_STK1160 is not set

#
# Analog/digital TV USB devices
#
# CONFIG_VIDEO_AU0828 is not set
# CONFIG_VIDEO_CX231XX is not set
# CONFIG_VIDEO_TM6000 is not set

#
# Digital TV USB devices
#
# CONFIG_DVB_USB is not set
# CONFIG_DVB_USB_V2 is not set
# CONFIG_DVB_TTUSB_BUDGET is not set
# CONFIG_DVB_TTUSB_DEC is not set
# CONFIG_SMS_USB_DRV is not set
# CONFIG_DVB_B2C2_FLEXCOP_USB is not set

#
# Webcam, TV (analog/digital) USB devices
#
# CONFIG_VIDEO_EM28XX is not set
CONFIG_MEDIA_PCI_SUPPORT=y

#
# Media capture support
#

#
# Media capture/analog TV support
#
# CONFIG_VIDEO_IVTV is not set
# CONFIG_VIDEO_ZORAN is not set
# CONFIG_VIDEO_HEXIUM_GEMINI is not set
# CONFIG_VIDEO_HEXIUM_ORION is not set
# CONFIG_VIDEO_MXB is not set

#
# Media capture/analog/hybrid TV support
#
# CONFIG_VIDEO_CX18 is not set
# CONFIG_VIDEO_CX23885 is not set
# CONFIG_VIDEO_CX25821 is not set
# CONFIG_VIDEO_CX88 is not set
# CONFIG_VIDEO_BT848 is not set
# CONFIG_VIDEO_SAA7134 is not set
# CONFIG_VIDEO_SAA7164 is not set

#
# Media digital TV PCI Adapters
#
# CONFIG_DVB_AV7110 is not set
# CONFIG_DVB_BUDGET_CORE is not set
# CONFIG_DVB_B2C2_FLEXCOP_PCI is not set
# CONFIG_DVB_PLUTO2 is not set
# CONFIG_DVB_DM1105 is not set
# CONFIG_DVB_PT1 is not set
# CONFIG_MANTIS_CORE is not set
# CONFIG_DVB_NGENE is not set
# CONFIG_DVB_DDBRIDGE is not set
CONFIG_V4L_PLATFORM_DRIVERS=y
# CONFIG_VIDEO_CAFE_CCIC is not set
# CONFIG_VIDEO_TIMBERDALE is not set
# CONFIG_SOC_CAMERA is not set
CONFIG_V4L_MEM2MEM_DRIVERS=y
# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set
# CONFIG_VIDEO_SH_VEU is not set
CONFIG_V4L_TEST_DRIVERS=y
# CONFIG_VIDEO_VIVI is not set
# CONFIG_VIDEO_MEM2MEM_TESTDEV is not set

#
# Supported MMC/SDIO adapters
#
# CONFIG_SMS_SDIO_DRV is not set
CONFIG_MEDIA_PARPORT_SUPPORT=y
# CONFIG_VIDEO_BWQCAM is not set
# CONFIG_VIDEO_CQCAM is not set
# CONFIG_VIDEO_W9966 is not set
CONFIG_RADIO_ADAPTERS=y
CONFIG_RADIO_SI470X=y
# CONFIG_USB_SI470X is not set
# CONFIG_I2C_SI470X is not set
# CONFIG_USB_MR800 is not set
# CONFIG_USB_DSBR is not set
# CONFIG_RADIO_MAXIRADIO is not set
# CONFIG_RADIO_SHARK is not set
# CONFIG_RADIO_SHARK2 is not set
# CONFIG_I2C_SI4713 is not set
# CONFIG_RADIO_SI4713 is not set
# CONFIG_USB_KEENE is not set
# CONFIG_USB_MA901 is not set
# CONFIG_RADIO_TEA5764 is not set
# CONFIG_RADIO_SAA7706H is not set
# CONFIG_RADIO_TEF6862 is not set
# CONFIG_RADIO_WL1273 is not set

#
# Texas Instruments WL128x FM driver (ST based)
#
# CONFIG_RADIO_WL128X is not set
# CONFIG_CYPRESS_FIRMWARE is not set

#
# Media ancillary drivers (tuners, sensors, i2c, frontends)
#
CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
CONFIG_MEDIA_ATTACH=y
CONFIG_VIDEO_IR_I2C=m

#
# Audio decoders, processors and mixers
#

#
# RDS decoders
#

#
# Video decoders
#

#
# Video and audio decoders
#

#
# Video encoders
#

#
# Camera sensor devices
#

#
# Flash devices
#

#
# Video improvement chips
#

#
# Miscelaneous helper chips
#

#
# Sensors used on soc_camera driver
#
CONFIG_MEDIA_TUNER=m
CONFIG_MEDIA_TUNER_SIMPLE=m
CONFIG_MEDIA_TUNER_TDA8290=m
CONFIG_MEDIA_TUNER_TDA827X=m
CONFIG_MEDIA_TUNER_TDA18271=m
CONFIG_MEDIA_TUNER_TDA9887=m
CONFIG_MEDIA_TUNER_TEA5761=m
CONFIG_MEDIA_TUNER_TEA5767=m
CONFIG_MEDIA_TUNER_MT20XX=m
CONFIG_MEDIA_TUNER_XC2028=m
CONFIG_MEDIA_TUNER_XC5000=m
CONFIG_MEDIA_TUNER_XC4000=m
CONFIG_MEDIA_TUNER_MC44S803=m

#
# Multistandard (satellite) frontends
#

#
# Multistandard (cable + terrestrial) frontends
#

#
# DVB-S (satellite) frontends
#

#
# DVB-T (terrestrial) frontends
#

#
# DVB-C (cable) frontends
#

#
# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
#

#
# ISDB-T (terrestrial) frontends
#

#
# Digital terrestrial only tuners/PLL
#

#
# SEC control devices for DVB-S
#

#
# Tools to develop new frontends
#
# CONFIG_DVB_DUMMY_FE is not set

#
# Graphics support
#
CONFIG_AGP=y
CONFIG_AGP_AMD64=y
CONFIG_AGP_INTEL=y
# CONFIG_AGP_SIS is not set
CONFIG_AGP_VIA=y
CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=16
CONFIG_VGA_SWITCHEROO=y
CONFIG_DRM=m
CONFIG_DRM_KMS_HELPER=m
CONFIG_DRM_LOAD_EDID_FIRMWARE=y

#
# I2C encoder or helper chips
#
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_NOUVEAU is not set
# CONFIG_DRM_I810 is not set
CONFIG_DRM_I915=m
CONFIG_DRM_I915_KMS=y
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
# CONFIG_DRM_VMWGFX is not set
# CONFIG_DRM_GMA500 is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_QXL is not set
# CONFIG_VGASTATE is not set
CONFIG_VIDEO_OUTPUT_CONTROL=m
CONFIG_HDMI=y
CONFIG_FB=y
CONFIG_FIRMWARE_EDID=y
# CONFIG_FB_DDC is not set
# CONFIG_FB_BOOT_VESA_SUPPORT is not set
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
# CONFIG_FB_SYS_FILLRECT is not set
# CONFIG_FB_SYS_COPYAREA is not set
# CONFIG_FB_SYS_IMAGEBLIT is not set
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_SYS_FOPS is not set
# CONFIG_FB_SVGALIB is not set
# CONFIG_FB_MACMODES is not set
# CONFIG_FB_BACKLIGHT is not set
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y

#
# Frame buffer hardware drivers
#
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
CONFIG_FB_ASILIANT=y
CONFIG_FB_IMSTT=y
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_UVESA is not set
# CONFIG_FB_VESA is not set
CONFIG_FB_EFI=y
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_I740 is not set
# CONFIG_FB_LE80578 is not set
# CONFIG_FB_INTEL is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_VIA is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_TMIO is not set
# CONFIG_FB_SMSCUFX is not set
# CONFIG_FB_UDL is not set
# CONFIG_FB_GOLDFISH is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_XEN_FBDEV_FRONTEND is not set
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_BROADSHEET is not set
# CONFIG_FB_AUO_K190X is not set
CONFIG_EXYNOS_VIDEO=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_GENERIC is not set
# CONFIG_BACKLIGHT_PWM is not set
# CONFIG_BACKLIGHT_DA903X is not set
# CONFIG_BACKLIGHT_DA9052 is not set
# CONFIG_BACKLIGHT_MAX8925 is not set
# CONFIG_BACKLIGHT_APPLE is not set
# CONFIG_BACKLIGHT_SAHARA is not set
# CONFIG_BACKLIGHT_WM831X is not set
# CONFIG_BACKLIGHT_ADP5520 is not set
# CONFIG_BACKLIGHT_ADP8860 is not set
# CONFIG_BACKLIGHT_ADP8870 is not set
# CONFIG_BACKLIGHT_88PM860X is not set
# CONFIG_BACKLIGHT_AAT2870 is not set
# CONFIG_BACKLIGHT_LM3630 is not set
# CONFIG_BACKLIGHT_LM3639 is not set
# CONFIG_BACKLIGHT_LP855X is not set
# CONFIG_BACKLIGHT_LP8788 is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_LOGO is not set
CONFIG_SOUND=m
# CONFIG_SOUND_OSS_CORE is not set
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_JACK=y
CONFIG_SND_SEQUENCER=m
# CONFIG_SND_SEQ_DUMMY is not set
# CONFIG_SND_MIXER_OSS is not set
# CONFIG_SND_PCM_OSS is not set
# CONFIG_SND_SEQUENCER_OSS is not set
# CONFIG_SND_HRTIMER is not set
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_MAX_CARDS=32
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_VERBOSE_PROCFS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
CONFIG_SND_VMASTER=y
CONFIG_SND_KCTL_JACK=y
CONFIG_SND_DMA_SGBUF=y
CONFIG_SND_RAWMIDI_SEQ=m
# CONFIG_SND_OPL3_LIB_SEQ is not set
# CONFIG_SND_OPL4_LIB_SEQ is not set
# CONFIG_SND_SBAWE_SEQ is not set
# CONFIG_SND_EMU10K1_SEQ is not set
CONFIG_SND_DRIVERS=y
# CONFIG_SND_PCSP is not set
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_ALOOP is not set
CONFIG_SND_VIRMIDI=m
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_MTS64 is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set
# CONFIG_SND_PORTMAN2X4 is not set
CONFIG_SND_PCI=y
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS300 is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ASIHPI is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AW2 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_OXYGEN is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS5530 is not set
# CONFIG_SND_CS5535AUDIO is not set
# CONFIG_SND_CTXFI is not set
# CONFIG_SND_DARLA20 is not set
# CONFIG_SND_GINA20 is not set
# CONFIG_SND_LAYLA20 is not set
# CONFIG_SND_DARLA24 is not set
# CONFIG_SND_GINA24 is not set
# CONFIG_SND_LAYLA24 is not set
# CONFIG_SND_MONA is not set
# CONFIG_SND_MIA is not set
# CONFIG_SND_ECHO3G is not set
# CONFIG_SND_INDIGO is not set
# CONFIG_SND_INDIGOIO is not set
# CONFIG_SND_INDIGODJ is not set
# CONFIG_SND_INDIGOIOX is not set
# CONFIG_SND_INDIGODJX is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_FM801 is not set
CONFIG_SND_HDA_INTEL=m
CONFIG_SND_HDA_PREALLOC_SIZE=64
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_INPUT_BEEP_MODE=0
CONFIG_SND_HDA_INPUT_JACK=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_ANALOG=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_VIA=y
CONFIG_SND_HDA_CODEC_HDMI=y
# CONFIG_SND_HDA_I915 is not set
CONFIG_SND_HDA_CODEC_CIRRUS=y
CONFIG_SND_HDA_CODEC_CONEXANT=y
CONFIG_SND_HDA_CODEC_CA0110=y
CONFIG_SND_HDA_CODEC_CA0132=y
# CONFIG_SND_HDA_CODEC_CA0132_DSP is not set
CONFIG_SND_HDA_CODEC_CMEDIA=y
CONFIG_SND_HDA_CODEC_SI3054=y
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_LOLA is not set
# CONFIG_SND_LX6464ES is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_PCXHR is not set
# CONFIG_SND_RIPTIDE is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VIRTUOSO is not set
# CONFIG_SND_VX222 is not set
# CONFIG_SND_YMFPCI is not set
CONFIG_SND_SPI=y
CONFIG_SND_USB=y
# CONFIG_SND_USB_AUDIO is not set
# CONFIG_SND_USB_UA101 is not set
# CONFIG_SND_USB_USX2Y is not set
# CONFIG_SND_USB_CAIAQ is not set
# CONFIG_SND_USB_US122L is not set
# CONFIG_SND_USB_6FIRE is not set
# CONFIG_SND_USB_HIFACE is not set
# CONFIG_SND_SOC is not set
# CONFIG_SOUND_PRIME is not set

#
# HID support
#
CONFIG_HID=m
CONFIG_HIDRAW=y
# CONFIG_UHID is not set
CONFIG_HID_GENERIC=m

#
# Special HID drivers
#
# CONFIG_HID_A4TECH is not set
# CONFIG_HID_ACRUX is not set
# CONFIG_HID_APPLE is not set
# CONFIG_HID_APPLEIR is not set
# CONFIG_HID_AUREAL is not set
# CONFIG_HID_BELKIN is not set
# CONFIG_HID_CHERRY is not set
# CONFIG_HID_CHICONY is not set
# CONFIG_HID_PRODIKEYS is not set
# CONFIG_HID_CYPRESS is not set
# CONFIG_HID_DRAGONRISE is not set
# CONFIG_HID_EMS_FF is not set
# CONFIG_HID_ELECOM is not set
# CONFIG_HID_ELO is not set
# CONFIG_HID_EZKEY is not set
# CONFIG_HID_HOLTEK is not set
# CONFIG_HID_HUION is not set
# CONFIG_HID_KEYTOUCH is not set
# CONFIG_HID_KYE is not set
# CONFIG_HID_UCLOGIC is not set
# CONFIG_HID_WALTOP is not set
# CONFIG_HID_GYRATION is not set
# CONFIG_HID_ICADE is not set
# CONFIG_HID_TWINHAN is not set
# CONFIG_HID_KENSINGTON is not set
# CONFIG_HID_LCPOWER is not set
# CONFIG_HID_LENOVO_TPKBD is not set
# CONFIG_HID_LOGITECH is not set
# CONFIG_HID_MAGICMOUSE is not set
# CONFIG_HID_MICROSOFT is not set
# CONFIG_HID_MONTEREY is not set
# CONFIG_HID_MULTITOUCH is not set
# CONFIG_HID_NTRIG is not set
# CONFIG_HID_ORTEK is not set
# CONFIG_HID_PANTHERLORD is not set
# CONFIG_HID_PETALYNX is not set
# CONFIG_HID_PICOLCD is not set
# CONFIG_HID_PRIMAX is not set
# CONFIG_HID_ROCCAT is not set
# CONFIG_HID_SAITEK is not set
# CONFIG_HID_SAMSUNG is not set
# CONFIG_HID_SONY is not set
# CONFIG_HID_SPEEDLINK is not set
# CONFIG_HID_STEELSERIES is not set
# CONFIG_HID_SUNPLUS is not set
# CONFIG_HID_GREENASIA is not set
# CONFIG_HID_SMARTJOYPLUS is not set
# CONFIG_HID_TIVO is not set
# CONFIG_HID_TOPSEED is not set
# CONFIG_HID_THINGM is not set
# CONFIG_HID_THRUSTMASTER is not set
# CONFIG_HID_WACOM is not set
# CONFIG_HID_WIIMOTE is not set
# CONFIG_HID_ZEROPLUS is not set
# CONFIG_HID_ZYDACRON is not set
# CONFIG_HID_SENSOR_HUB is not set

#
# USB HID support
#
CONFIG_USB_HID=m
CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y

#
# USB HID Boot Protocol drivers
#
# CONFIG_USB_KBD is not set
# CONFIG_USB_MOUSE is not set

#
# I2C HID support
#
# CONFIG_I2C_HID is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=y
CONFIG_USB_DEBUG=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y

#
# Miscellaneous USB options
#
CONFIG_USB_DEFAULT_PERSIST=y
CONFIG_USB_DYNAMIC_MINORS=y
# CONFIG_USB_OTG is not set
# CONFIG_USB_OTG_WHITELIST is not set
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
CONFIG_USB_MON=m
# CONFIG_USB_WUSB_CBAF is not set

#
# USB Host Controller Drivers
#
# CONFIG_USB_C67X00_HCD is not set
CONFIG_USB_XHCI_HCD=y
# CONFIG_USB_XHCI_HCD_DEBUGGING is not set
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_EHCI_PCI=y
CONFIG_USB_EHCI_HCD_PLATFORM=y
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_ISP1760_HCD is not set
# CONFIG_USB_ISP1362_HCD is not set
# CONFIG_USB_FUSBH200_HCD is not set
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_HCD_PCI=y
CONFIG_USB_OHCI_HCD_PLATFORM=y
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=y
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set

#
# USB Device Class drivers
#
# CONFIG_USB_ACM is not set
CONFIG_USB_PRINTER=m
# CONFIG_USB_WDM is not set
# CONFIG_USB_TMC is not set

#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#

#
# also be needed; see USB_STORAGE Help for more info
#
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_REALTEK is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
# CONFIG_USB_STORAGE_ENE_UB6250 is not set

#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
# CONFIG_USB_DWC3 is not set
# CONFIG_USB_CHIPIDEA is not set

#
# USB port drivers
#
# CONFIG_USB_USS720 is not set
# CONFIG_USB_SERIAL is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_SEVSEG is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set
# CONFIG_USB_ISIGHTFW is not set
# CONFIG_USB_YUREX is not set
# CONFIG_USB_EZUSB_FX2 is not set
# CONFIG_USB_HSIC_USB3503 is not set
# CONFIG_USB_PHY is not set
# CONFIG_USB_GADGET is not set
# CONFIG_UWB is not set
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_UNSAFE_RESUME is not set
# CONFIG_MMC_CLKGATE is not set

#
# MMC/SD/SDIO Card Drivers
#
CONFIG_MMC_BLOCK=m
CONFIG_MMC_BLOCK_MINORS=8
CONFIG_MMC_BLOCK_BOUNCE=y
# CONFIG_SDIO_UART is not set
# CONFIG_MMC_TEST is not set

#
# MMC/SD/SDIO Host Controller Drivers
#
CONFIG_MMC_SDHCI=m
CONFIG_MMC_SDHCI_PCI=m
# CONFIG_MMC_RICOH_MMC is not set
# CONFIG_MMC_SDHCI_ACPI is not set
# CONFIG_MMC_SDHCI_PLTFM is not set
# CONFIG_MMC_WBSD is not set
# CONFIG_MMC_TIFM_SD is not set
# CONFIG_MMC_SPI is not set
# CONFIG_MMC_CB710 is not set
# CONFIG_MMC_VIA_SDMMC is not set
# CONFIG_MMC_VUB300 is not set
# CONFIG_MMC_USHC is not set
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y

#
# LED drivers
#
# CONFIG_LEDS_88PM860X is not set
# CONFIG_LEDS_LM3530 is not set
# CONFIG_LEDS_LM3642 is not set
# CONFIG_LEDS_PCA9532 is not set
# CONFIG_LEDS_GPIO is not set
# CONFIG_LEDS_LP3944 is not set
# CONFIG_LEDS_LP5521 is not set
# CONFIG_LEDS_LP5523 is not set
# CONFIG_LEDS_LP5562 is not set
# CONFIG_LEDS_LP8788 is not set
# CONFIG_LEDS_CLEVO_MAIL is not set
# CONFIG_LEDS_PCA955X is not set
# CONFIG_LEDS_PCA9633 is not set
# CONFIG_LEDS_WM831X_STATUS is not set
# CONFIG_LEDS_WM8350 is not set
# CONFIG_LEDS_DA903X is not set
# CONFIG_LEDS_DA9052 is not set
# CONFIG_LEDS_DAC124S085 is not set
# CONFIG_LEDS_PWM is not set
# CONFIG_LEDS_REGULATOR is not set
# CONFIG_LEDS_BD2802 is not set
# CONFIG_LEDS_INTEL_SS4200 is not set
# CONFIG_LEDS_LT3593 is not set
# CONFIG_LEDS_ADP5520 is not set
# CONFIG_LEDS_DELL_NETBOOKS is not set
# CONFIG_LEDS_TCA6507 is not set
# CONFIG_LEDS_MAX8997 is not set
# CONFIG_LEDS_LM355x is not set
# CONFIG_LEDS_OT200 is not set
# CONFIG_LEDS_BLINKM is not set

#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
# CONFIG_LEDS_TRIGGER_TIMER is not set
# CONFIG_LEDS_TRIGGER_ONESHOT is not set
# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
CONFIG_LEDS_TRIGGER_CPU=y
# CONFIG_LEDS_TRIGGER_GPIO is not set
# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set

#
# iptables trigger is under Netfilter config (LED target)
#
# CONFIG_LEDS_TRIGGER_TRANSIENT is not set
# CONFIG_LEDS_TRIGGER_CAMERA is not set
# CONFIG_ACCESSIBILITY is not set
# CONFIG_INFINIBAND is not set
CONFIG_EDAC=y
CONFIG_EDAC_LEGACY_SYSFS=y
# CONFIG_EDAC_DEBUG is not set
# CONFIG_EDAC_DECODE_MCE is not set
# CONFIG_EDAC_MM_EDAC is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_SYSTOHC=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set

#
# RTC interfaces
#
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set

#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_88PM860X is not set
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_DS3232 is not set
# CONFIG_RTC_DRV_LP8788 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_MAX8925 is not set
# CONFIG_RTC_DRV_MAX8998 is not set
# CONFIG_RTC_DRV_MAX8997 is not set
# CONFIG_RTC_DRV_MAX77686 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_ISL12022 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PALMAS is not set
# CONFIG_RTC_DRV_PCF2127 is not set
# CONFIG_RTC_DRV_PCF8523 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_BQ32K is not set
# CONFIG_RTC_DRV_TPS6586X is not set
# CONFIG_RTC_DRV_TPS65910 is not set
# CONFIG_RTC_DRV_RC5T583 is not set
# CONFIG_RTC_DRV_S35390A is not set
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8581 is not set
# CONFIG_RTC_DRV_RX8025 is not set
# CONFIG_RTC_DRV_EM3027 is not set
# CONFIG_RTC_DRV_RV3029C2 is not set

#
# SPI RTC drivers
#
# CONFIG_RTC_DRV_M41T93 is not set
# CONFIG_RTC_DRV_M41T94 is not set
# CONFIG_RTC_DRV_DS1305 is not set
# CONFIG_RTC_DRV_DS1390 is not set
# CONFIG_RTC_DRV_MAX6902 is not set
# CONFIG_RTC_DRV_R9701 is not set
# CONFIG_RTC_DRV_RS5C348 is not set
# CONFIG_RTC_DRV_DS3234 is not set
# CONFIG_RTC_DRV_PCF2123 is not set
# CONFIG_RTC_DRV_RX4581 is not set

#
# Platform RTC drivers
#
CONFIG_RTC_DRV_CMOS=y
# CONFIG_RTC_DRV_DS1286 is not set
# CONFIG_RTC_DRV_DS1511 is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_DA9052 is not set
# CONFIG_RTC_DRV_DA9055 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T35 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_MSM6242 is not set
# CONFIG_RTC_DRV_BQ4802 is not set
# CONFIG_RTC_DRV_RP5C01 is not set
# CONFIG_RTC_DRV_V3020 is not set
# CONFIG_RTC_DRV_DS2404 is not set
# CONFIG_RTC_DRV_WM831X is not set
# CONFIG_RTC_DRV_WM8350 is not set
# CONFIG_RTC_DRV_AB3100 is not set

#
# on-CPU RTC drivers
#
# CONFIG_RTC_DRV_PCAP is not set

#
# HID Sensor RTC drivers
#
# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set
CONFIG_DMADEVICES=y
# CONFIG_DMADEVICES_DEBUG is not set

#
# DMA Devices
#
# CONFIG_INTEL_MID_DMAC is not set
# CONFIG_INTEL_IOATDMA is not set
# CONFIG_DW_DMAC_CORE is not set
# CONFIG_DW_DMAC is not set
# CONFIG_DW_DMAC_PCI is not set
# CONFIG_TIMB_DMA is not set
# CONFIG_PCH_DMA is not set
CONFIG_DMA_ENGINE=y
CONFIG_DMA_ACPI=y

#
# DMA Clients
#
CONFIG_NET_DMA=y
# CONFIG_ASYNC_TX_DMA is not set
# CONFIG_DMATEST is not set
CONFIG_AUXDISPLAY=y
# CONFIG_KS0108 is not set
# CONFIG_UIO is not set
# CONFIG_VFIO is not set
CONFIG_VIRT_DRIVERS=y
CONFIG_VIRTIO=y

#
# Virtio drivers
#
CONFIG_VIRTIO_PCI=y
# CONFIG_VIRTIO_BALLOON is not set
# CONFIG_VIRTIO_MMIO is not set

#
# Microsoft Hyper-V guest support
#
# CONFIG_HYPERV is not set

#
# Xen driver support
#
CONFIG_XEN_BALLOON=y
CONFIG_XEN_SELFBALLOONING=y
CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
CONFIG_XEN_SCRUB_PAGES=y
# CONFIG_XEN_DEV_EVTCHN is not set
CONFIG_XEN_BACKEND=y
# CONFIG_XENFS is not set
CONFIG_XEN_SYS_HYPERVISOR=y
CONFIG_XEN_XENBUS_FRONTEND=y
# CONFIG_XEN_GNTDEV is not set
# CONFIG_XEN_GRANT_DEV_ALLOC is not set
CONFIG_SWIOTLB_XEN=y
CONFIG_XEN_TMEM=m
# CONFIG_XEN_PCIDEV_BACKEND is not set
CONFIG_XEN_PRIVCMD=m
CONFIG_XEN_ACPI_PROCESSOR=y
CONFIG_XEN_MCE_LOG=y
CONFIG_XEN_HAVE_PVMMU=y
CONFIG_STAGING=y
# CONFIG_ET131X is not set
# CONFIG_SLICOSS is not set
# CONFIG_USBIP_CORE is not set
# CONFIG_W35UND is not set
# CONFIG_PRISM2_USB is not set
# CONFIG_ECHO is not set
# CONFIG_COMEDI is not set
# CONFIG_ASUS_OLED is not set
# CONFIG_PANEL is not set
# CONFIG_R8187SE is not set
# CONFIG_RTL8192U is not set
# CONFIG_RTLLIB is not set
# CONFIG_R8712U is not set
# CONFIG_RTS5139 is not set
# CONFIG_TRANZPORT is not set
# CONFIG_IDE_PHISON is not set
# CONFIG_LINE6_USB is not set
# CONFIG_VT6655 is not set
# CONFIG_VT6656 is not set
# CONFIG_DX_SEP is not set
CONFIG_ZSMALLOC=y
# CONFIG_ZRAM is not set
# CONFIG_FB_SM7XX is not set
# CONFIG_CRYSTALHD is not set
# CONFIG_FB_XGI is not set
# CONFIG_ACPI_QUICKSTART is not set
# CONFIG_USB_ENESTORAGE is not set
# CONFIG_BCM_WIMAX is not set
# CONFIG_FT1000 is not set

#
# Speakup console speech
#
# CONFIG_SPEAKUP is not set
# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set
# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set
CONFIG_STAGING_MEDIA=y
# CONFIG_DVB_AS102 is not set
# CONFIG_DVB_CXD2099 is not set
# CONFIG_VIDEO_DT3155 is not set
# CONFIG_VIDEO_GO7007 is not set
# CONFIG_SOLO6X10 is not set

#
# Android
#
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ASHMEM=y
# CONFIG_ANDROID_LOGGER is not set
CONFIG_ANDROID_TIMED_OUTPUT=y
# CONFIG_ANDROID_TIMED_GPIO is not set
CONFIG_ANDROID_LOW_MEMORY_KILLER=y
CONFIG_ANDROID_INTF_ALARM_DEV=y
# CONFIG_SYNC is not set
# CONFIG_USB_WPAN_HCD is not set
# CONFIG_WIMAX_GDM72XX is not set
CONFIG_NET_VENDOR_SILICOM=y
# CONFIG_SBYPASS is not set
# CONFIG_BPCTL is not set
# CONFIG_CED1401 is not set
# CONFIG_DGRP is not set
# CONFIG_ZCACHE is not set
# CONFIG_USB_DWC2 is not set
# CONFIG_USB_BTMTK is not set
CONFIG_X86_PLATFORM_DEVICES=y
# CONFIG_ACER_WMI is not set
# CONFIG_ACERHDF is not set
# CONFIG_ASUS_LAPTOP is not set
# CONFIG_CHROMEOS_LAPTOP is not set
# CONFIG_DELL_WMI is not set
# CONFIG_DELL_WMI_AIO is not set
# CONFIG_FUJITSU_LAPTOP is not set
# CONFIG_FUJITSU_TABLET is not set
# CONFIG_AMILO_RFKILL is not set
# CONFIG_HP_ACCEL is not set
# CONFIG_HP_WMI is not set
# CONFIG_MSI_LAPTOP is not set
# CONFIG_PANASONIC_LAPTOP is not set
# CONFIG_COMPAL_LAPTOP is not set
# CONFIG_SONY_LAPTOP is not set
# CONFIG_IDEAPAD_LAPTOP is not set
# CONFIG_THINKPAD_ACPI is not set
# CONFIG_SENSORS_HDAPS is not set
# CONFIG_INTEL_MENLOW is not set
# CONFIG_EEEPC_LAPTOP is not set
# CONFIG_ASUS_WMI is not set
CONFIG_ACPI_WMI=m
# CONFIG_MSI_WMI is not set
# CONFIG_TOPSTAR_LAPTOP is not set
# CONFIG_ACPI_TOSHIBA is not set
# CONFIG_TOSHIBA_BT_RFKILL is not set
# CONFIG_ACPI_CMPC is not set
# CONFIG_INTEL_IPS is not set
# CONFIG_IBM_RTL is not set
# CONFIG_XO15_EBOOK is not set
CONFIG_SAMSUNG_LAPTOP=m
# CONFIG_MXM_WMI is not set
# CONFIG_INTEL_OAKTRAIL is not set
# CONFIG_SAMSUNG_Q10 is not set
# CONFIG_APPLE_GMUX is not set
# CONFIG_INTEL_RST is not set
# CONFIG_INTEL_SMARTCONNECT is not set
# CONFIG_PVPANIC is not set

#
# Hardware Spinlock drivers
#
CONFIG_CLKEVT_I8253=y
CONFIG_I8253_LOCK=y
CONFIG_CLKBLD_I8253=y
# CONFIG_MAILBOX is not set
CONFIG_IOMMU_API=y
CONFIG_IOMMU_SUPPORT=y
CONFIG_AMD_IOMMU=y
CONFIG_AMD_IOMMU_STATS=y
# CONFIG_AMD_IOMMU_V2 is not set
CONFIG_DMAR_TABLE=y
CONFIG_INTEL_IOMMU=y
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
CONFIG_IRQ_REMAP=y

#
# Remoteproc drivers
#
# CONFIG_STE_MODEM_RPROC is not set

#
# Rpmsg drivers
#
CONFIG_PM_DEVFREQ=y

#
# DEVFREQ Governors
#
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
CONFIG_DEVFREQ_GOV_POWERSAVE=y
CONFIG_DEVFREQ_GOV_USERSPACE=y

#
# DEVFREQ Drivers
#
CONFIG_EXTCON=y

#
# Extcon Device Drivers
#
# CONFIG_EXTCON_GPIO is not set
# CONFIG_EXTCON_MAX77693 is not set
# CONFIG_EXTCON_MAX8997 is not set
# CONFIG_EXTCON_PALMAS is not set
CONFIG_MEMORY=y
# CONFIG_IIO is not set
# CONFIG_NTB is not set
# CONFIG_VME_BUS is not set
CONFIG_PWM=y
CONFIG_PWM_SYSFS=y
# CONFIG_IPACK_BUS is not set
# CONFIG_RESET_CONTROLLER is not set
# CONFIG_FMC is not set

#
# Firmware Drivers
#
CONFIG_EDD=y
CONFIG_EDD_OFF=y
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_DELL_RBU is not set
# CONFIG_DCDBAS is not set
CONFIG_DMIID=y
# CONFIG_DMI_SYSFS is not set
CONFIG_ISCSI_IBFT_FIND=y
# CONFIG_ISCSI_IBFT is not set
# CONFIG_GOOGLE_FIRMWARE is not set

#
# EFI (Extensible Firmware Interface) Support
#
CONFIG_EFI_VARS=y
CONFIG_EFI_VARS_PSTORE=y
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set

#
# File systems
#
CONFIG_DCACHE_WORD_ACCESS=y
# CONFIG_EXT2_FS is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT23=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_EXT4_DEBUG=y
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_JBD2=y
CONFIG_JBD2_DEBUG=y
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
CONFIG_XFS_FS=m
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_XFS_RT=y
# CONFIG_XFS_WARN is not set
# CONFIG_XFS_DEBUG is not set
# CONFIG_GFS2_FS is not set
CONFIG_BTRFS_FS=m
CONFIG_BTRFS_FS_POSIX_ACL=y
# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
# CONFIG_BTRFS_DEBUG is not set
# CONFIG_NILFS2_FS is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_EXPORTFS=y
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_FANOTIFY=y
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not set
# CONFIG_QUOTA_DEBUG is not set
# CONFIG_QFMT_V1 is not set
# CONFIG_QFMT_V2 is not set
CONFIG_QUOTACTL=y
CONFIG_QUOTACTL_COMPAT=y
# CONFIG_AUTOFS4_FS is not set
CONFIG_FUSE_FS=y
# CONFIG_CUSE is not set
CONFIG_GENERIC_ACL=y

#
# Caches
#
# CONFIG_FSCACHE is not set

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
# CONFIG_MSDOS_FS is not set
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_VMCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
# CONFIG_CONFIGFS_FS is not set
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
CONFIG_ECRYPT_FS=y
# CONFIG_ECRYPT_FS_MESSAGING is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_LOGFS is not set
# CONFIG_CRAMFS is not set
CONFIG_SQUASHFS=m
CONFIG_SQUASHFS_XATTR=y
CONFIG_SQUASHFS_ZLIB=y
CONFIG_SQUASHFS_LZO=y
CONFIG_SQUASHFS_XZ=y
# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX6FS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_PSTORE=y
# CONFIG_PSTORE_CONSOLE is not set
# CONFIG_PSTORE_FTRACE is not set
# CONFIG_PSTORE_RAM is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
# CONFIG_F2FS_FS is not set
# CONFIG_EFIVAR_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_CEPH_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=m
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_MAC_ROMAN is not set
# CONFIG_NLS_MAC_CELTIC is not set
# CONFIG_NLS_MAC_CENTEURO is not set
# CONFIG_NLS_MAC_CROATIAN is not set
# CONFIG_NLS_MAC_CYRILLIC is not set
# CONFIG_NLS_MAC_GAELIC is not set
# CONFIG_NLS_MAC_GREEK is not set
# CONFIG_NLS_MAC_ICELAND is not set
# CONFIG_NLS_MAC_INUIT is not set
# CONFIG_NLS_MAC_ROMANIAN is not set
# CONFIG_NLS_MAC_TURKISH is not set
# CONFIG_NLS_UTF8 is not set

#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y

#
# printk and dmesg options
#
CONFIG_PRINTK_TIME=y
CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
CONFIG_BOOT_PRINTK_DELAY=y
# CONFIG_DYNAMIC_DEBUG is not set

#
# Compile-time checks and compiler options
#
# CONFIG_DEBUG_INFO is not set
# CONFIG_ENABLE_WARN_DEPRECATED is not set
# CONFIG_ENABLE_MUST_CHECK is not set
CONFIG_FRAME_WARN=1024
# CONFIG_STRIP_ASM_SYMS is not set
# CONFIG_READABLE_ASM is not set
CONFIG_UNUSED_SYMBOLS=y
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
# CONFIG_DEBUG_SECTION_MISMATCH is not set
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_FRAME_POINTER=y
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y

#
# Memory Debugging
#
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_DEBUG_OBJECTS=y
# CONFIG_DEBUG_OBJECTS_SELFTEST is not set
# CONFIG_DEBUG_OBJECTS_FREE is not set
# CONFIG_DEBUG_OBJECTS_TIMERS is not set
# CONFIG_DEBUG_OBJECTS_WORK is not set
CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set
CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
CONFIG_DEBUG_SLAB=y
# CONFIG_DEBUG_SLAB_LEAK is not set
CONFIG_HAVE_DEBUG_KMEMLEAK=y
# CONFIG_DEBUG_KMEMLEAK is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_VIRTUAL is not set
CONFIG_DEBUG_MEMORY_INIT=y
# CONFIG_DEBUG_PER_CPU_MAPS is not set
CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
# CONFIG_DEBUG_STACKOVERFLOW is not set
CONFIG_HAVE_ARCH_KMEMCHECK=y
# CONFIG_DEBUG_SHIRQ is not set

#
# Debug Lockups and Hangs
#
CONFIG_LOCKUP_DETECTOR=y
CONFIG_HARDLOCKUP_DETECTOR=y
# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set
CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
CONFIG_DETECT_HUNG_TASK=y
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
# CONFIG_PANIC_ON_OOPS is not set
CONFIG_PANIC_ON_OOPS_VALUE=0
CONFIG_SCHED_DEBUG=y
CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y

#
# Lock Debugging (spinlocks, mutexes, etc...)
#
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
# CONFIG_DEBUG_LOCK_ALLOC is not set
# CONFIG_PROVE_LOCKING is not set
# CONFIG_LOCK_STAT is not set
# CONFIG_DEBUG_ATOMIC_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_WRITECOUNT is not set
# CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_CREDENTIALS is not set

#
# RCU Debugging
#
# CONFIG_SPARSE_RCU_POINTER is not set
# CONFIG_RCU_TORTURE_TEST is not set
CONFIG_RCU_CPU_STALL_TIMEOUT=60
# CONFIG_RCU_CPU_STALL_INFO is not set
# CONFIG_RCU_TRACE is not set
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
# CONFIG_FAULT_INJECTION is not set
CONFIG_LATENCYTOP=y
CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS=y
# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_NOP_TRACER=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_FENTRY=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_TRACER_MAX_TRACE=y
CONFIG_TRACE_CLOCK=y
CONFIG_RING_BUFFER=y
CONFIG_EVENT_TRACING=y
CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_TRACING=y
CONFIG_GENERIC_TRACER=y
CONFIG_TRACING_SUPPORT=y
CONFIG_FTRACE=y
CONFIG_FUNCTION_TRACER=y
CONFIG_FUNCTION_GRAPH_TRACER=y
# CONFIG_IRQSOFF_TRACER is not set
CONFIG_SCHED_TRACER=y
CONFIG_FTRACE_SYSCALLS=y
CONFIG_TRACER_SNAPSHOT=y
# CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP is not set
CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
# CONFIG_PROFILE_ALL_BRANCHES is not set
CONFIG_STACK_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_KPROBE_EVENT=y
CONFIG_UPROBE_EVENT=y
CONFIG_PROBE_EVENTS=y
CONFIG_DYNAMIC_FTRACE=y
CONFIG_DYNAMIC_FTRACE_WITH_REGS=y
CONFIG_FUNCTION_PROFILER=y
CONFIG_FTRACE_MCOUNT_RECORD=y
# CONFIG_FTRACE_STARTUP_TEST is not set
CONFIG_MMIOTRACE=y
# CONFIG_MMIOTRACE_TEST is not set
# CONFIG_RING_BUFFER_BENCHMARK is not set
# CONFIG_RING_BUFFER_STARTUP_TEST is not set

#
# Runtime Testing
#
# CONFIG_LKDTM is not set
# CONFIG_TEST_LIST_SORT is not set
# CONFIG_KPROBES_SANITY_TEST is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_RBTREE_TEST is not set
# CONFIG_INTERVAL_TREE_TEST is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_TEST_STRING_HELPERS is not set
# CONFIG_TEST_KSTRTOX is not set
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
# CONFIG_KGDB_TESTS is not set
CONFIG_KGDB_LOW_LEVEL_TRAP=y
CONFIG_KGDB_KDB=y
CONFIG_KDB_KEYBOARD=y
CONFIG_KDB_CONTINUE_CATASTROPHIC=0
CONFIG_STRICT_DEVMEM=y
# CONFIG_X86_VERBOSE_BOOTUP is not set
CONFIG_EARLY_PRINTK=y
CONFIG_EARLY_PRINTK_DBGP=y
# CONFIG_X86_PTDUMP is not set
CONFIG_DEBUG_RODATA=y
# CONFIG_DEBUG_RODATA_TEST is not set
CONFIG_DEBUG_SET_MODULE_RONX=y
# CONFIG_DEBUG_NX_TEST is not set
CONFIG_DOUBLEFAULT=y
# CONFIG_DEBUG_TLBFLUSH is not set
# CONFIG_IOMMU_DEBUG is not set
# CONFIG_IOMMU_STRESS is not set
CONFIG_HAVE_MMIOTRACE_SUPPORT=y
# CONFIG_X86_DECODER_SELFTEST is not set
CONFIG_IO_DELAY_TYPE_0X80=0
CONFIG_IO_DELAY_TYPE_0XED=1
CONFIG_IO_DELAY_TYPE_UDELAY=2
CONFIG_IO_DELAY_TYPE_NONE=3
# CONFIG_IO_DELAY_0X80 is not set
CONFIG_IO_DELAY_0XED=y
# CONFIG_IO_DELAY_UDELAY is not set
# CONFIG_IO_DELAY_NONE is not set
CONFIG_DEFAULT_IO_DELAY_TYPE=1
# CONFIG_DEBUG_BOOT_PARAMS is not set
# CONFIG_CPA_DEBUG is not set
CONFIG_OPTIMIZE_INLINING=y
# CONFIG_DEBUG_NMI_SELFTEST is not set
# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set

#
# Security options
#
CONFIG_KEYS=y
CONFIG_TRUSTED_KEYS=y
CONFIG_ENCRYPTED_KEYS=y
# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
# CONFIG_SECURITY_DMESG_RESTRICT is not set
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_PATH=y
CONFIG_INTEL_TXT=y
CONFIG_LSM_MMAP_MIN_ADDR=0
CONFIG_SECURITY_SELINUX=y
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
CONFIG_SECURITY_SELINUX_DISABLE=y
CONFIG_SECURITY_SELINUX_DEVELOP=y
CONFIG_SECURITY_SELINUX_AVC_STATS=y
CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
CONFIG_SECURITY_SMACK=y
CONFIG_SECURITY_TOMOYO=y
CONFIG_SECURITY_TOMOYO_MAX_ACCEPT_ENTRY=2048
CONFIG_SECURITY_TOMOYO_MAX_AUDIT_LOG=1024
# CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER is not set
CONFIG_SECURITY_TOMOYO_POLICY_LOADER="/sbin/tomoyo-init"
CONFIG_SECURITY_TOMOYO_ACTIVATION_TRIGGER="/sbin/init"
CONFIG_SECURITY_APPARMOR=y
CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
CONFIG_SECURITY_YAMA=y
CONFIG_SECURITY_YAMA_STACKED=y
CONFIG_INTEGRITY=y
CONFIG_INTEGRITY_SIGNATURE=y
CONFIG_INTEGRITY_AUDIT=y
# CONFIG_INTEGRITY_ASYMMETRIC_KEYS is not set
# CONFIG_IMA is not set
CONFIG_EVM=y
CONFIG_EVM_HMAC_VERSION=2
# CONFIG_DEFAULT_SECURITY_SELINUX is not set
# CONFIG_DEFAULT_SECURITY_SMACK is not set
# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
CONFIG_DEFAULT_SECURITY_APPARMOR=y
# CONFIG_DEFAULT_SECURITY_YAMA is not set
# CONFIG_DEFAULT_SECURITY_DAC is not set
CONFIG_DEFAULT_SECURITY="apparmor"
CONFIG_XOR_BLOCKS=m
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_PCOMP2=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
# CONFIG_CRYPTO_USER is not set
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
CONFIG_CRYPTO_GF128MUL=m
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_PCRYPT is not set
CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_CRYPTO_CRYPTD=m
# CONFIG_CRYPTO_AUTHENC is not set
# CONFIG_CRYPTO_TEST is not set
CONFIG_CRYPTO_ABLK_HELPER_X86=m
CONFIG_CRYPTO_GLUE_HELPER_X86=m

#
# Authenticated Encryption with Associated Data
#
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_SEQIV is not set

#
# Block modes
#
CONFIG_CRYPTO_CBC=y
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_LRW=m
# CONFIG_CRYPTO_PCBC is not set
CONFIG_CRYPTO_XTS=m

#
# Hash modes
#
# CONFIG_CRYPTO_CMAC is not set
CONFIG_CRYPTO_HMAC=y
# CONFIG_CRYPTO_XCBC is not set
# CONFIG_CRYPTO_VMAC is not set

#
# Digest
#
CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_CRC32C_INTEL=y
# CONFIG_CRYPTO_CRC32 is not set
# CONFIG_CRYPTO_CRC32_PCLMUL is not set
# CONFIG_CRYPTO_GHASH is not set
# CONFIG_CRYPTO_MD4 is not set
CONFIG_CRYPTO_MD5=y
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_RMD128 is not set
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_RMD256 is not set
# CONFIG_CRYPTO_RMD320 is not set
CONFIG_CRYPTO_SHA1=y
# CONFIG_CRYPTO_SHA1_SSSE3 is not set
# CONFIG_CRYPTO_SHA256_SSSE3 is not set
# CONFIG_CRYPTO_SHA512_SSSE3 is not set
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_WP512 is not set
CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m

#
# Ciphers
#
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_AES_X86_64=m
CONFIG_CRYPTO_AES_NI_INTEL=m
# CONFIG_CRYPTO_ANUBIS is not set
CONFIG_CRYPTO_ARC4=m
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_BLOWFISH_X86_64 is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAMELLIA_X86_64 is not set
# CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64 is not set
# CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64 is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST5_AVX_X86_64 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_CAST6_AVX_X86_64 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_SALSA20_X86_64 is not set
# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_SERPENT_SSE2_X86_64 is not set
# CONFIG_CRYPTO_SERPENT_AVX_X86_64 is not set
# CONFIG_CRYPTO_SERPENT_AVX2_X86_64 is not set
# CONFIG_CRYPTO_TEA is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
# CONFIG_CRYPTO_TWOFISH_X86_64_3WAY is not set
# CONFIG_CRYPTO_TWOFISH_AVX_X86_64 is not set

#
# Compression
#
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_ZLIB is not set
CONFIG_CRYPTO_LZO=y
# CONFIG_CRYPTO_LZ4 is not set
# CONFIG_CRYPTO_LZ4HC is not set

#
# Random Number Generation
#
# CONFIG_CRYPTO_ANSI_CPRNG is not set
# CONFIG_CRYPTO_USER_API_HASH is not set
# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
CONFIG_CRYPTO_HW=y
CONFIG_CRYPTO_DEV_PADLOCK=y
# CONFIG_CRYPTO_DEV_PADLOCK_AES is not set
# CONFIG_CRYPTO_DEV_PADLOCK_SHA is not set
CONFIG_ASYMMETRIC_KEY_TYPE=y
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
CONFIG_PUBLIC_KEY_ALGO_RSA=y
CONFIG_X509_CERTIFICATE_PARSER=y
CONFIG_HAVE_KVM=y
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_HAVE_KVM_IRQ_ROUTING=y
CONFIG_HAVE_KVM_EVENTFD=y
CONFIG_KVM_APIC_ARCHITECTURE=y
CONFIG_KVM_MMIO=y
CONFIG_KVM_ASYNC_PF=y
CONFIG_HAVE_KVM_MSI=y
CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
# CONFIG_KVM_AMD is not set
# CONFIG_KVM_MMU_AUDIT is not set
CONFIG_KVM_DEVICE_ASSIGNMENT=y
CONFIG_BINARY_PRINTF=y

#
# Library routines
#
CONFIG_RAID6_PQ=m
CONFIG_BITREVERSE=y
CONFIG_GENERIC_STRNCPY_FROM_USER=y
CONFIG_GENERIC_STRNLEN_USER=y
CONFIG_GENERIC_NET_UTILS=y
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_IO=y
CONFIG_PERCPU_RWSEM=y
# CONFIG_CRC_CCITT is not set
CONFIG_CRC16=y
CONFIG_CRC_T10DIF=y
CONFIG_CRC_ITU_T=m
CONFIG_CRC32=y
# CONFIG_CRC32_SELFTEST is not set
CONFIG_CRC32_SLICEBY8=y
# CONFIG_CRC32_SLICEBY4 is not set
# CONFIG_CRC32_SARWATE is not set
# CONFIG_CRC32_BIT is not set
# CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=m
# CONFIG_CRC8 is not set
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=m
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_XZ_DEC=y
CONFIG_XZ_DEC_X86=y
CONFIG_XZ_DEC_POWERPC=y
CONFIG_XZ_DEC_IA64=y
CONFIG_XZ_DEC_ARM=y
CONFIG_XZ_DEC_ARMTHUMB=y
CONFIG_XZ_DEC_SPARC=y
CONFIG_XZ_DEC_BCJ=y
# CONFIG_XZ_DEC_TEST is not set
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_DECOMPRESS_XZ=y
CONFIG_DECOMPRESS_LZO=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_CPU_RMAP=y
CONFIG_DQL=y
CONFIG_NLATTR=y
CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
CONFIG_AVERAGE=y
CONFIG_CLZ_TAB=y
# CONFIG_CORDIC is not set
CONFIG_DDR=y
CONFIG_MPILIB=y
CONFIG_SIGNATURE=y
CONFIG_OID_REGISTRY=y
CONFIG_UCS2_STRING=y
CONFIG_FONT_SUPPORT=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y

[-- Attachment #4: runltplite_3.11.0-rc3-1-aio-small.txt.gz --]
[-- Type: application/x-gzip, Size: 44545 bytes --]

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-07-30 21:28 ` [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Andrew Morton
  2013-07-31  0:43   ` Dave Chinner
@ 2013-07-31  9:51   ` Maxim Patlasov
  1 sibling, 0 replies; 72+ messages in thread
From: Maxim Patlasov @ 2013-07-31  9:51 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Dave Kleikamp, linux-kernel, linux-fsdevel, Zach Brown

07/31/2013 01:28 AM, Andrew Morton пишет:
> On Thu, 25 Jul 2013 12:50:26 -0500 Dave Kleikamp <dave.kleikamp@oracle.com> wrote:
>
>> This patch series adds a kernel interface to fs/aio.c so that kernel code can
>> issue concurrent asynchronous IO to file systems.  It adds an aio command and
>> file system methods which specify io memory with pages instead of userspace
>> addresses.
>>
>> This series was written to reduce the current overhead loop imposes by
>> performing synchronus buffered file system IO from a kernel thread.  These
>> patches turn loop into a light weight layer that translates bios into iocbs.
> Do you have any performance numbers?
>
> Does anyone care much about loop performance?  What's the value here?
>
>

OpenVZ uses loopback-device to keep per-container filesystems. We care 
much about overhead introduced by loop: IO-bound applications run on top 
of per-container filesystem shouldn't perform worse than on top of host 
filesystem. So the value for us is zero overhead.

Thanks,
Maxim

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-07-31  8:41       ` Sedat Dilek
@ 2013-07-31 11:22         ` Sedat Dilek
  0 siblings, 0 replies; 72+ messages in thread
From: Sedat Dilek @ 2013-07-31 11:22 UTC (permalink / raw)
  To: Dave Chinner, Dave Kleikamp
  Cc: Andrew Morton, linux-kernel, linux-fsdevel, Maxim V. Patlasov,
	Zach Brown, Stephen Rothwell, Al Viro

[-- Attachment #1: Type: text/plain, Size: 2359 bytes --]

On Wed, Jul 31, 2013 at 10:41 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Wed, Jul 31, 2013 at 8:40 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
>> On Wed, Jul 31, 2013 at 2:43 AM, Dave Chinner <david@fromorbit.com> wrote:
>>> On Tue, Jul 30, 2013 at 02:28:20PM -0700, Andrew Morton wrote:
>>>> On Thu, 25 Jul 2013 12:50:26 -0500 Dave Kleikamp <dave.kleikamp@oracle.com> wrote:
>>>>
>>>> > This patch series adds a kernel interface to fs/aio.c so that kernel code can
>>>> > issue concurrent asynchronous IO to file systems.  It adds an aio command and
>>>> > file system methods which specify io memory with pages instead of userspace
>>>> > addresses.
>>>> >
>>>> > This series was written to reduce the current overhead loop imposes by
>>>> > performing synchronus buffered file system IO from a kernel thread.  These
>>>> > patches turn loop into a light weight layer that translates bios into iocbs.
>>>>
>>>> Do you have any performance numbers?
>>>>
>>
>> [ CC Al and Linux-next maintainer ]
>>
>> The more important question how to test and then provide performance numbers.
>> If you give me a test-case I give you numbers!
>>
>>>> Does anyone care much about loop performance?  What's the value here?
>>>
>>> Yes. Anyone using loopback devices for file-backed devices exposed
>>> to containers and VMs cares about the memory and CPU overhead
>>> the double caching the existing loop device has.
>>>
>>
>> Yupp, I am here on Ubuntu/precise AMD64 in a so-called WUBI
>> environment which makes intensive usage of loopback-device plus FUSE
>> driver and $fs-of-your-choice (here: ext4).
>>
>> Today, I have pulled Dave's aio_loop GIT branch into v3.11-rc3.
>> After successful compilation I am running it right now.
>>
>> I had also tested v6 of the series [1] from February 2013 and
>> encouraged Dave to put it into Linux-next [2].
>> Unfortunately, there was no response from Al.
>> Again, Dave try to get it into Linux-next!
>>
>
> I have run runltp-lite from latest stable LTP (ltp-full-20130109), but
> this reports errors.
> I will see later if this happens with a vanilla v3.11-rc3.
>

These results look similiar, so aio_loop stuff seems to be OK.

- Sedat -

> See also attached files.
>
> - Sedat -
>
>> - Sedat -
>>
>> [1] http://marc.info/?t=135947707100013&r=1&w=4
>> [2] http://marc.info/?l=linux-fsdevel&m=136122569807203&w=4

[-- Attachment #2: runltplite_3.11.0-rc3-1-iniza-small.txt.gz --]
[-- Type: application/x-gzip, Size: 44536 bytes --]

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (33 preceding siblings ...)
  2013-07-30 21:28 ` [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Andrew Morton
@ 2013-08-01  8:58 ` Christoph Hellwig
  2013-08-01 13:04   ` Dave Kleikamp
  2013-08-20 13:00 ` Christoph Hellwig
                   ` (2 subsequent siblings)
  37 siblings, 1 reply; 72+ messages in thread
From: Christoph Hellwig @ 2013-08-01  8:58 UTC (permalink / raw)
  To: Dave Kleikamp
  Cc: linux-kernel, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown

What should be added to this support is to move the swap over nfs code
over to this interface instead of the utterly bogus
KERNEL_READ/KERNEL_WRITE hacks that were added for it.


^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-08-01  8:58 ` Christoph Hellwig
@ 2013-08-01 13:04   ` Dave Kleikamp
  2013-08-02 10:48     ` Christoph Hellwig
  0 siblings, 1 reply; 72+ messages in thread
From: Dave Kleikamp @ 2013-08-01 13:04 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-kernel, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown

On 08/01/2013 03:58 AM, Christoph Hellwig wrote:
> What should be added to this support is to move the swap over nfs code
> over to this interface instead of the utterly bogus
> KERNEL_READ/KERNEL_WRITE hacks that were added for it.

That's patch 24/33 nfs: simplify swap

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-08-01 13:04   ` Dave Kleikamp
@ 2013-08-02 10:48     ` Christoph Hellwig
  0 siblings, 0 replies; 72+ messages in thread
From: Christoph Hellwig @ 2013-08-02 10:48 UTC (permalink / raw)
  To: Dave Kleikamp
  Cc: Christoph Hellwig, linux-kernel, linux-fsdevel, Andrew Morton,
	Maxim V. Patlasov, Zach Brown

On Thu, Aug 01, 2013 at 08:04:24AM -0500, Dave Kleikamp wrote:
> On 08/01/2013 03:58 AM, Christoph Hellwig wrote:
> > What should be added to this support is to move the swap over nfs code
> > over to this interface instead of the utterly bogus
> > KERNEL_READ/KERNEL_WRITE hacks that were added for it.
> 
> That's patch 24/33 nfs: simplify swap

Sorry, missed it somehow.  Thanks for doing this work, and removing that
wart alone is absolutely worth merging this patchset.

For the future we should look into enabling this for swap in general
and removing the slightly less cludge currently used for swapfiles.

Especially btrfs should benefit greatly from that.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (34 preceding siblings ...)
  2013-08-01  8:58 ` Christoph Hellwig
@ 2013-08-20 13:00 ` Christoph Hellwig
  2013-08-20 19:13   ` Dave Kleikamp
  2013-08-20 22:46   ` Andrew Morton
  2013-08-21 13:02 ` Benjamin LaHaise
  2014-12-31 20:38 ` Sedat Dilek
  37 siblings, 2 replies; 72+ messages in thread
From: Christoph Hellwig @ 2013-08-20 13:00 UTC (permalink / raw)
  To: Dave Kleikamp
  Cc: linux-kernel, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown

As I've seen very few replies to this:  how do we ensure this gets
picked up for the 3.12 merge window?  The series has been a reposted
a few times without complaints or major changes, but the ball still
doesn't seem to get rolling.

I'd really like to do some ecryptfs and scsi target work that is going
to rely on this soon.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-08-20 13:00 ` Christoph Hellwig
@ 2013-08-20 19:13   ` Dave Kleikamp
  2013-08-21  0:14     ` Stephen Rothwell
  2013-08-20 22:46   ` Andrew Morton
  1 sibling, 1 reply; 72+ messages in thread
From: Dave Kleikamp @ 2013-08-20 19:13 UTC (permalink / raw)
  To: Christoph Hellwig, Stephen Rothwell
  Cc: LKML, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown, Linux-Next

Stephen,
Would you be willing to pick up
git://github.com/kleikamp/linux-shaggy.git for-next
into linux-next?

There will be some unclean merges, and I can send you updated patches
created against your latest tree. I'm not exactly sure of your process
wrt cleaning up merges, but I guess they would help.

Thanks,
Shaggy

On 08/20/2013 08:00 AM, Christoph Hellwig wrote:
> As I've seen very few replies to this:  how do we ensure this gets
> picked up for the 3.12 merge window?  The series has been a reposted
> a few times without complaints or major changes, but the ball still
> doesn't seem to get rolling.
> 
> I'd really like to do some ecryptfs and scsi target work that is going
> to rely on this soon.
> 

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-08-20 13:00 ` Christoph Hellwig
  2013-08-20 19:13   ` Dave Kleikamp
@ 2013-08-20 22:46   ` Andrew Morton
  1 sibling, 0 replies; 72+ messages in thread
From: Andrew Morton @ 2013-08-20 22:46 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Dave Kleikamp, linux-kernel, linux-fsdevel, Maxim V. Patlasov,
	Zach Brown, Stephen Rothwell

On Tue, 20 Aug 2013 06:00:56 -0700 Christoph Hellwig <hch@infradead.org> wrote:

> As I've seen very few replies to this:  how do we ensure this gets
> picked up for the 3.12 merge window?  The series has been a reposted
> a few times without complaints or major changes,

That's probably a sign that nobody bothered reading it all :( The
smattering of acks in there is not encouraging.

Please add Sedat's Tested-by (thanks!)

Please add performance test results.

Mel, do you have any swap-over-nfs test cases which should be performed?

Dave, what sort of correctness/robustness tests have you been running?

Yes, I guess it's not a bad idea to get this into -next, but it does
seem to have been pretty low-profile...

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-08-20 19:13   ` Dave Kleikamp
@ 2013-08-21  0:14     ` Stephen Rothwell
  2013-08-21  5:35       ` Sedat Dilek
  0 siblings, 1 reply; 72+ messages in thread
From: Stephen Rothwell @ 2013-08-21  0:14 UTC (permalink / raw)
  To: Dave Kleikamp
  Cc: Christoph Hellwig, LKML, linux-fsdevel, Andrew Morton,
	Maxim V. Patlasov, Zach Brown, Linux-Next

[-- Attachment #1: Type: text/plain, Size: 2961 bytes --]

Hi Dave,

On Tue, 20 Aug 2013 14:13:15 -0500 Dave Kleikamp <dave.kleikamp@oracle.com> wrote:
>
> Would you be willing to pick up
> git://github.com/kleikamp/linux-shaggy.git for-next
> into linux-next?

I have added that from today.

> There will be some unclean merges, and I can send you updated patches
> created against your latest tree. I'm not exactly sure of your process
> wrt cleaning up merges, but I guess they would help.

Since I will merge your tree into linux-next, I only need to fix merge
conflicts, so while those patches can be a guide, they are mostly not
needed.

> On 08/20/2013 08:00 AM, Christoph Hellwig wrote:
> > As I've seen very few replies to this:  how do we ensure this gets
> > picked up for the 3.12 merge window?  The series has been a reposted
> > a few times without complaints or major changes, but the ball still
> > doesn't seem to get rolling.
> > 
> > I'd really like to do some ecryptfs and scsi target work that is going
> > to rely on this soon.

If this happens, then it is important that your (Dave's) tree is not
rebased/rewritten and that any other tree that depend on it merges your
tree.

I will merge your tree relatively early, that way the merge conflicts will
be spread over several other merges and hopefully each be fairly minor.

I gave called your tree "aio-direct", please let me know fi you think
there is a better name.

Thanks for adding your subsystem tree as a participant of linux-next.  As
you may know, this is not a judgment of your code.  The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window. 

You will need to ensure that the patches/commits in your tree/series have
been:
     * submitted under GPL v2 (or later) and include the Contributor's
	Signed-off-by,
     * posted to the relevant mailing list,
     * reviewed by you (or another maintainer of your subsystem tree),
     * successfully unit tested, and 
     * destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him
to fetch).  It is allowed to be rebased if you deem it necessary.

-- 
Cheers,
Stephen Rothwell 
sfr@canb.auug.org.au

Legal Stuff:
By participating in linux-next, your subsystem tree contributions are
public and will be included in the linux-next trees.  You may be sent
e-mail messages indicating errors or other issues when the
patches/commits from your subsystem tree are merged and tested in
linux-next.  These messages may also be cross-posted to the linux-next
mailing list, the linux-kernel mailing list, etc.  The linux-next tree
project and IBM (my employer) make no warranties regarding the linux-next
project, the testing procedures, the results, the e-mails, etc.  If you
don't agree to these ground rules, let me know and I'll remove your tree
from participation in linux-next.

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-08-21  0:14     ` Stephen Rothwell
@ 2013-08-21  5:35       ` Sedat Dilek
  0 siblings, 0 replies; 72+ messages in thread
From: Sedat Dilek @ 2013-08-21  5:35 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Kleikamp, Christoph Hellwig, LKML, linux-fsdevel,
	Andrew Morton, Maxim V. Patlasov, Zach Brown, Linux-Next

On Wed, Aug 21, 2013 at 2:14 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Dave,
>
> On Tue, 20 Aug 2013 14:13:15 -0500 Dave Kleikamp <dave.kleikamp@oracle.com> wrote:
>>
>> Would you be willing to pick up
>> git://github.com/kleikamp/linux-shaggy.git for-next
>> into linux-next?
>
> I have added that from today.
>
>> There will be some unclean merges, and I can send you updated patches
>> created against your latest tree. I'm not exactly sure of your process
>> wrt cleaning up merges, but I guess they would help.
>
> Since I will merge your tree into linux-next, I only need to fix merge
> conflicts, so while those patches can be a guide, they are mostly not
> needed.
>
>> On 08/20/2013 08:00 AM, Christoph Hellwig wrote:
>> > As I've seen very few replies to this:  how do we ensure this gets
>> > picked up for the 3.12 merge window?  The series has been a reposted
>> > a few times without complaints or major changes, but the ball still
>> > doesn't seem to get rolling.
>> >
>> > I'd really like to do some ecryptfs and scsi target work that is going
>> > to rely on this soon.
>
> If this happens, then it is important that your (Dave's) tree is not
> rebased/rewritten and that any other tree that depend on it merges your
> tree.
>
> I will merge your tree relatively early, that way the merge conflicts will
> be spread over several other merges and hopefully each be fairly minor.
>
> I gave called your tree "aio-direct", please let me know fi you think
> there is a better name.
>

Cool, to see Dave's work in Linux-next!

Dave named his GIT branch "aio_loop".
( If you (Stephen) prefer "hyphen" for your GIT branches, use
"aio-loop", but that's up to the Dave. )

Anyway, I am glad to see this getting pushed.

( Hmmm, OverlayFS
..................................................................................................................).

- Sedat -

[1] https://github.com/kleikamp/linux-shaggy/tree/aio_loop

> Thanks for adding your subsystem tree as a participant of linux-next.  As
> you may know, this is not a judgment of your code.  The purpose of
> linux-next is for integration testing and to lower the impact of
> conflicts between subsystems in the next merge window.
>
> You will need to ensure that the patches/commits in your tree/series have
> been:
>      * submitted under GPL v2 (or later) and include the Contributor's
>         Signed-off-by,
>      * posted to the relevant mailing list,
>      * reviewed by you (or another maintainer of your subsystem tree),
>      * successfully unit tested, and
>      * destined for the current or next Linux merge window.
>
> Basically, this should be just what you would send to Linus (or ask him
> to fetch).  It is allowed to be rebased if you deem it necessary.
>
> --
> Cheers,
> Stephen Rothwell
> sfr@canb.auug.org.au
>
> Legal Stuff:
> By participating in linux-next, your subsystem tree contributions are
> public and will be included in the linux-next trees.  You may be sent
> e-mail messages indicating errors or other issues when the
> patches/commits from your subsystem tree are merged and tested in
> linux-next.  These messages may also be cross-posted to the linux-next
> mailing list, the linux-kernel mailing list, etc.  The linux-next tree
> project and IBM (my employer) make no warranties regarding the linux-next
> project, the testing procedures, the results, the e-mails, etc.  If you
> don't agree to these ground rules, let me know and I'll remove your tree
> from participation in linux-next.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (35 preceding siblings ...)
  2013-08-20 13:00 ` Christoph Hellwig
@ 2013-08-21 13:02 ` Benjamin LaHaise
  2013-08-21 16:30   ` Dave Kleikamp
                     ` (2 more replies)
  2014-12-31 20:38 ` Sedat Dilek
  37 siblings, 3 replies; 72+ messages in thread
From: Benjamin LaHaise @ 2013-08-21 13:02 UTC (permalink / raw)
  To: Dave Kleikamp
  Cc: linux-kernel, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown, linux-aio

Hello Dave,

On Thu, Jul 25, 2013 at 12:50:26PM -0500, Dave Kleikamp wrote:
> This patch series adds a kernel interface to fs/aio.c so that kernel code can
> issue concurrent asynchronous IO to file systems.  It adds an aio command and
> file system methods which specify io memory with pages instead of userspace
> addresses.

First off, have you tested that this series actually works when merged with 
the pending AIO changes from Kent?  There a git tree with those pending 
changes at git://git.kvack.org/~bcrl/aio-next.git , and they're in 
linux-next.

One of the major problems your changeset continues to carry is that your 
new read_iter/write_iter operations permit blocking (implicitely), which 
really isn't what we want for aio.  If you're going to introduce a new api, 
it should be made non-blocking, and enforce that non-blocking requirement 
(ie warn when read_iter/write_iter methods perform blockin operations, 
similar to the warnings when scheduling in atomic mode).  This means more 
changes for some filesystem code involved, something that people have been 
avoiding for years, but which really needs to be done.

		-ben

> This series was written to reduce the current overhead loop imposes by
> performing synchronus buffered file system IO from a kernel thread.  These
> patches turn loop into a light weight layer that translates bios into iocbs.
> 
> It introduces new file ops, read_iter() and write_iter(), that replace the
> aio_read() and aio_write() operations. The iov_iter structure can now contain
> either a user-space iovec or a kernel-space bio_vec. Since it would be
> overly complicated to replace every instance of aio_read() and aio_write(),
> the old operations are not removed, but file systems implementing the new
> ones need not keep the old ones.
> 
> Verion 8 is little changed from Version 7 that I send out in March, just
> updated to the latest kernel. These patches apply to 3.11-rc2 and can
> also be found at:
> 
> git://github.com/kleikamp/linux-shaggy.git aio_loop
> 
> Asias He (1):
>   block_dev: add support for read_iter, write_iter
> 
> Dave Kleikamp (22):
>   iov_iter: iov_iter_copy_from_user() should use non-atomic copy
>   iov_iter: add __iovec_copy_to_user()
>   fuse: convert fuse to use iov_iter_copy_[to|from]_user
>   iov_iter: ii_iovec_copy_to_user should pre-fault user pages
>   dio: Convert direct_IO to use iov_iter
>   dio: add bio_vec support to __blockdev_direct_IO()
>   aio: add aio_kernel_() interface
>   aio: add aio support for iov_iter arguments
>   fs: create file_readable() and file_writable() functions
>   fs: use read_iter and write_iter rather than aio_read and aio_write
>   fs: add read_iter and write_iter to several file systems
>   ocfs2: add support for read_iter and  write_iter
>   ext4: add support for read_iter and write_iter
>   nfs: add support for read_iter, write_iter
>   nfs: simplify swap
>   btrfs: add support for read_iter and write_iter
>   xfs: add support for read_iter and write_iter
>   gfs2: Convert aio_read/write ops to read/write_iter
>   udf: convert file ops from aio_read/write to read/write_iter
>   afs: add support for read_iter and write_iter
>   ecrpytfs: Convert aio_read/write ops to read/write_iter
>   ubifs: convert file ops from aio_read/write to read/write_iter
> 
> Hugh Dickins (1):
>   tmpfs: add support for read_iter and write_iter
> 
> Zach Brown (9):
>   iov_iter: move into its own file
>   iov_iter: add copy_to_user support
>   iov_iter: hide iovec details behind ops function pointers
>   iov_iter: add bvec support
>   iov_iter: add a shorten call
>   iov_iter: let callers extract iovecs and bio_vecs
>   fs: pull iov_iter use higher up the stack
>   bio: add bvec_length(), like iov_length()
>   loop: use aio to perform io on the underlying file
> 
>  Documentation/filesystems/Locking   |   6 +-
>  Documentation/filesystems/vfs.txt   |  12 +-
>  drivers/block/loop.c                | 148 ++++++++----
>  drivers/char/raw.c                  |   4 +-
>  drivers/mtd/nand/nandsim.c          |   4 +-
>  drivers/usb/gadget/storage_common.c |   4 +-
>  fs/9p/vfs_addr.c                    |  12 +-
>  fs/9p/vfs_file.c                    |   8 +-
>  fs/Makefile                         |   2 +-
>  fs/adfs/file.c                      |   4 +-
>  fs/affs/file.c                      |   4 +-
>  fs/afs/file.c                       |   4 +-
>  fs/afs/internal.h                   |   3 +-
>  fs/afs/write.c                      |   9 +-
>  fs/aio.c                            | 152 ++++++++++++-
>  fs/bad_inode.c                      |  14 ++
>  fs/bfs/file.c                       |   4 +-
>  fs/block_dev.c                      |  27 ++-
>  fs/btrfs/file.c                     |  42 ++--
>  fs/btrfs/inode.c                    |  63 +++---
>  fs/ceph/addr.c                      |   3 +-
>  fs/cifs/file.c                      |   4 +-
>  fs/direct-io.c                      | 223 +++++++++++++------
>  fs/ecryptfs/file.c                  |  15 +-
>  fs/exofs/file.c                     |   4 +-
>  fs/ext2/file.c                      |   4 +-
>  fs/ext2/inode.c                     |   8 +-
>  fs/ext3/file.c                      |   4 +-
>  fs/ext3/inode.c                     |  15 +-
>  fs/ext4/ext4.h                      |   3 +-
>  fs/ext4/file.c                      |  34 +--
>  fs/ext4/indirect.c                  |  16 +-
>  fs/ext4/inode.c                     |  23 +-
>  fs/f2fs/data.c                      |   4 +-
>  fs/f2fs/file.c                      |   4 +-
>  fs/fat/file.c                       |   4 +-
>  fs/fat/inode.c                      |  10 +-
>  fs/fuse/cuse.c                      |  10 +-
>  fs/fuse/file.c                      |  90 ++++----
>  fs/fuse/fuse_i.h                    |   5 +-
>  fs/gfs2/aops.c                      |   7 +-
>  fs/gfs2/file.c                      |  21 +-
>  fs/hfs/inode.c                      |  11 +-
>  fs/hfsplus/inode.c                  |  10 +-
>  fs/hostfs/hostfs_kern.c             |   4 +-
>  fs/hpfs/file.c                      |   4 +-
>  fs/internal.h                       |   4 +
>  fs/iov-iter.c                       | 411 ++++++++++++++++++++++++++++++++++
>  fs/jffs2/file.c                     |   8 +-
>  fs/jfs/file.c                       |   4 +-
>  fs/jfs/inode.c                      |   7 +-
>  fs/logfs/file.c                     |   4 +-
>  fs/minix/file.c                     |   4 +-
>  fs/nfs/direct.c                     | 302 ++++++++++++++++---------
>  fs/nfs/file.c                       |  33 ++-
>  fs/nfs/internal.h                   |   4 +-
>  fs/nfs/nfs4file.c                   |   4 +-
>  fs/nilfs2/file.c                    |   4 +-
>  fs/nilfs2/inode.c                   |   8 +-
>  fs/ocfs2/aops.c                     |   8 +-
>  fs/ocfs2/aops.h                     |   2 +-
>  fs/ocfs2/file.c                     |  55 ++---
>  fs/ocfs2/ocfs2_trace.h              |   6 +-
>  fs/omfs/file.c                      |   4 +-
>  fs/ramfs/file-mmu.c                 |   4 +-
>  fs/ramfs/file-nommu.c               |   4 +-
>  fs/read_write.c                     |  78 +++++--
>  fs/reiserfs/file.c                  |   4 +-
>  fs/reiserfs/inode.c                 |   7 +-
>  fs/romfs/mmap-nommu.c               |   2 +-
>  fs/sysv/file.c                      |   4 +-
>  fs/ubifs/file.c                     |  12 +-
>  fs/udf/file.c                       |  13 +-
>  fs/udf/inode.c                      |  10 +-
>  fs/ufs/file.c                       |   4 +-
>  fs/xfs/xfs_aops.c                   |  13 +-
>  fs/xfs/xfs_file.c                   |  51 ++---
>  include/linux/aio.h                 |  20 +-
>  include/linux/bio.h                 |   8 +
>  include/linux/blk_types.h           |   2 -
>  include/linux/fs.h                  | 165 ++++++++++++--
>  include/linux/nfs_fs.h              |  13 +-
>  include/uapi/linux/aio_abi.h        |   2 +
>  include/uapi/linux/loop.h           |   1 +
>  mm/filemap.c                        | 433 ++++++++++++++----------------------
>  mm/page_io.c                        |  15 +-
>  mm/shmem.c                          |  61 ++---
>  87 files changed, 1862 insertions(+), 1002 deletions(-)
>  create mode 100644 fs/iov-iter.c
> 
> -- 
> 1.8.3.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
"Thought is the essence of where you are now."

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 15/33] aio: add aio support for iov_iter arguments
  2013-07-25 17:50 ` [PATCH V8 15/33] aio: add aio support for iov_iter arguments Dave Kleikamp
@ 2013-08-21 13:55   ` Benjamin LaHaise
  2013-08-30 20:05     ` Dave Kleikamp
  0 siblings, 1 reply; 72+ messages in thread
From: Benjamin LaHaise @ 2013-08-21 13:55 UTC (permalink / raw)
  To: Dave Kleikamp
  Cc: linux-kernel, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown

On Thu, Jul 25, 2013 at 12:50:41PM -0500, Dave Kleikamp wrote:
> This adds iocb cmds which specify that memory is held in iov_iter
> structures.  This lets kernel callers specify memory that can be
> expressed in an iov_iter, which includes pages in bio_vec arrays.
> 
> Only kernel callers can provide an iov_iter so it doesn't make a lot of
> sense to expose the IOCB_CMD values for this as part of the user space
> ABI.

I don't think adding the IOCB_CMD_{READ,WRITE}_ITER operations to 
include/uapi/linux/aio_abi.h is the right thing to do here -- they're 
never going to be used by userland, and care certainly not part of the 
abi we're presenting to userland.  I'd suggest moving these opcodes to 
include/linux/aio.h.  Also, if you make the values > 16 bits, userland 
will never be able to pass them in inadvertently (although things look 
okay if that does happen at present).

		-ben

> But kernel callers should also be able to perform the usual aio
> operations which suggests using the the existing operation namespace and
> support code.
> 
> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
> Cc: Zach Brown <zab@zabbo.net>
> ---
>  fs/aio.c                     | 67 ++++++++++++++++++++++++++++++++++++++++++++
>  include/linux/aio.h          |  3 ++
>  include/uapi/linux/aio_abi.h |  2 ++
>  3 files changed, 72 insertions(+)
> 
> diff --git a/fs/aio.c b/fs/aio.c
> index c65ba13..0da82c0 100644
> --- a/fs/aio.c
> +++ b/fs/aio.c
> @@ -991,6 +991,48 @@ static ssize_t aio_setup_single_vector(int rw, struct kiocb *kiocb)
>  	return 0;
>  }
>  
> +static ssize_t aio_read_iter(struct kiocb *iocb)
> +{
> +	struct file *file = iocb->ki_filp;
> +	ssize_t ret;
> +
> +	if (unlikely(!is_kernel_kiocb(iocb)))
> +		return -EINVAL;
> +
> +	if (unlikely(!(file->f_mode & FMODE_READ)))
> +		return -EBADF;
> +
> +	ret = security_file_permission(file, MAY_READ);
> +	if (unlikely(ret))
> +		return ret;
> +
> +	if (!file->f_op->read_iter)
> +		return -EINVAL;
> +
> +	return file->f_op->read_iter(iocb, iocb->ki_iter, iocb->ki_pos);
> +}
> +
> +static ssize_t aio_write_iter(struct kiocb *iocb)
> +{
> +	struct file *file = iocb->ki_filp;
> +	ssize_t ret;
> +
> +	if (unlikely(!is_kernel_kiocb(iocb)))
> +		return -EINVAL;
> +
> +	if (unlikely(!(file->f_mode & FMODE_WRITE)))
> +		return -EBADF;
> +
> +	ret = security_file_permission(file, MAY_WRITE);
> +	if (unlikely(ret))
> +		return ret;
> +
> +	if (!file->f_op->write_iter)
> +		return -EINVAL;
> +
> +	return file->f_op->write_iter(iocb, iocb->ki_iter, iocb->ki_pos);
> +}
> +
>  /*
>   * aio_setup_iocb:
>   *	Performs the initial checks and aio retry method
> @@ -1042,6 +1084,14 @@ rw_common:
>  		ret = aio_rw_vect_retry(req, rw, rw_op);
>  		break;
>  
> +	case IOCB_CMD_READ_ITER:
> +		ret = aio_read_iter(req);
> +		break;
> +
> +	case IOCB_CMD_WRITE_ITER:
> +		ret = aio_write_iter(req);
> +		break;
> +
>  	case IOCB_CMD_FDSYNC:
>  		if (!file->f_op->aio_fsync)
>  			return -EINVAL;
> @@ -1116,6 +1166,23 @@ void aio_kernel_init_rw(struct kiocb *iocb, struct file *filp,
>  }
>  EXPORT_SYMBOL_GPL(aio_kernel_init_rw);
>  
> +/*
> + * The iter count must be set before calling here.  Some filesystems uses
> + * iocb->ki_left as an indicator of the size of an IO.
> + */
> +void aio_kernel_init_iter(struct kiocb *iocb, struct file *filp,
> +			  unsigned short op, struct iov_iter *iter, loff_t off)
> +{
> +	iocb->ki_filp = filp;
> +	iocb->ki_iter = iter;
> +	iocb->ki_opcode = op;
> +	iocb->ki_pos = off;
> +	iocb->ki_nbytes = iov_iter_count(iter);
> +	iocb->ki_left = iocb->ki_nbytes;
> +	iocb->ki_ctx = (void *)-1;
> +}
> +EXPORT_SYMBOL_GPL(aio_kernel_init_iter);
> +
>  void aio_kernel_init_callback(struct kiocb *iocb,
>  			      void (*complete)(u64 user_data, long res),
>  			      u64 user_data)
> diff --git a/include/linux/aio.h b/include/linux/aio.h
> index 014a75d..64d059d 100644
> --- a/include/linux/aio.h
> +++ b/include/linux/aio.h
> @@ -66,6 +66,7 @@ struct kiocb {
>  	 * this is the underlying eventfd context to deliver events to.
>  	 */
>  	struct eventfd_ctx	*ki_eventfd;
> +	struct iov_iter		*ki_iter;
>  };
>  
>  static inline bool is_sync_kiocb(struct kiocb *kiocb)
> @@ -102,6 +103,8 @@ struct kiocb *aio_kernel_alloc(gfp_t gfp);
>  void aio_kernel_free(struct kiocb *iocb);
>  void aio_kernel_init_rw(struct kiocb *iocb, struct file *filp,
>  			unsigned short op, void *ptr, size_t nr, loff_t off);
> +void aio_kernel_init_iter(struct kiocb *iocb, struct file *filp,
> +			  unsigned short op, struct iov_iter *iter, loff_t off);
>  void aio_kernel_init_callback(struct kiocb *iocb,
>  			      void (*complete)(u64 user_data, long res),
>  			      u64 user_data);
> diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h
> index bb2554f..22ce4bd 100644
> --- a/include/uapi/linux/aio_abi.h
> +++ b/include/uapi/linux/aio_abi.h
> @@ -44,6 +44,8 @@ enum {
>  	IOCB_CMD_NOOP = 6,
>  	IOCB_CMD_PREADV = 7,
>  	IOCB_CMD_PWRITEV = 8,
> +	IOCB_CMD_READ_ITER = 9,
> +	IOCB_CMD_WRITE_ITER = 10,
>  };
>  
>  /*
> -- 
> 1.8.3.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
"Thought is the essence of where you are now."

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-08-21 13:02 ` Benjamin LaHaise
@ 2013-08-21 16:30   ` Dave Kleikamp
  2013-08-21 16:39     ` Benjamin LaHaise
  2013-08-21 19:30   ` Andrew Morton
  2013-10-14 15:07   ` Christoph Hellwig
  2 siblings, 1 reply; 72+ messages in thread
From: Dave Kleikamp @ 2013-08-21 16:30 UTC (permalink / raw)
  To: Benjamin LaHaise
  Cc: linux-kernel, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown, linux-aio

Ben,
First, let me apologize for neglecting to copy you and linux-aio on the
applicable patches. I've been carrying along this patchset, assuming I
had gotten the proper cc's correct a while back, but I somehow missed
the aio pieces.

On 08/21/2013 08:02 AM, Benjamin LaHaise wrote:
> Hello Dave,
> 
> On Thu, Jul 25, 2013 at 12:50:26PM -0500, Dave Kleikamp wrote:
>> This patch series adds a kernel interface to fs/aio.c so that kernel code can
>> issue concurrent asynchronous IO to file systems.  It adds an aio command and
>> file system methods which specify io memory with pages instead of userspace
>> addresses.
> 
> First off, have you tested that this series actually works when merged with 
> the pending AIO changes from Kent?  There a git tree with those pending 
> changes at git://git.kvack.org/~bcrl/aio-next.git , and they're in 
> linux-next.

I've lightly tested the patchset against the linux-next tree, running a
fio job on loop-mounted filesystems of different fs types.

> One of the major problems your changeset continues to carry is that your 
> new read_iter/write_iter operations permit blocking (implicitely), which 
> really isn't what we want for aio.  If you're going to introduce a new api, 
> it should be made non-blocking, and enforce that non-blocking requirement 
> (ie warn when read_iter/write_iter methods perform blockin operations, 
> similar to the warnings when scheduling in atomic mode).  This means more 
> changes for some filesystem code involved, something that people have been 
> avoiding for years, but which really needs to be done.

I'm not really sure how the read_iter and write_iter operations are more
likely to block than the current aio_read and aio_write operations. Am I
missing something?

Thanks,
Dave

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-08-21 16:30   ` Dave Kleikamp
@ 2013-08-21 16:39     ` Benjamin LaHaise
  2013-08-21 17:12       ` Dave Kleikamp
  0 siblings, 1 reply; 72+ messages in thread
From: Benjamin LaHaise @ 2013-08-21 16:39 UTC (permalink / raw)
  To: Dave Kleikamp
  Cc: linux-kernel, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown, linux-aio

On Wed, Aug 21, 2013 at 11:30:22AM -0500, Dave Kleikamp wrote:
> Ben,
> First, let me apologize for neglecting to copy you and linux-aio on the
> applicable patches. I've been carrying along this patchset, assuming I
> had gotten the proper cc's correct a while back, but I somehow missed
> the aio pieces.

Thanks.  Let's figure out how to tackle this best.

> On 08/21/2013 08:02 AM, Benjamin LaHaise wrote:
...
> > First off, have you tested that this series actually works when merged with 
> > the pending AIO changes from Kent?  There a git tree with those pending 
> > changes at git://git.kvack.org/~bcrl/aio-next.git , and they're in 
> > linux-next.
> 
> I've lightly tested the patchset against the linux-next tree, running a
> fio job on loop-mounted filesystems of different fs types.

Good to hear.
> 
> > One of the major problems your changeset continues to carry is that your 
> > new read_iter/write_iter operations permit blocking (implicitely), which 
> > really isn't what we want for aio.  If you're going to introduce a new api, 
> > it should be made non-blocking, and enforce that non-blocking requirement 
> > (ie warn when read_iter/write_iter methods perform blockin operations, 
> > similar to the warnings when scheduling in atomic mode).  This means more 
> > changes for some filesystem code involved, something that people have been 
> > avoiding for years, but which really needs to be done.
> 
> I'm not really sure how the read_iter and write_iter operations are more
> likely to block than the current aio_read and aio_write operations. Am I
> missing something?

What you say is true, however, my point is more that it will be far easier 
to fix this issue by making it a hard constraint of a new API than it is 
to do a system-wide retrofit.  You're converting code over to use the new 
API one by one, so adding a little bit more work to try and finally sort 
out this issue while making those conversions would be vrey helpful.

I'm not saying that you should be required to write the code to cope with 
this additional requirement (I'm perfectly happy to help with that, and 
can probably get some time for that at $work), but more that if we're 
going to be changing all of the filesystems, we might as well try to get 
things right.

		-ben

> Thanks,
> Dave

-- 
"Thought is the essence of where you are now."

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-08-21 16:39     ` Benjamin LaHaise
@ 2013-08-21 17:12       ` Dave Kleikamp
  0 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-08-21 17:12 UTC (permalink / raw)
  To: Benjamin LaHaise
  Cc: linux-kernel, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown, linux-aio

On 08/21/2013 11:39 AM, Benjamin LaHaise wrote:
> On Wed, Aug 21, 2013 at 11:30:22AM -0500, Dave Kleikamp wrote:
>> Ben,
>> First, let me apologize for neglecting to copy you and linux-aio on the
>> applicable patches. I've been carrying along this patchset, assuming I
>> had gotten the proper cc's correct a while back, but I somehow missed
>> the aio pieces.
> 
> Thanks.  Let's figure out how to tackle this best.
> 
>> On 08/21/2013 08:02 AM, Benjamin LaHaise wrote:
> ...
>>> First off, have you tested that this series actually works when merged with 
>>> the pending AIO changes from Kent?  There a git tree with those pending 
>>> changes at git://git.kvack.org/~bcrl/aio-next.git , and they're in 
>>> linux-next.
>>
>> I've lightly tested the patchset against the linux-next tree, running a
>> fio job on loop-mounted filesystems of different fs types.
> 
> Good to hear.
>>
>>> One of the major problems your changeset continues to carry is that your 
>>> new read_iter/write_iter operations permit blocking (implicitely), which 
>>> really isn't what we want for aio.  If you're going to introduce a new api, 
>>> it should be made non-blocking, and enforce that non-blocking requirement 
>>> (ie warn when read_iter/write_iter methods perform blockin operations, 
>>> similar to the warnings when scheduling in atomic mode).  This means more 
>>> changes for some filesystem code involved, something that people have been 
>>> avoiding for years, but which really needs to be done.
>>
>> I'm not really sure how the read_iter and write_iter operations are more
>> likely to block than the current aio_read and aio_write operations. Am I
>> missing something?
> 
> What you say is true, however, my point is more that it will be far easier 
> to fix this issue by making it a hard constraint of a new API than it is 
> to do a system-wide retrofit.  You're converting code over to use the new 
> API one by one, so adding a little bit more work to try and finally sort 
> out this issue while making those conversions would be vrey helpful.
> 
> I'm not saying that you should be required to write the code to cope with 
> this additional requirement (I'm perfectly happy to help with that, and 
> can probably get some time for that at $work), but more that if we're 
> going to be changing all of the filesystems, we might as well try to get 
> things right.

I don't really intend to make the patchset any more complicated than it
already is. The read/write_iter operations are intended to be as near a
replacement as possible to aio_read/write with the added ability to deal
with both kernel and user pages. A completely non-blocking interface
would be great, but that's a bit of work I'd rather not have to wait
for. Maybe that requirement can be added later.

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-08-21 13:02 ` Benjamin LaHaise
  2013-08-21 16:30   ` Dave Kleikamp
@ 2013-08-21 19:30   ` Andrew Morton
  2013-08-21 20:24     ` Benjamin LaHaise
  2013-10-14 15:07   ` Christoph Hellwig
  2 siblings, 1 reply; 72+ messages in thread
From: Andrew Morton @ 2013-08-21 19:30 UTC (permalink / raw)
  To: Benjamin LaHaise
  Cc: Dave Kleikamp, linux-kernel, linux-fsdevel, Maxim V. Patlasov,
	Zach Brown, linux-aio

On Wed, 21 Aug 2013 09:02:31 -0400 Benjamin LaHaise <bcrl@kvack.org> wrote:

> One of the major problems your changeset continues to carry is that your 
> new read_iter/write_iter operations permit blocking (implicitely), which 
> really isn't what we want for aio.  If you're going to introduce a new api, 
> it should be made non-blocking, and enforce that non-blocking requirement 

It's been so incredibly long and I've forgotten everything AIO :(

In this context, "non-blocking" means no synchronous IO, yes?  Even for
indirect blocks, etc.  What about accidental D-state blockage in page
reclaim, or against random sleeping locks?

Also, why does this requirement exist?  "99% async" is not good enough?
How come?

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-08-21 19:30   ` Andrew Morton
@ 2013-08-21 20:24     ` Benjamin LaHaise
  0 siblings, 0 replies; 72+ messages in thread
From: Benjamin LaHaise @ 2013-08-21 20:24 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Dave Kleikamp, linux-kernel, linux-fsdevel, Maxim V. Patlasov,
	Zach Brown, linux-aio

On Wed, Aug 21, 2013 at 12:30:32PM -0700, Andrew Morton wrote:
> On Wed, 21 Aug 2013 09:02:31 -0400 Benjamin LaHaise <bcrl@kvack.org> wrote:
> 
> > One of the major problems your changeset continues to carry is that your 
> > new read_iter/write_iter operations permit blocking (implicitely), which 
> > really isn't what we want for aio.  If you're going to introduce a new api, 
> > it should be made non-blocking, and enforce that non-blocking requirement 
> 
> It's been so incredibly long and I've forgotten everything AIO :(
> 
> In this context, "non-blocking" means no synchronous IO, yes?  Even for
> indirect blocks, etc.  What about accidental D-state blockage in page
> reclaim, or against random sleeping locks?

Those are all no-nos.  Blocking for memory allocation for short durations 
is okay, but not for wandering off into scan-the-world type ordeals (that 
is, it should be avoided).

> Also, why does this requirement exist?  "99% async" is not good enough?
> How come?

99% async is okay for the database folks, but not for all users.  Think 
unified event loops.  For example, the application I'm currently working 
on is using AIO to isolate disk access from blocking the main thread.  If 
things go off and block on random locks or on disk I/O, bad things happen, 
like watchdogs triggering.  One of the real world requirements we have is 
that the application has to keep running even if the disks we're running 
on go bad.  With SANs and multipath involved, sometimes I/O can take tens 
of seconds to complete.  You also don't want to block operations that can 
proceed by those that are presently blocked, as that reduces the available 
parallelism to devices and increases overall latency.

I'll admit there's a lot of work to be done in this area, hence why I've 
done some work on thread based AIO recently, but threads aren't great for 
all use-cases.  Ultimately something like Zach's schedulable stacks are 
needed to get the overhead down to something reasonable.

Still, we shouldn't keep on propagating broken APIs that don't reflect 
actual requirements.

		-ben
-- 
"Thought is the essence of where you are now."

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 11/33] dio: Convert direct_IO to use iov_iter
  2013-07-25 17:50 ` [PATCH V8 11/33] dio: Convert direct_IO to use iov_iter Dave Kleikamp
@ 2013-08-23 15:48   ` Geert Uytterhoeven
  0 siblings, 0 replies; 72+ messages in thread
From: Geert Uytterhoeven @ 2013-08-23 15:48 UTC (permalink / raw)
  To: Dave Kleikamp, Greg KH
  Cc: driverdevel, linux-kernel, Linux FS Devel, Andrew Morton,
	Zach Brown, Maxim V. Patlasov

On Thu, Jul 25, 2013 at 7:50 PM, Dave Kleikamp <dave.kleikamp@oracle.com> wrote:
> Change the direct_IO aop to take an iov_iter argument rather than an iovec.
> This will get passed down through most filesystems so that only the
> __blockdev_direct_IO helper need be aware of whether user or kernel memory
> is being passed to the function.

Lustre in -next also needs to be updated:

drivers/staging/lustre/lustre/llite/rw26.c:549: warning:
initialization from incompatible pointer type

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 15/33] aio: add aio support for iov_iter arguments
  2013-08-21 13:55   ` Benjamin LaHaise
@ 2013-08-30 20:05     ` Dave Kleikamp
  0 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-08-30 20:05 UTC (permalink / raw)
  To: Benjamin LaHaise
  Cc: linux-kernel, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown

Sorry for the lack of response. Getting back to this.

On 08/21/2013 08:55 AM, Benjamin LaHaise wrote:
> On Thu, Jul 25, 2013 at 12:50:41PM -0500, Dave Kleikamp wrote:
>> This adds iocb cmds which specify that memory is held in iov_iter
>> structures.  This lets kernel callers specify memory that can be
>> expressed in an iov_iter, which includes pages in bio_vec arrays.
>>
>> Only kernel callers can provide an iov_iter so it doesn't make a lot of
>> sense to expose the IOCB_CMD values for this as part of the user space
>> ABI.
> 
> I don't think adding the IOCB_CMD_{READ,WRITE}_ITER operations to 
> include/uapi/linux/aio_abi.h is the right thing to do here -- they're 
> never going to be used by userland, and care certainly not part of the 
> abi we're presenting to userland.  I'd suggest moving these opcodes to 
> include/linux/aio.h.

Agreed.

> Also, if you make the values > 16 bits, userland 
> will never be able to pass them in inadvertently (although things look 
> okay if that does happen at present).

I'd have to change the declaration of ki_opcode to an int. This
shouldn't be a problem since it'll be padded to a long anyway.

> 
> 		-ben
> 
>> But kernel callers should also be able to perform the usual aio
>> operations which suggests using the the existing operation namespace and
>> support code.
>>
>> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
>> Cc: Zach Brown <zab@zabbo.net>
>> ---
>>  fs/aio.c                     | 67 ++++++++++++++++++++++++++++++++++++++++++++
>>  include/linux/aio.h          |  3 ++
>>  include/uapi/linux/aio_abi.h |  2 ++
>>  3 files changed, 72 insertions(+)
>>
>> diff --git a/fs/aio.c b/fs/aio.c
>> index c65ba13..0da82c0 100644
>> --- a/fs/aio.c
>> +++ b/fs/aio.c
>> @@ -991,6 +991,48 @@ static ssize_t aio_setup_single_vector(int rw, struct kiocb *kiocb)
>>  	return 0;
>>  }
>>  
>> +static ssize_t aio_read_iter(struct kiocb *iocb)
>> +{
>> +	struct file *file = iocb->ki_filp;
>> +	ssize_t ret;
>> +
>> +	if (unlikely(!is_kernel_kiocb(iocb)))
>> +		return -EINVAL;
>> +
>> +	if (unlikely(!(file->f_mode & FMODE_READ)))
>> +		return -EBADF;
>> +
>> +	ret = security_file_permission(file, MAY_READ);
>> +	if (unlikely(ret))
>> +		return ret;
>> +
>> +	if (!file->f_op->read_iter)
>> +		return -EINVAL;
>> +
>> +	return file->f_op->read_iter(iocb, iocb->ki_iter, iocb->ki_pos);
>> +}
>> +
>> +static ssize_t aio_write_iter(struct kiocb *iocb)
>> +{
>> +	struct file *file = iocb->ki_filp;
>> +	ssize_t ret;
>> +
>> +	if (unlikely(!is_kernel_kiocb(iocb)))
>> +		return -EINVAL;
>> +
>> +	if (unlikely(!(file->f_mode & FMODE_WRITE)))
>> +		return -EBADF;
>> +
>> +	ret = security_file_permission(file, MAY_WRITE);
>> +	if (unlikely(ret))
>> +		return ret;
>> +
>> +	if (!file->f_op->write_iter)
>> +		return -EINVAL;
>> +
>> +	return file->f_op->write_iter(iocb, iocb->ki_iter, iocb->ki_pos);
>> +}
>> +
>>  /*
>>   * aio_setup_iocb:
>>   *	Performs the initial checks and aio retry method
>> @@ -1042,6 +1084,14 @@ rw_common:
>>  		ret = aio_rw_vect_retry(req, rw, rw_op);
>>  		break;
>>  
>> +	case IOCB_CMD_READ_ITER:
>> +		ret = aio_read_iter(req);
>> +		break;
>> +
>> +	case IOCB_CMD_WRITE_ITER:
>> +		ret = aio_write_iter(req);
>> +		break;
>> +
>>  	case IOCB_CMD_FDSYNC:
>>  		if (!file->f_op->aio_fsync)
>>  			return -EINVAL;
>> @@ -1116,6 +1166,23 @@ void aio_kernel_init_rw(struct kiocb *iocb, struct file *filp,
>>  }
>>  EXPORT_SYMBOL_GPL(aio_kernel_init_rw);
>>  
>> +/*
>> + * The iter count must be set before calling here.  Some filesystems uses
>> + * iocb->ki_left as an indicator of the size of an IO.
>> + */
>> +void aio_kernel_init_iter(struct kiocb *iocb, struct file *filp,
>> +			  unsigned short op, struct iov_iter *iter, loff_t off)
>> +{
>> +	iocb->ki_filp = filp;
>> +	iocb->ki_iter = iter;
>> +	iocb->ki_opcode = op;
>> +	iocb->ki_pos = off;
>> +	iocb->ki_nbytes = iov_iter_count(iter);
>> +	iocb->ki_left = iocb->ki_nbytes;
>> +	iocb->ki_ctx = (void *)-1;
>> +}
>> +EXPORT_SYMBOL_GPL(aio_kernel_init_iter);
>> +
>>  void aio_kernel_init_callback(struct kiocb *iocb,
>>  			      void (*complete)(u64 user_data, long res),
>>  			      u64 user_data)
>> diff --git a/include/linux/aio.h b/include/linux/aio.h
>> index 014a75d..64d059d 100644
>> --- a/include/linux/aio.h
>> +++ b/include/linux/aio.h
>> @@ -66,6 +66,7 @@ struct kiocb {
>>  	 * this is the underlying eventfd context to deliver events to.
>>  	 */
>>  	struct eventfd_ctx	*ki_eventfd;
>> +	struct iov_iter		*ki_iter;
>>  };
>>  
>>  static inline bool is_sync_kiocb(struct kiocb *kiocb)
>> @@ -102,6 +103,8 @@ struct kiocb *aio_kernel_alloc(gfp_t gfp);
>>  void aio_kernel_free(struct kiocb *iocb);
>>  void aio_kernel_init_rw(struct kiocb *iocb, struct file *filp,
>>  			unsigned short op, void *ptr, size_t nr, loff_t off);
>> +void aio_kernel_init_iter(struct kiocb *iocb, struct file *filp,
>> +			  unsigned short op, struct iov_iter *iter, loff_t off);
>>  void aio_kernel_init_callback(struct kiocb *iocb,
>>  			      void (*complete)(u64 user_data, long res),
>>  			      u64 user_data);
>> diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h
>> index bb2554f..22ce4bd 100644
>> --- a/include/uapi/linux/aio_abi.h
>> +++ b/include/uapi/linux/aio_abi.h
>> @@ -44,6 +44,8 @@ enum {
>>  	IOCB_CMD_NOOP = 6,
>>  	IOCB_CMD_PREADV = 7,
>>  	IOCB_CMD_PWRITEV = 8,
>> +	IOCB_CMD_READ_ITER = 9,
>> +	IOCB_CMD_WRITE_ITER = 10,
>>  };
>>  
>>  /*
>> -- 
>> 1.8.3.4

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-08-21 13:02 ` Benjamin LaHaise
  2013-08-21 16:30   ` Dave Kleikamp
  2013-08-21 19:30   ` Andrew Morton
@ 2013-10-14 15:07   ` Christoph Hellwig
  2013-10-14 21:29     ` Benjamin LaHaise
  2 siblings, 1 reply; 72+ messages in thread
From: Christoph Hellwig @ 2013-10-14 15:07 UTC (permalink / raw)
  To: Benjamin LaHaise
  Cc: Dave Kleikamp, linux-kernel, linux-fsdevel, Andrew Morton,
	Maxim V. Patlasov, Zach Brown, linux-aio

Ben,

are you fine with the series now?  It's been in linux-next for a while
and it would be really helpful to get it in for the avarious places
trying to do in-kernel file aio without going through the page cache.


^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-10-14 15:07   ` Christoph Hellwig
@ 2013-10-14 21:29     ` Benjamin LaHaise
  2013-10-15 16:55       ` Christoph Hellwig
  0 siblings, 1 reply; 72+ messages in thread
From: Benjamin LaHaise @ 2013-10-14 21:29 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Dave Kleikamp, linux-kernel, linux-fsdevel, Andrew Morton,
	Maxim V. Patlasov, Zach Brown, linux-aio

On Mon, Oct 14, 2013 at 08:07:01AM -0700, Christoph Hellwig wrote:
> Ben,
> 
> are you fine with the series now?  It's been in linux-next for a while
> and it would be really helpful to get it in for the avarious places
> trying to do in-kernel file aio without going through the page cache.

No, I am not okay with it.  The feedback I provided 2 months ago has yet to 
be addressed.

		-ben
-- 
"Thought is the essence of where you are now."

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-10-14 21:29     ` Benjamin LaHaise
@ 2013-10-15 16:55       ` Christoph Hellwig
  2013-10-15 17:14         ` Benjamin LaHaise
  0 siblings, 1 reply; 72+ messages in thread
From: Christoph Hellwig @ 2013-10-15 16:55 UTC (permalink / raw)
  To: Benjamin LaHaise
  Cc: Christoph Hellwig, Dave Kleikamp, linux-kernel, linux-fsdevel,
	Andrew Morton, Maxim V. Patlasov, Zach Brown, linux-aio

On Mon, Oct 14, 2013 at 05:29:10PM -0400, Benjamin LaHaise wrote:
> On Mon, Oct 14, 2013 at 08:07:01AM -0700, Christoph Hellwig wrote:
> > Ben,
> > 
> > are you fine with the series now?  It's been in linux-next for a while
> > and it would be really helpful to get it in for the avarious places
> > trying to do in-kernel file aio without going through the page cache.
> 
> No, I am not okay with it.  The feedback I provided 2 months ago has yet to 
> be addressed.

Maybe I'm missing something, but the only big discussion item was that
you'd want something totally unrelated (notification for blocking)
mashed into this patch set.

While I agree that getting that would be useful it is something that has
nothing to do with issueing aio from kernel space and holding this
patchset hostage for something you'd like to see but that was
complicated enough that no one even tried it for many years seems
entirely unreasonable.

If there are any other issues left that I have missed it would be nice
to get a pointer to it, or a quick brief.


^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-10-15 16:55       ` Christoph Hellwig
@ 2013-10-15 17:14         ` Benjamin LaHaise
  2013-10-15 17:18           ` Christoph Hellwig
  0 siblings, 1 reply; 72+ messages in thread
From: Benjamin LaHaise @ 2013-10-15 17:14 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Dave Kleikamp, linux-kernel, linux-fsdevel, Andrew Morton,
	Maxim V. Patlasov, Zach Brown, linux-aio

On Tue, Oct 15, 2013 at 09:55:20AM -0700, Christoph Hellwig wrote:
> On Mon, Oct 14, 2013 at 05:29:10PM -0400, Benjamin LaHaise wrote:
> > On Mon, Oct 14, 2013 at 08:07:01AM -0700, Christoph Hellwig wrote:
> > > Ben,
> > > 
> > > are you fine with the series now?  It's been in linux-next for a while
> > > and it would be really helpful to get it in for the avarious places
> > > trying to do in-kernel file aio without going through the page cache.
> > 
> > No, I am not okay with it.  The feedback I provided 2 months ago has yet to 
> > be addressed.
> 
> Maybe I'm missing something, but the only big discussion item was that
> you'd want something totally unrelated (notification for blocking)
> mashed into this patch set.

No, that is not what I was refering to.

> While I agree that getting that would be useful it is something that has
> nothing to do with issueing aio from kernel space and holding this
> patchset hostage for something you'd like to see but that was
> complicated enough that no one even tried it for many years seems
> entirely unreasonable.
> 
> If there are any other issues left that I have missed it would be nice
> to get a pointer to it, or a quick brief.

The item I was refering to is to removing the opcodes used for in-kernel 
purposes from out of the range that the userland accessible opcodes can 
reach.  That is, put them above the 16 bit limit for userspace opcodes.  
There is absolutely no reason to expose kernel internal opcodes via the 
userspace exported includes.  It's a simple and reasonable change, and I 
see no reason for Dave not to make that modification.  Until that is 
done, I will nak the changes.

		-ben
-- 
"Thought is the essence of where you are now."

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-10-15 17:14         ` Benjamin LaHaise
@ 2013-10-15 17:18           ` Christoph Hellwig
  2013-10-15 17:53             ` Dave Kleikamp
  0 siblings, 1 reply; 72+ messages in thread
From: Christoph Hellwig @ 2013-10-15 17:18 UTC (permalink / raw)
  To: Benjamin LaHaise
  Cc: Christoph Hellwig, Dave Kleikamp, linux-kernel, linux-fsdevel,
	Andrew Morton, Maxim V. Patlasov, Zach Brown, linux-aio

On Tue, Oct 15, 2013 at 01:14:47PM -0400, Benjamin LaHaise wrote:
> > While I agree that getting that would be useful it is something that has
> > nothing to do with issueing aio from kernel space and holding this
> > patchset hostage for something you'd like to see but that was
> > complicated enough that no one even tried it for many years seems
> > entirely unreasonable.
> > 
> > If there are any other issues left that I have missed it would be nice
> > to get a pointer to it, or a quick brief.
> 
> The item I was refering to is to removing the opcodes used for in-kernel 
> purposes from out of the range that the userland accessible opcodes can 
> reach.  That is, put them above the 16 bit limit for userspace opcodes.  
> There is absolutely no reason to expose kernel internal opcodes via the 
> userspace exported includes.  It's a simple and reasonable change, and I 
> see no reason for Dave not to make that modification.  Until that is 
> done, I will nak the changes.

Oh, missed that.  I totally agree that it needs to be done.

Dave, will you have time to do it soon or should I look into it myself?

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-10-15 17:18           ` Christoph Hellwig
@ 2013-10-15 17:53             ` Dave Kleikamp
  0 siblings, 0 replies; 72+ messages in thread
From: Dave Kleikamp @ 2013-10-15 17:53 UTC (permalink / raw)
  To: Christoph Hellwig, Benjamin LaHaise
  Cc: linux-kernel, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown, linux-aio

On 10/15/2013 12:18 PM, Christoph Hellwig wrote:
> On Tue, Oct 15, 2013 at 01:14:47PM -0400, Benjamin LaHaise wrote:
>>> While I agree that getting that would be useful it is something that has
>>> nothing to do with issueing aio from kernel space and holding this
>>> patchset hostage for something you'd like to see but that was
>>> complicated enough that no one even tried it for many years seems
>>> entirely unreasonable.
>>>
>>> If there are any other issues left that I have missed it would be nice
>>> to get a pointer to it, or a quick brief.
>>
>> The item I was refering to is to removing the opcodes used for in-kernel 
>> purposes from out of the range that the userland accessible opcodes can 
>> reach.  That is, put them above the 16 bit limit for userspace opcodes.  
>> There is absolutely no reason to expose kernel internal opcodes via the 
>> userspace exported includes.  It's a simple and reasonable change, and I 
>> see no reason for Dave not to make that modification.  Until that is 
>> done, I will nak the changes.
> 
> Oh, missed that.  I totally agree that it needs to be done.
> 
> Dave, will you have time to do it soon or should I look into it myself?

I'll take care of it. I actually made this change and somehow misplaced it.

Sorry about that.

Dave

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
                   ` (36 preceding siblings ...)
  2013-08-21 13:02 ` Benjamin LaHaise
@ 2014-12-31 20:38 ` Sedat Dilek
  2014-12-31 21:52   ` Dave Kleikamp
  37 siblings, 1 reply; 72+ messages in thread
From: Sedat Dilek @ 2014-12-31 20:38 UTC (permalink / raw)
  To: Dave Kleikamp
  Cc: LKML, linux-fsdevel, Andrew Morton, Maxim V. Patlasov, Zach Brown

On Thu, Jul 25, 2013 at 7:50 PM, Dave Kleikamp <dave.kleikamp@oracle.com> wrote:
> This patch series adds a kernel interface to fs/aio.c so that kernel code can
> issue concurrent asynchronous IO to file systems.  It adds an aio command and
> file system methods which specify io memory with pages instead of userspace
> addresses.
>
> This series was written to reduce the current overhead loop imposes by
> performing synchronus buffered file system IO from a kernel thread.  These
> patches turn loop into a light weight layer that translates bios into iocbs.
>
> It introduces new file ops, read_iter() and write_iter(), that replace the
> aio_read() and aio_write() operations. The iov_iter structure can now contain
> either a user-space iovec or a kernel-space bio_vec. Since it would be
> overly complicated to replace every instance of aio_read() and aio_write(),
> the old operations are not removed, but file systems implementing the new
> ones need not keep the old ones.
>
> Verion 8 is little changed from Version 7 that I send out in March, just
> updated to the latest kernel. These patches apply to 3.11-rc2 and can
> also be found at:
>
> git://github.com/kleikamp/linux-shaggy.git aio_loop
>

What has happened to that aio_loop patchset?
Is it in Linux-next?
( /me started to play with "block: loop: convert to blk-mq (v3)", so I
recalled this other improvement. )

- Sedat -

> Asias He (1):
>   block_dev: add support for read_iter, write_iter
>
> Dave Kleikamp (22):
>   iov_iter: iov_iter_copy_from_user() should use non-atomic copy
>   iov_iter: add __iovec_copy_to_user()
>   fuse: convert fuse to use iov_iter_copy_[to|from]_user
>   iov_iter: ii_iovec_copy_to_user should pre-fault user pages
>   dio: Convert direct_IO to use iov_iter
>   dio: add bio_vec support to __blockdev_direct_IO()
>   aio: add aio_kernel_() interface
>   aio: add aio support for iov_iter arguments
>   fs: create file_readable() and file_writable() functions
>   fs: use read_iter and write_iter rather than aio_read and aio_write
>   fs: add read_iter and write_iter to several file systems
>   ocfs2: add support for read_iter and  write_iter
>   ext4: add support for read_iter and write_iter
>   nfs: add support for read_iter, write_iter
>   nfs: simplify swap
>   btrfs: add support for read_iter and write_iter
>   xfs: add support for read_iter and write_iter
>   gfs2: Convert aio_read/write ops to read/write_iter
>   udf: convert file ops from aio_read/write to read/write_iter
>   afs: add support for read_iter and write_iter
>   ecrpytfs: Convert aio_read/write ops to read/write_iter
>   ubifs: convert file ops from aio_read/write to read/write_iter
>
> Hugh Dickins (1):
>   tmpfs: add support for read_iter and write_iter
>
> Zach Brown (9):
>   iov_iter: move into its own file
>   iov_iter: add copy_to_user support
>   iov_iter: hide iovec details behind ops function pointers
>   iov_iter: add bvec support
>   iov_iter: add a shorten call
>   iov_iter: let callers extract iovecs and bio_vecs
>   fs: pull iov_iter use higher up the stack
>   bio: add bvec_length(), like iov_length()
>   loop: use aio to perform io on the underlying file
>
>  Documentation/filesystems/Locking   |   6 +-
>  Documentation/filesystems/vfs.txt   |  12 +-
>  drivers/block/loop.c                | 148 ++++++++----
>  drivers/char/raw.c                  |   4 +-
>  drivers/mtd/nand/nandsim.c          |   4 +-
>  drivers/usb/gadget/storage_common.c |   4 +-
>  fs/9p/vfs_addr.c                    |  12 +-
>  fs/9p/vfs_file.c                    |   8 +-
>  fs/Makefile                         |   2 +-
>  fs/adfs/file.c                      |   4 +-
>  fs/affs/file.c                      |   4 +-
>  fs/afs/file.c                       |   4 +-
>  fs/afs/internal.h                   |   3 +-
>  fs/afs/write.c                      |   9 +-
>  fs/aio.c                            | 152 ++++++++++++-
>  fs/bad_inode.c                      |  14 ++
>  fs/bfs/file.c                       |   4 +-
>  fs/block_dev.c                      |  27 ++-
>  fs/btrfs/file.c                     |  42 ++--
>  fs/btrfs/inode.c                    |  63 +++---
>  fs/ceph/addr.c                      |   3 +-
>  fs/cifs/file.c                      |   4 +-
>  fs/direct-io.c                      | 223 +++++++++++++------
>  fs/ecryptfs/file.c                  |  15 +-
>  fs/exofs/file.c                     |   4 +-
>  fs/ext2/file.c                      |   4 +-
>  fs/ext2/inode.c                     |   8 +-
>  fs/ext3/file.c                      |   4 +-
>  fs/ext3/inode.c                     |  15 +-
>  fs/ext4/ext4.h                      |   3 +-
>  fs/ext4/file.c                      |  34 +--
>  fs/ext4/indirect.c                  |  16 +-
>  fs/ext4/inode.c                     |  23 +-
>  fs/f2fs/data.c                      |   4 +-
>  fs/f2fs/file.c                      |   4 +-
>  fs/fat/file.c                       |   4 +-
>  fs/fat/inode.c                      |  10 +-
>  fs/fuse/cuse.c                      |  10 +-
>  fs/fuse/file.c                      |  90 ++++----
>  fs/fuse/fuse_i.h                    |   5 +-
>  fs/gfs2/aops.c                      |   7 +-
>  fs/gfs2/file.c                      |  21 +-
>  fs/hfs/inode.c                      |  11 +-
>  fs/hfsplus/inode.c                  |  10 +-
>  fs/hostfs/hostfs_kern.c             |   4 +-
>  fs/hpfs/file.c                      |   4 +-
>  fs/internal.h                       |   4 +
>  fs/iov-iter.c                       | 411 ++++++++++++++++++++++++++++++++++
>  fs/jffs2/file.c                     |   8 +-
>  fs/jfs/file.c                       |   4 +-
>  fs/jfs/inode.c                      |   7 +-
>  fs/logfs/file.c                     |   4 +-
>  fs/minix/file.c                     |   4 +-
>  fs/nfs/direct.c                     | 302 ++++++++++++++++---------
>  fs/nfs/file.c                       |  33 ++-
>  fs/nfs/internal.h                   |   4 +-
>  fs/nfs/nfs4file.c                   |   4 +-
>  fs/nilfs2/file.c                    |   4 +-
>  fs/nilfs2/inode.c                   |   8 +-
>  fs/ocfs2/aops.c                     |   8 +-
>  fs/ocfs2/aops.h                     |   2 +-
>  fs/ocfs2/file.c                     |  55 ++---
>  fs/ocfs2/ocfs2_trace.h              |   6 +-
>  fs/omfs/file.c                      |   4 +-
>  fs/ramfs/file-mmu.c                 |   4 +-
>  fs/ramfs/file-nommu.c               |   4 +-
>  fs/read_write.c                     |  78 +++++--
>  fs/reiserfs/file.c                  |   4 +-
>  fs/reiserfs/inode.c                 |   7 +-
>  fs/romfs/mmap-nommu.c               |   2 +-
>  fs/sysv/file.c                      |   4 +-
>  fs/ubifs/file.c                     |  12 +-
>  fs/udf/file.c                       |  13 +-
>  fs/udf/inode.c                      |  10 +-
>  fs/ufs/file.c                       |   4 +-
>  fs/xfs/xfs_aops.c                   |  13 +-
>  fs/xfs/xfs_file.c                   |  51 ++---
>  include/linux/aio.h                 |  20 +-
>  include/linux/bio.h                 |   8 +
>  include/linux/blk_types.h           |   2 -
>  include/linux/fs.h                  | 165 ++++++++++++--
>  include/linux/nfs_fs.h              |  13 +-
>  include/uapi/linux/aio_abi.h        |   2 +
>  include/uapi/linux/loop.h           |   1 +
>  mm/filemap.c                        | 433 ++++++++++++++----------------------
>  mm/page_io.c                        |  15 +-
>  mm/shmem.c                          |  61 ++---
>  87 files changed, 1862 insertions(+), 1002 deletions(-)
>  create mode 100644 fs/iov-iter.c
>
> --
> 1.8.3.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2014-12-31 20:38 ` Sedat Dilek
@ 2014-12-31 21:52   ` Dave Kleikamp
  2014-12-31 22:35     ` Sedat Dilek
  0 siblings, 1 reply; 72+ messages in thread
From: Dave Kleikamp @ 2014-12-31 21:52 UTC (permalink / raw)
  To: sedat.dilek
  Cc: LKML, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown, Ming Lei

On 12/31/2014 02:38 PM, Sedat Dilek wrote:
> 
> What has happened to that aio_loop patchset?
> Is it in Linux-next?
> ( /me started to play with "block: loop: convert to blk-mq (v3)", so I
> recalled this other improvement. )

It met with some harsh resistance, so I backed off on it. Then Al Viro
got busy re-writing the iov_iter infrastructure and I put my patchset on
the shelf to look at later. Then Ming Lei submitted more up-to-date
patchset: https://lkml.org/lkml/2014/8/6/175

It looks like Ming is currently only pushing the first half of that
patchset. I don't know what his plans are for the last three patches:

aio: add aio_kernel_() interface
fd/direct-io: introduce should_dirty for kernel aio
block: loop: support to submit I/O via kernel aio based

Dave

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2014-12-31 21:52   ` Dave Kleikamp
@ 2014-12-31 22:35     ` Sedat Dilek
  2015-01-01  0:52       ` Ming Lei
  0 siblings, 1 reply; 72+ messages in thread
From: Sedat Dilek @ 2014-12-31 22:35 UTC (permalink / raw)
  To: Dave Kleikamp
  Cc: LKML, linux-fsdevel, Andrew Morton, Maxim V. Patlasov,
	Zach Brown, Ming Lei

On Wed, Dec 31, 2014 at 10:52 PM, Dave Kleikamp
<dave.kleikamp@oracle.com> wrote:
> On 12/31/2014 02:38 PM, Sedat Dilek wrote:
>>
>> What has happened to that aio_loop patchset?
>> Is it in Linux-next?
>> ( /me started to play with "block: loop: convert to blk-mq (v3)", so I
>> recalled this other improvement. )
>
> It met with some harsh resistance, so I backed off on it. Then Al Viro
> got busy re-writing the iov_iter infrastructure and I put my patchset on
> the shelf to look at later. Then Ming Lei submitted more up-to-date
> patchset: https://lkml.org/lkml/2014/8/6/175
>
> It looks like Ming is currently only pushing the first half of that
> patchset. I don't know what his plans are for the last three patches:
>
> aio: add aio_kernel_() interface
> fd/direct-io: introduce should_dirty for kernel aio
> block: loop: support to submit I/O via kernel aio based
>

I tested with block-mq-v3 (for next-20141231) [1] and this looks promising [2].

Maybe Ming can say what the plan is with the missing parts.

- Sedat -

[1] http://marc.info/?l=linux-kernel&m=142003226701471&w=2
[2]http://marc.info/?l=linux-kernel&m=142006516408381&w=2

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2014-12-31 22:35     ` Sedat Dilek
@ 2015-01-01  0:52       ` Ming Lei
  2015-01-05 19:24         ` Maxim Patlasov
  0 siblings, 1 reply; 72+ messages in thread
From: Ming Lei @ 2015-01-01  0:52 UTC (permalink / raw)
  To: sedat.dilek
  Cc: Dave Kleikamp, LKML, linux-fsdevel, Andrew Morton,
	Maxim V. Patlasov, Zach Brown

On Thu, Jan 1, 2015 at 6:35 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Wed, Dec 31, 2014 at 10:52 PM, Dave Kleikamp
> <dave.kleikamp@oracle.com> wrote:
>> On 12/31/2014 02:38 PM, Sedat Dilek wrote:
>>>
>>> What has happened to that aio_loop patchset?
>>> Is it in Linux-next?
>>> ( /me started to play with "block: loop: convert to blk-mq (v3)", so I
>>> recalled this other improvement. )
>>
>> It met with some harsh resistance, so I backed off on it. Then Al Viro
>> got busy re-writing the iov_iter infrastructure and I put my patchset on
>> the shelf to look at later. Then Ming Lei submitted more up-to-date
>> patchset: https://lkml.org/lkml/2014/8/6/175
>>
>> It looks like Ming is currently only pushing the first half of that
>> patchset. I don't know what his plans are for the last three patches:
>>
>> aio: add aio_kernel_() interface
>> fd/direct-io: introduce should_dirty for kernel aio
>> block: loop: support to submit I/O via kernel aio based
>>
>
> I tested with block-mq-v3 (for next-20141231) [1] and this looks promising [2].
>
> Maybe Ming can say what the plan is with the missing parts.

I have compared kernel aio based loop-mq(the other 3 aio patches
against loop-mq v2, [1]) with loop-mq v3, looks the data isn't
better than loop-mq v3.

kernel aio based approach requires direct I/O, at least direct write
shouldn't be good as page cache write, IMO.

So I think we need to investigate kernel aio based approach further
wrt. loop improvement.

[1] http://marc.info/?l=linux-kernel&m=140941494422520&w=2

Thanks,
Ming Lei
>
> - Sedat -
>
> [1] http://marc.info/?l=linux-kernel&m=142003226701471&w=2
> [2]http://marc.info/?l=linux-kernel&m=142006516408381&w=2
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2015-01-01  0:52       ` Ming Lei
@ 2015-01-05 19:24         ` Maxim Patlasov
  2015-01-06 13:18           ` Ming Lei
  0 siblings, 1 reply; 72+ messages in thread
From: Maxim Patlasov @ 2015-01-05 19:24 UTC (permalink / raw)
  To: Ming Lei, sedat.dilek
  Cc: Dave Kleikamp, LKML, linux-fsdevel, Andrew Morton, Zach Brown

On 12/31/2014 04:52 PM, Ming Lei wrote:
> On Thu, Jan 1, 2015 at 6:35 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
>> On Wed, Dec 31, 2014 at 10:52 PM, Dave Kleikamp
>> <dave.kleikamp@oracle.com> wrote:
>>> On 12/31/2014 02:38 PM, Sedat Dilek wrote:
>>>> What has happened to that aio_loop patchset?
>>>> Is it in Linux-next?
>>>> ( /me started to play with "block: loop: convert to blk-mq (v3)", so I
>>>> recalled this other improvement. )
>>> It met with some harsh resistance, so I backed off on it. Then Al Viro
>>> got busy re-writing the iov_iter infrastructure and I put my patchset on
>>> the shelf to look at later. Then Ming Lei submitted more up-to-date
>>> patchset: https://lkml.org/lkml/2014/8/6/175
>>>
>>> It looks like Ming is currently only pushing the first half of that
>>> patchset. I don't know what his plans are for the last three patches:
>>>
>>> aio: add aio_kernel_() interface
>>> fd/direct-io: introduce should_dirty for kernel aio
>>> block: loop: support to submit I/O via kernel aio based
>>>
>> I tested with block-mq-v3 (for next-20141231) [1] and this looks promising [2].
>>
>> Maybe Ming can say what the plan is with the missing parts.
> I have compared kernel aio based loop-mq(the other 3 aio patches
> against loop-mq v2, [1]) with loop-mq v3, looks the data isn't
> better than loop-mq v3.
>
> kernel aio based approach requires direct I/O, at least direct write
> shouldn't be good as page cache write, IMO.
>
> So I think we need to investigate kernel aio based approach further
> wrt. loop improvement.

A great advantage of kernel aio for loop device is the avoidance of 
double caching: the data from page cache of inner filesystem (mounted on 
the loop device) won't be cached again in the page cache of the outer 
filesystem (one that keeps image file of the loop device).

So I don't think it's correct to compare the performance of aio based 
loop-mq with loop-mq v3. Aio based approach is OK as long as it doesn't 
introduce significant overhead as compared with submitting bio-s 
straightforwardly from loop device (or any other in-kernel user of 
kernel aio) to host block device.

Thanks,
Maxim

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2015-01-05 19:24         ` Maxim Patlasov
@ 2015-01-06 13:18           ` Ming Lei
  2015-01-10 16:51             ` Ming Lei
  0 siblings, 1 reply; 72+ messages in thread
From: Ming Lei @ 2015-01-06 13:18 UTC (permalink / raw)
  To: Maxim Patlasov
  Cc: sedat.dilek, Dave Kleikamp, LKML, linux-fsdevel, Andrew Morton,
	Zach Brown

On 1/6/15, Maxim Patlasov <mpatlasov@parallels.com> wrote:
> On 12/31/2014 04:52 PM, Ming Lei wrote:
>> On Thu, Jan 1, 2015 at 6:35 AM, Sedat Dilek <sedat.dilek@gmail.com>
>> wrote:
>>> On Wed, Dec 31, 2014 at 10:52 PM, Dave Kleikamp
>>> <dave.kleikamp@oracle.com> wrote:
>>>> On 12/31/2014 02:38 PM, Sedat Dilek wrote:
>>>>> What has happened to that aio_loop patchset?
>>>>> Is it in Linux-next?
>>>>> ( /me started to play with "block: loop: convert to blk-mq (v3)", so I
>>>>> recalled this other improvement. )
>>>> It met with some harsh resistance, so I backed off on it. Then Al Viro
>>>> got busy re-writing the iov_iter infrastructure and I put my patchset
>>>> on
>>>> the shelf to look at later. Then Ming Lei submitted more up-to-date
>>>> patchset: https://lkml.org/lkml/2014/8/6/175
>>>>
>>>> It looks like Ming is currently only pushing the first half of that
>>>> patchset. I don't know what his plans are for the last three patches:
>>>>
>>>> aio: add aio_kernel_() interface
>>>> fd/direct-io: introduce should_dirty for kernel aio
>>>> block: loop: support to submit I/O via kernel aio based
>>>>
>>> I tested with block-mq-v3 (for next-20141231) [1] and this looks
>>> promising [2].
>>>
>>> Maybe Ming can say what the plan is with the missing parts.
>> I have compared kernel aio based loop-mq(the other 3 aio patches
>> against loop-mq v2, [1]) with loop-mq v3, looks the data isn't
>> better than loop-mq v3.
>>
>> kernel aio based approach requires direct I/O, at least direct write
>> shouldn't be good as page cache write, IMO.
>>
>> So I think we need to investigate kernel aio based approach further
>> wrt. loop improvement.
>
> A great advantage of kernel aio for loop device is the avoidance of
> double caching: the data from page cache of inner filesystem (mounted on
> the loop device) won't be cached again in the page cache of the outer
> filesystem (one that keeps image file of the loop device).

Yes, I agree avoidance of double cache is very good, at least
page consumption can be decreased, avoid one copy and make the backed
file more like a 'block' device.

>
> So I don't think it's correct to compare the performance of aio based
> loop-mq with loop-mq v3. Aio based approach is OK as long as it doesn't
> introduce significant overhead as compared with submitting bio-s
> straightforwardly from loop device (or any other in-kernel user of
> kernel aio) to host block device.

One problem is that aio based approach requires O_DIRECT, and direct
write looks much slower compared with page cache write in my fio
test over loop block directly.

But it might not be so bad when write I/O is considered from
filesystem over loop block since there is still page cache and the
write I/O is often big chunk from file system. I will run tests inside
filesystem to compare the two approaches further.


Thanks,
Ming Lei

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec
  2015-01-06 13:18           ` Ming Lei
@ 2015-01-10 16:51             ` Ming Lei
  0 siblings, 0 replies; 72+ messages in thread
From: Ming Lei @ 2015-01-10 16:51 UTC (permalink / raw)
  To: Maxim Patlasov
  Cc: sedat.dilek, Dave Kleikamp, LKML, linux-fsdevel, Andrew Morton,
	Zach Brown

Hi Guys,

On 1/6/15, Ming Lei <ming.lei@canonical.com> wrote:
> On 1/6/15, Maxim Patlasov <mpatlasov@parallels.com> wrote:
>> On 12/31/2014 04:52 PM, Ming Lei wrote:
>>> On Thu, Jan 1, 2015 at 6:35 AM, Sedat Dilek <sedat.dilek@gmail.com>
>>> wrote:
>>>> On Wed, Dec 31, 2014 at 10:52 PM, Dave Kleikamp
>>>> <dave.kleikamp@oracle.com> wrote:
>>>>> On 12/31/2014 02:38 PM, Sedat Dilek wrote:
>>>>>> What has happened to that aio_loop patchset?
>>>>>> Is it in Linux-next?
>>>>>> ( /me started to play with "block: loop: convert to blk-mq (v3)", so
>>>>>> I
>>>>>> recalled this other improvement. )
>>>>> It met with some harsh resistance, so I backed off on it. Then Al Viro
>>>>> got busy re-writing the iov_iter infrastructure and I put my patchset
>>>>> on
>>>>> the shelf to look at later. Then Ming Lei submitted more up-to-date
>>>>> patchset: https://lkml.org/lkml/2014/8/6/175
>>>>>
>>>>> It looks like Ming is currently only pushing the first half of that
>>>>> patchset. I don't know what his plans are for the last three patches:
>>>>>
>>>>> aio: add aio_kernel_() interface
>>>>> fd/direct-io: introduce should_dirty for kernel aio
>>>>> block: loop: support to submit I/O via kernel aio based
>>>>>
>>>> I tested with block-mq-v3 (for next-20141231) [1] and this looks
>>>> promising [2].
>>>>
>>>> Maybe Ming can say what the plan is with the missing parts.
>>> I have compared kernel aio based loop-mq(the other 3 aio patches
>>> against loop-mq v2, [1]) with loop-mq v3, looks the data isn't
>>> better than loop-mq v3.
>>>
>>> kernel aio based approach requires direct I/O, at least direct write
>>> shouldn't be good as page cache write, IMO.
>>>
>>> So I think we need to investigate kernel aio based approach further
>>> wrt. loop improvement.
>>
>> A great advantage of kernel aio for loop device is the avoidance of
>> double caching: the data from page cache of inner filesystem (mounted on
>> the loop device) won't be cached again in the page cache of the outer
>> filesystem (one that keeps image file of the loop device).
>
> Yes, I agree avoidance of double cache is very good, at least
> page consumption can be decreased, avoid one copy and make the backed
> file more like a 'block' device.
>
>>
>> So I don't think it's correct to compare the performance of aio based
>> loop-mq with loop-mq v3. Aio based approach is OK as long as it doesn't
>> introduce significant overhead as compared with submitting bio-s
>> straightforwardly from loop device (or any other in-kernel user of
>> kernel aio) to host block device.
>
> One problem is that aio based approach requires O_DIRECT, and direct
> write looks much slower compared with page cache write in my fio
> test over loop block directly.
>
> But it might not be so bad when write I/O is considered from
> filesystem over loop block since there is still page cache and the
> write I/O is often big chunk from file system. I will run tests inside
> filesystem to compare the two approaches further.

I just completed kernel aio based loop patch v2, together fio tests /
sar monitor results.

If fio tests are run inside filesystem(ext4) over loop block, throughput hasn't
big change between kernel aio and no kernel aio, at the same time, context
switches and cpu utilization are decreased a lot with kernel aio, also much less
memory becomes used after completing the tests compared with no kernel aio.

If fio tests are run over loop block directly(no fs mounted),
throughput of read,
randwrite and write are decreased a bit much. At the same time, cpu utilization
and context switches are decreased too with kernel aio in other three tests
except for write, still much less memory becomes used after completing these
tests compared with no kernel aio.

So looks it is better to provide one sys file to control if kernel aio is used.

Before I post the v2 kernel aio based loop patches, I'd like to choose what the
default setting should be: kernel aio or not? It depends on which usage is more
common for loop block users, via file system over loop block or access
loop block
directly?

Thanks,
Ming Lei

^ permalink raw reply	[flat|nested] 72+ messages in thread

end of thread, other threads:[~2015-01-10 16:51 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-25 17:50 [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 01/33] iov_iter: move into its own file Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 02/33] iov_iter: iov_iter_copy_from_user() should use non-atomic copy Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 03/33] iov_iter: add copy_to_user support Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 04/33] iov_iter: add __iovec_copy_to_user() Dave Kleikamp
     [not found] ` <1374774659-13121-1-git-send-email-dave.kleikamp-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-25 17:50   ` [PATCH V8 05/33] fuse: convert fuse to use iov_iter_copy_[to|from]_user Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 06/33] iov_iter: hide iovec details behind ops function pointers Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 07/33] iov_iter: ii_iovec_copy_to_user should pre-fault user pages Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 08/33] iov_iter: add bvec support Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 09/33] iov_iter: add a shorten call Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 10/33] iov_iter: let callers extract iovecs and bio_vecs Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 11/33] dio: Convert direct_IO to use iov_iter Dave Kleikamp
2013-08-23 15:48   ` Geert Uytterhoeven
2013-07-25 17:50 ` [PATCH V8 12/33] dio: add bio_vec support to __blockdev_direct_IO() Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 13/33] fs: pull iov_iter use higher up the stack Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 14/33] aio: add aio_kernel_() interface Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 15/33] aio: add aio support for iov_iter arguments Dave Kleikamp
2013-08-21 13:55   ` Benjamin LaHaise
2013-08-30 20:05     ` Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 16/33] bio: add bvec_length(), like iov_length() Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 17/33] loop: use aio to perform io on the underlying file Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 18/33] fs: create file_readable() and file_writable() functions Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 19/33] fs: use read_iter and write_iter rather than aio_read and aio_write Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 20/33] fs: add read_iter and write_iter to several file systems Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 21/33] ocfs2: add support for read_iter and write_iter Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 22/33] ext4: " Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 23/33] nfs: add support for read_iter, write_iter Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 24/33] nfs: simplify swap Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 25/33] btrfs: add support for read_iter and write_iter Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 26/33] block_dev: add support for read_iter, write_iter Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 27/33] xfs: add support for read_iter and write_iter Dave Kleikamp
2013-07-26 11:51   ` Dave Chinner
2013-07-25 17:50 ` [PATCH V8 28/33] gfs2: Convert aio_read/write ops to read/write_iter Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 29/33] udf: convert file ops from aio_read/write " Dave Kleikamp
2013-07-25 21:34   ` Jan Kara
2013-07-25 17:50 ` [PATCH V8 30/33] afs: add support for read_iter and write_iter Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 31/33] ecrpytfs: Convert aio_read/write ops to read/write_iter Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 32/33] ubifs: convert file ops from aio_read/write " Dave Kleikamp
2013-07-25 17:50 ` [PATCH V8 33/33] tmpfs: add support for read_iter and write_iter Dave Kleikamp
2013-07-30 21:28 ` [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec Andrew Morton
2013-07-31  0:43   ` Dave Chinner
2013-07-31  6:40     ` Sedat Dilek
2013-07-31  8:41       ` Sedat Dilek
2013-07-31 11:22         ` Sedat Dilek
2013-07-31  9:51   ` Maxim Patlasov
2013-08-01  8:58 ` Christoph Hellwig
2013-08-01 13:04   ` Dave Kleikamp
2013-08-02 10:48     ` Christoph Hellwig
2013-08-20 13:00 ` Christoph Hellwig
2013-08-20 19:13   ` Dave Kleikamp
2013-08-21  0:14     ` Stephen Rothwell
2013-08-21  5:35       ` Sedat Dilek
2013-08-20 22:46   ` Andrew Morton
2013-08-21 13:02 ` Benjamin LaHaise
2013-08-21 16:30   ` Dave Kleikamp
2013-08-21 16:39     ` Benjamin LaHaise
2013-08-21 17:12       ` Dave Kleikamp
2013-08-21 19:30   ` Andrew Morton
2013-08-21 20:24     ` Benjamin LaHaise
2013-10-14 15:07   ` Christoph Hellwig
2013-10-14 21:29     ` Benjamin LaHaise
2013-10-15 16:55       ` Christoph Hellwig
2013-10-15 17:14         ` Benjamin LaHaise
2013-10-15 17:18           ` Christoph Hellwig
2013-10-15 17:53             ` Dave Kleikamp
2014-12-31 20:38 ` Sedat Dilek
2014-12-31 21:52   ` Dave Kleikamp
2014-12-31 22:35     ` Sedat Dilek
2015-01-01  0:52       ` Ming Lei
2015-01-05 19:24         ` Maxim Patlasov
2015-01-06 13:18           ` Ming Lei
2015-01-10 16:51             ` Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).