Re: [RFC v2 2/4] tracing: Add support for recording tgid of tasks

2017-06-03 Thread Joel Fernandes
Some minor things that I will rework in next rev after spending some more time on it: On Sat, Jun 3, 2017 at 9:03 PM, Joel Fernandes wrote: [..] > @@ -463,7 +469,7 @@ int trace_set_clr_event(const char *system, const char > *event, int set); > #define event_trace_printk(ip,

[RFC v2 2/4] tracing: Add support for recording tgid of tasks

2017-06-03 Thread Joel Fernandes
Inorder to support recording of tgid, the following changes are made: - Introduce a new API for optionally recording the tgid along with the task's comm which replaces the existing '*cmdline*' APIs. - reuse the existing sched_switch and sched_wakeup probes - replace all uses of the old API -

[PATCH 1/8] genirq: allow assigning affinity to present but not online CPUs

2017-06-03 Thread Christoph Hellwig
This will allow us to spread MSI/MSI-X affinity over all present CPUs and thus better deal with systems where cpus are take on and offline all the time. Signed-off-by: Christoph Hellwig --- kernel/irq/manage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 2/8] genirq: move pending helpers to internal.h

2017-06-03 Thread Christoph Hellwig
So that the affinity code can reuse them. Signed-off-by: Christoph Hellwig --- kernel/irq/internals.h | 38 ++ kernel/irq/manage.c| 28 2 files changed, 38 insertions(+), 28 deletions(-) diff --git

[PATCH 6/8] blk-mq: include all present CPUs in the default queue mapping

2017-06-03 Thread Christoph Hellwig
This way we get a nice distribution independent of the current cpu online / offline state. Signed-off-by: Christoph Hellwig --- block/blk-mq-cpumap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/block/blk-mq-cpumap.c b/block/blk-mq-cpumap.c index

[PATCH 4/8] genirq/affinity: assign vectors to all present CPUs

2017-06-03 Thread Christoph Hellwig
Currently we only assign spread vectors to online CPUs, which ties the IRQ mapping to the currently online devices and doesn't deal nicely with the fact that CPUs could come and go rapidly due to e.g. power management. Instead assign vectors to all present CPUs to avoid this churn. For this we

[PATCH 7/8] blk-mq: create hctx for each present CPU

2017-06-03 Thread Christoph Hellwig
Currently we only create hctx for online CPUs, which can lead to a lot of churn due to frequent soft offline / online operations. Instead allocate one for each present CPU to avoid this and dramatically simplify the code. Signed-off-by: Christoph Hellwig --- block/blk-mq.c

spread MSI(-X) vectors to all possible CPUs V2

2017-06-03 Thread Christoph Hellwig
Hi all, this series changes our automatic MSI-X vector assignment so that it takes all present CPUs into account instead of all online ones. This allows to better deal with cpu hotplug events, which could happen frequently due to power management for example. Changes since V1: - rebase to

[PATCH 8/8] nvme: allocate queues for all possible CPUs

2017-06-03 Thread Christoph Hellwig
Unlike most drіvers that simply pass the maximum possible vectors to pci_alloc_irq_vectors NVMe needs to configure the device before allocting the vectors, so it needs a manual update for the new scheme of using all present CPUs. Signed-off-by: Christoph Hellwig ---

[PATCH 5/8] genirq/affinity: update CPU affinity for CPU hotplug events

2017-06-03 Thread Christoph Hellwig
Remove a CPU from the affinity mask when it goes offline and add it back when it returns. In case the vetor was assigned only to the CPU going offline it will be shutdown and re-started when the CPU reappears. Signed-off-by: Christoph Hellwig --- arch/x86/kernel/irq.c | 3

[PATCH 3/8] genirq/affinity: factor out a irq_affinity_set helper

2017-06-03 Thread Christoph Hellwig
Factor out code from the x86 cpu hot plug code to program the affinity for a vector for a hot plug / hot unplug event. Signed-off-by: Christoph Hellwig --- arch/x86/kernel/irq.c | 23 ++- include/linux/interrupt.h | 1 + kernel/irq/affinity.c | 28

Re: Block device integrity support

2017-06-03 Thread Jens Axboe
On 06/03/2017 12:32 AM, Christoph Hellwig wrote: > On Fri, Jun 02, 2017 at 03:52:57PM -0700, Jens Axboe wrote: >> On 06/02/2017 03:38 PM, Bart Van Assche wrote: >>> On Fri, 2017-06-02 at 18:24 -0400, Martin K. Petersen wrote: > then the output shown below appears in the kernel log. Does anyone

[PATCH 12/13] blk-mq: switch ->queue_rq return value to blk_status_t

2017-06-03 Thread Christoph Hellwig
Use the same values for use for request completion errors as the return value from ->queue_rq. BLK_STS_RESOURCE is special cased to cause a requeue, and all the others are completed as-is. Signed-off-by: Christoph Hellwig --- block/blk-mq.c| 37

[PATCH 06/13] fs: simplify dio_bio_complete

2017-06-03 Thread Christoph Hellwig
Only read bio->bi_error once in the common path. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- fs/direct-io.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/direct-io.c b/fs/direct-io.c index

[PATCH 10/13] dm: change ->end_io calling convention

2017-06-03 Thread Christoph Hellwig
Turn the error paramter into a pointer so that target drivers can change the value, and make sure only DM_ENDIO_* values are returned from the methods. Signed-off-by: Christoph Hellwig --- drivers/md/dm-cache-target.c | 4 ++-- drivers/md/dm-flakey.c| 8

dedicated error codes for the block layer V3

2017-06-03 Thread Christoph Hellwig
This series introduces a new blk_status_t error code type for the block layer so that we can have tigher control and explicit semantics for block layer errors. All but the last three patches are cleanups that lead to the new type. The series it mostly limited to the block layer and drivers, and

[PATCH 03/13] gfs2: remove the unused sd_log_error field

2017-06-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- fs/gfs2/incore.h | 1 - fs/gfs2/lops.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index b7cf65d13561..aa3d44527fa2 100644

[PATCH 04/13] dm: fix REQ_RAHEAD handling

2017-06-03 Thread Christoph Hellwig
A few (but not all) dm targets use a special EWOULDBLOCK error code for failing REQ_RAHEAD requests that fail due to a lack of available resources. But no one else knows about this magic code, and lower level drivers also don't generate it when failing read-ahead requests for similar reasons. So

[PATCH 07/13] block_dev: propagate bio_iov_iter_get_pages error in __blkdev_direct_IO

2017-06-03 Thread Christoph Hellwig
Once we move the block layer to its own status code we'll still want to propagate the bio_iov_iter_get_pages, so restructure __blkdev_direct_IO to take ret into account when returning the errno. Signed-off-by: Christoph Hellwig --- fs/block_dev.c | 7 --- 1 file changed, 4

[PATCH 08/13] dm mpath: merge do_end_io_bio into multipath_end_io_bio

2017-06-03 Thread Christoph Hellwig
This simplifies the code and especially the error passing a bit and will help with the next patch. Signed-off-by: Christoph Hellwig --- drivers/md/dm-mpath.c | 42 +++--- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git

[PATCH 09/13] dm: don't return errnos from ->map

2017-06-03 Thread Christoph Hellwig
Instead use the special DM_MAPIO_KILL return value to return -EIO just like we do for the request based path. Note that dm-log-writes returned -ENOMEM in a few places, which now becomes -EIO instead. No consumer treats -ENOMEM special so this shouldn't be an issue (and it should use a mempool to

[PATCH 05/13] fs: remove the unused error argument to dio_end_io()

2017-06-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- fs/btrfs/inode.c | 6 +++--- fs/direct-io.c | 3 +-- include/linux/fs.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c

[PATCH 02/13] scsi/osd: don't save block errors into req_results

2017-06-03 Thread Christoph Hellwig
We will only have sense data if the command executed and got a SCSI result, so this is pointless. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen --- drivers/scsi/osd/osd_initiator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 01/13] nvme-lightnvm: use blk_execute_rq in nvme_nvm_submit_user_cmd

2017-06-03 Thread Christoph Hellwig
Instead of reinventing it poorly. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Javier González --- drivers/nvme/host/lightnvm.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff

Re: Block device integrity support

2017-06-03 Thread Christoph Hellwig
On Fri, Jun 02, 2017 at 03:52:57PM -0700, Jens Axboe wrote: > On 06/02/2017 03:38 PM, Bart Van Assche wrote: > > On Fri, 2017-06-02 at 18:24 -0400, Martin K. Petersen wrote: > >>> then the output shown below appears in the kernel log. Does anyone know > >>> how > >>> to fix this? Sorry but I'm