linux.kernel - 26 new messages in 8 topics - digest
linux.kernel
http://groups.google.com/group/linux.kernel?hl=en
linux.kernel@googlegroups.com
Today's topics:
* target: Add protection SGLs to target_submit_cmd_map_sgls - 3 messages, 1
author
http://groups.google.com/group/linux.kernel/t/109d6f35263ac9b4?hl=en
* c0f4dfd4f9: -65% softirqs.RCU - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/f63ed5986826cf00?hl=en
* perf tools: Do proper comm override error handling - 3 messages, 1 author
http://groups.google.com/group/linux.kernel/t/fbde0854e39b253b?hl=en
* tools lib traceevent: Unregister handler when function plugin is unloaded -
12 messages, 1 author
http://groups.google.com/group/linux.kernel/t/2f7ee8acf818546b?hl=en
* clocksource: timer-sun5i: Switch to sched_clock_register() - 2 messages, 2
authors
http://groups.google.com/group/linux.kernel/t/9b93ad305044b151?hl=en
* perf tools: Add 'build-test' make target - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/5dcb83ec42bac591?hl=en
* Adding hyperv.h to uapi headers - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/9109a55de9e0039d?hl=en
* perf probe: Release allocated probe_trace_event if failed - 3 messages, 1
author
http://groups.google.com/group/linux.kernel/t/d6b43d2b9d80482d?hl=en
==============================================================================
TOPIC: target: Add protection SGLs to target_submit_cmd_map_sgls
http://groups.google.com/group/linux.kernel/t/109d6f35263ac9b4?hl=en
==============================================================================
== 1 of 3 ==
Date: Sun, Jan 19 2014 4:20 am
From: Sagi Grimberg
On 1/19/2014 4:44 AM, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> This patch adds support to target_submit_cmd_map_sgls() for
> accepting 'sgl_prot' + 'sgl_prot_count' parameters for
> DIF protection information.
>
> Note the passed parameters are stored at se_cmd->t_prot_sg
> and se_cmd->t_prot_nents respectively.
>
> Also, update tcm_loop and vhost-scsi fabrics usage of
> target_submit_cmd_map_sgls() to take into account the
> new parameters.
I didn't see that you added protection allocation to transports that
does not use
target_submit_cmd_map_sgls() - which happens to be iSCSI/iSER/SRP :(
Don't you think that prot SG allocation should be added also to
target_alloc_sgl()? by then
se_cmd should contain the protection attributes and this routine can
know if it needs to
allocate prot_sg as well. This is how I used it...
> Cc: Martin K. Petersen <martin.petersen@oracle.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Hannes Reinecke <hare@suse.de>
> Cc: Sagi Grimberg <sagig@mellanox.com>
> Cc: Or Gerlitz <ogerlitz@mellanox.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
> ---
> drivers/target/loopback/tcm_loop.c | 2 +-
> drivers/target/target_core_transport.c | 16 ++++++++++++++--
> drivers/vhost/scsi.c | 2 +-
> include/target/target_core_fabric.h | 3 ++-
> 4 files changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
> index 763ee45..112b795 100644
> --- a/drivers/target/loopback/tcm_loop.c
> +++ b/drivers/target/loopback/tcm_loop.c
> @@ -217,7 +217,7 @@ static void tcm_loop_submission_work(struct work_struct *work)
> scsi_bufflen(sc), tcm_loop_sam_attr(sc),
> sc->sc_data_direction, 0,
> scsi_sglist(sc), scsi_sg_count(sc),
> - sgl_bidi, sgl_bidi_count);
> + sgl_bidi, sgl_bidi_count, NULL, 0);
> if (rc < 0) {
> set_host_byte(sc, DID_NO_CONNECT);
> goto out_done;
> diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
> index fa4fc04..aebe0bb 100644
> --- a/drivers/target/target_core_transport.c
> +++ b/drivers/target/target_core_transport.c
> @@ -1310,6 +1310,8 @@ transport_generic_map_mem_to_cmd(struct se_cmd *cmd, struct scatterlist *sgl,
> * @sgl_count: scatterlist count for unidirectional mapping
> * @sgl_bidi: struct scatterlist memory for bidirectional READ mapping
> * @sgl_bidi_count: scatterlist count for bidirectional READ mapping
> + * @sgl_prot: struct scatterlist memory protection information
> + * @sgl_prot_count: scatterlist count for protection information
> *
> * Returns non zero to signal active I/O shutdown failure. All other
> * setup exceptions will be returned as a SCSI CHECK_CONDITION response,
> @@ -1322,7 +1324,8 @@ int target_submit_cmd_map_sgls(struct se_cmd *se_cmd, struct se_session *se_sess
> unsigned char *cdb, unsigned char *sense, u32 unpacked_lun,
> u32 data_length, int task_attr, int data_dir, int flags,
> struct scatterlist *sgl, u32 sgl_count,
> - struct scatterlist *sgl_bidi, u32 sgl_bidi_count)
> + struct scatterlist *sgl_bidi, u32 sgl_bidi_count,
> + struct scatterlist *sgl_prot, u32 sgl_prot_count)
> {
> struct se_portal_group *se_tpg;
> sense_reason_t rc;
> @@ -1364,6 +1367,14 @@ int target_submit_cmd_map_sgls(struct se_cmd *se_cmd, struct se_session *se_sess
> target_put_sess_cmd(se_sess, se_cmd);
> return 0;
> }
> + /*
> + * Save pointers for SGLs containing protection information,
> + * if present.
> + */
> + if (sgl_prot_count) {
> + se_cmd->t_prot_sg = sgl_prot;
> + se_cmd->t_prot_nents = sgl_prot_count;
> + }
>
> rc = target_setup_cmd_from_cdb(se_cmd, cdb);
> if (rc != 0) {
> @@ -1406,6 +1417,7 @@ int target_submit_cmd_map_sgls(struct se_cmd *se_cmd, struct se_session *se_sess
> return 0;
> }
> }
> +
> /*
> * Check if we need to delay processing because of ALUA
> * Active/NonOptimized primary access state..
> @@ -1445,7 +1457,7 @@ int target_submit_cmd(struct se_cmd *se_cmd, struct se_session *se_sess,
> {
> return target_submit_cmd_map_sgls(se_cmd, se_sess, cdb, sense,
> unpacked_lun, data_length, task_attr, data_dir,
> - flags, NULL, 0, NULL, 0);
> + flags, NULL, 0, NULL, 0, NULL, 0);
> }
> EXPORT_SYMBOL(target_submit_cmd);
>
> diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
> index f175629..84488a8 100644
> --- a/drivers/vhost/scsi.c
> +++ b/drivers/vhost/scsi.c
> @@ -889,7 +889,7 @@ static void tcm_vhost_submission_work(struct work_struct *work)
> cmd->tvc_lun, cmd->tvc_exp_data_len,
> cmd->tvc_task_attr, cmd->tvc_data_direction,
> TARGET_SCF_ACK_KREF, sg_ptr, cmd->tvc_sgl_count,
> - sg_bidi_ptr, sg_no_bidi);
> + sg_bidi_ptr, sg_no_bidi, NULL, 0);
> if (rc < 0) {
> transport_send_check_condition_and_sense(se_cmd,
> TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0);
> diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h
> index 4cf4fda..0218d68 100644
> --- a/include/target/target_core_fabric.h
> +++ b/include/target/target_core_fabric.h
> @@ -105,7 +105,8 @@ sense_reason_t transport_lookup_cmd_lun(struct se_cmd *, u32);
> sense_reason_t target_setup_cmd_from_cdb(struct se_cmd *, unsigned char *);
> int target_submit_cmd_map_sgls(struct se_cmd *, struct se_session *,
> unsigned char *, unsigned char *, u32, u32, int, int, int,
> - struct scatterlist *, u32, struct scatterlist *, u32);
> + struct scatterlist *, u32, struct scatterlist *, u32,
> + struct scatterlist *, u32);
> int target_submit_cmd(struct se_cmd *, struct se_session *, unsigned char *,
> unsigned char *, u32, u32, int, int, int);
> int target_submit_tmr(struct se_cmd *se_cmd, struct se_session *se_sess,
--
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/
== 2 of 3 ==
Date: Sun, Jan 19 2014 4:30 am
From: Sagi Grimberg
On 1/19/2014 4:44 AM, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> This patch adds blk_integrity passthrough support for block_device
> backends using IBLOCK.
Nice!
> This includes iblock_alloc_bip() + setup of bio_integrity_payload
> information that attaches to the leading struct bio once bio_list
> is populated during fast-path iblock_execute_rw() I/O dispatch.
>
> It also updates setup in iblock_configure_device() to detect modes
> of protection + se dev->dev_attrib.pi_prot_type accordingly, along
> with creating required bio_set integrity mempools.
>
> Cc: Martin K. Petersen <martin.petersen@oracle.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Hannes Reinecke <hare@suse.de>
> Cc: Sagi Grimberg <sagig@mellanox.com>
> Cc: Or Gerlitz <ogerlitz@mellanox.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
> ---
> drivers/target/Kconfig | 1 +
> drivers/target/target_core_iblock.c | 91 ++++++++++++++++++++++++++++++++++-
> 2 files changed, 90 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/target/Kconfig b/drivers/target/Kconfig
> index 50aad2e..dc2d84a 100644
> --- a/drivers/target/Kconfig
> +++ b/drivers/target/Kconfig
> @@ -14,6 +14,7 @@ if TARGET_CORE
>
> config TCM_IBLOCK
> tristate "TCM/IBLOCK Subsystem Plugin for Linux/BLOCK"
> + select BLK_DEV_INTEGRITY
> help
> Say Y here to enable the TCM/IBLOCK subsystem plugin for non-buffered
> access to Linux/Block devices using BIO
> diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
> index 15d9121..293d9b0 100644
> --- a/drivers/target/target_core_iblock.c
> +++ b/drivers/target/target_core_iblock.c
> @@ -91,6 +91,7 @@ static int iblock_configure_device(struct se_device *dev)
> struct iblock_dev *ib_dev = IBLOCK_DEV(dev);
> struct request_queue *q;
> struct block_device *bd = NULL;
> + struct blk_integrity *bi;
> fmode_t mode;
> int ret = -ENOMEM;
>
> @@ -155,8 +156,40 @@ static int iblock_configure_device(struct se_device *dev)
> if (blk_queue_nonrot(q))
> dev->dev_attrib.is_nonrot = 1;
>
> + bi = bdev_get_integrity(bd);
> + if (bi) {
> + struct bio_set *bs = ib_dev->ibd_bio_set;
> +
> + if (!strcmp(bi->name, "T10-DIF-TYPE3-IP") ||
> + !strcmp(bi->name, "T10-DIF-TYPE1-IP")) {
> + pr_err("IBLOCK export of blk_integrity: %s not"
> + " supported\n", bi->name);
> + ret = -ENOSYS;
> + goto out_blkdev_put;
> + }
Please remind me why we ignore IP-CSUM guard type again?
MKP, will this be irrelevant for the initiator as well? if so, I don't
see a reason to expose this in RDMA verbs.
> +
> + if (!strcmp(bi->name, "T10-DIF-TYPE3-CRC")) {
> + dev->dev_attrib.pi_prot_type = TARGET_DIF_TYPE3_PROT;
> + } else if (!strcmp(bi->name, "T10-DIF-TYPE1-CRC")) {
> + dev->dev_attrib.pi_prot_type = TARGET_DIF_TYPE1_PROT;
> + }
> +
> + if (dev->dev_attrib.pi_prot_type) {
> + if (bioset_integrity_create(bs, IBLOCK_BIO_POOL_SIZE) < 0) {
> + pr_err("Unable to allocate bioset for PI\n");
> + ret = -ENOMEM;
> + goto out_blkdev_put;
> + }
> + pr_debug("IBLOCK setup BIP bs->bio_integrity_pool: %p\n",
> + bs->bio_integrity_pool);
> + }
> + dev->dev_attrib.hw_pi_prot_type = dev->dev_attrib.pi_prot_type;
> + }
> +
> return 0;
>
> +out_blkdev_put:
> + blkdev_put(ib_dev->ibd_bd, FMODE_WRITE|FMODE_READ|FMODE_EXCL);
> out_free_bioset:
> bioset_free(ib_dev->ibd_bio_set);
> ib_dev->ibd_bio_set = NULL;
> @@ -170,8 +203,10 @@ static void iblock_free_device(struct se_device *dev)
>
> if (ib_dev->ibd_bd != NULL)
> blkdev_put(ib_dev->ibd_bd, FMODE_WRITE|FMODE_READ|FMODE_EXCL);
> - if (ib_dev->ibd_bio_set != NULL)
> + if (ib_dev->ibd_bio_set != NULL) {
> + bioset_integrity_free(ib_dev->ibd_bio_set);
> bioset_free(ib_dev->ibd_bio_set);
> + }
> kfree(ib_dev);
> }
>
> @@ -586,13 +621,58 @@ static ssize_t iblock_show_configfs_dev_params(struct se_device *dev, char *b)
> return bl;
> }
>
> +static int
> +iblock_alloc_bip(struct se_cmd *cmd, struct bio *bio)
> +{
> + struct se_device *dev = cmd->se_dev;
> + struct blk_integrity *bi;
> + struct bio_integrity_payload *bip;
> + struct iblock_dev *ib_dev = IBLOCK_DEV(dev);
> + struct scatterlist *sg;
> + int i, rc;
> +
> + bi = bdev_get_integrity(ib_dev->ibd_bd);
> + if (!bi) {
> + pr_err("Unable to locate bio_integrity\n");
> + return -ENODEV;
> + }
> +
> + bip = bio_integrity_alloc(bio, GFP_NOIO, cmd->t_prot_nents);
> + if (!bip) {
> + pr_err("Unable to allocate bio_integrity_payload\n");
> + return -ENOMEM;
> + }
> +
> + bip->bip_size = (cmd->data_length / dev->dev_attrib.block_size) *
> + dev->prot_length;
> + bip->bip_sector = bio->bi_sector;
> +
> + pr_debug("IBLOCK BIP Size: %u Sector: %llu\n", bip->bip_size,
> + (unsigned long long)bip->bip_sector);
> +
> + for_each_sg(cmd->t_prot_sg, sg, cmd->t_prot_nents, i) {
> +
> + rc = bio_integrity_add_page(bio, sg_page(sg), sg->length,
> + sg->offset);
> + if (rc != sg->length) {
> + pr_err("bio_integrity_add_page() failed; %d\n", rc);
> + return -ENOMEM;
> + }
> +
> + pr_debug("Added bio integrity page: %p length: %d offset; %d\n",
> + sg_page(sg), sg->length, sg->offset);
> + }
> +
> + return 0;
> +}
> +
> static sense_reason_t
> iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
> enum dma_data_direction data_direction)
> {
> struct se_device *dev = cmd->se_dev;
> struct iblock_req *ibr;
> - struct bio *bio;
> + struct bio *bio, *bio_start;
> struct bio_list list;
> struct scatterlist *sg;
> u32 sg_num = sgl_nents;
> @@ -655,6 +735,7 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
> if (!bio)
> goto fail_free_ibr;
>
> + bio_start = bio;
> bio_list_init(&list);
> bio_list_add(&list, bio);
>
> @@ -688,6 +769,12 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
> sg_num--;
> }
>
> + if (cmd->prot_type) {
> + int rc = iblock_alloc_bip(cmd, bio_start);
> + if (rc)
> + goto fail_put_bios;
> + }
> +
> iblock_submit_bios(&list, rw);
> iblock_complete_cmd(cmd);
> return 0;
--
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/
== 3 of 3 ==
Date: Sun, Jan 19 2014 4:40 am
From: Sagi Grimberg
On 1/19/2014 4:44 AM, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> This patch adds support for DIF protection init/format support into
> the FILEIO backend.
>
> It involves using a seperate $FILE.protection for storing PI that is
> opened via fd_init_prot() using the common pi_prot_type attribute.
> The actual formatting of the protection is done via fd_format_prot()
> using the common pi_prot_format attribute, that will populate the
> initial PI data based upon the currently configured pi_prot_type.
>
> Based on original FILEIO code from Sagi.
Nice! see comments below...
> v1 changes:
> - Fix sparse warnings in fd_init_format_buf (Fengguang)
>
> Cc: Martin K. Petersen <martin.petersen@oracle.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Hannes Reinecke <hare@suse.de>
> Cc: Sagi Grimberg <sagig@mellanox.com>
> Cc: Or Gerlitz <ogerlitz@mellanox.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
> ---
> drivers/target/target_core_file.c | 137 +++++++++++++++++++++++++++++++++++++
> drivers/target/target_core_file.h | 4 ++
> 2 files changed, 141 insertions(+)
>
> diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c
> index 0e34cda..119d519 100644
> --- a/drivers/target/target_core_file.c
> +++ b/drivers/target/target_core_file.c
> @@ -700,6 +700,140 @@ static sector_t fd_get_blocks(struct se_device *dev)
> dev->dev_attrib.block_size);
> }
>
> +static int fd_init_prot(struct se_device *dev)
> +{
> + struct fd_dev *fd_dev = FD_DEV(dev);
> + struct file *prot_file, *file = fd_dev->fd_file;
> + struct inode *inode;
> + int ret, flags = O_RDWR | O_CREAT | O_LARGEFILE | O_DSYNC;
> + char buf[FD_MAX_DEV_PROT_NAME];
> +
> + if (!file) {
> + pr_err("Unable to locate fd_dev->fd_file\n");
> + return -ENODEV;
> + }
> +
> + inode = file->f_mapping->host;
> + if (S_ISBLK(inode->i_mode)) {
> + pr_err("FILEIO Protection emulation only supported on"
> + " !S_ISBLK\n");
> + return -ENOSYS;
> + }
> +
> + if (fd_dev->fbd_flags & FDBD_HAS_BUFFERED_IO_WCE)
> + flags &= ~O_DSYNC;
> +
> + snprintf(buf, FD_MAX_DEV_PROT_NAME, "%s.protection",
> + fd_dev->fd_dev_name);
> +
> + prot_file = filp_open(buf, flags, 0600);
> + if (IS_ERR(prot_file)) {
> + pr_err("filp_open(%s) failed\n", buf);
> + ret = PTR_ERR(prot_file);
> + return ret;
> + }
> + fd_dev->fd_prot_file = prot_file;
> +
> + return 0;
> +}
> +
> +static void fd_init_format_buf(struct se_device *dev, unsigned char *buf,
> + u32 unit_size, u32 *ref_tag, u16 app_tag,
> + bool inc_reftag)
> +{
> + unsigned char *p = buf;
> + int i;
> +
> + for (i = 0; i < unit_size; i += dev->prot_length) {
> + *((u16 *)&p[0]) = 0xffff;
> + *((__be16 *)&p[2]) = cpu_to_be16(app_tag);
> + *((__be32 *)&p[4]) = cpu_to_be32(*ref_tag);
> +
> + if (inc_reftag)
> + (*ref_tag)++;
> +
> + p += dev->prot_length;
> + }
> +}
> +
> +static int fd_format_prot(struct se_device *dev)
> +{
> + struct fd_dev *fd_dev = FD_DEV(dev);
> + struct file *prot_fd = fd_dev->fd_prot_file;
> + sector_t prot_length, prot;
> + unsigned char *buf;
> + loff_t pos = 0;
> + u32 ref_tag = 0;
> + int unit_size = FDBD_FORMAT_UNIT_SIZE * dev->dev_attrib.block_size;
> + int rc, ret = 0, size, len;
> + bool inc_reftag = false;
> +
> + if (!dev->dev_attrib.pi_prot_type) {
> + pr_err("Unable to format_prot while pi_prot_type == 0\n");
> + return -ENODEV;
> + }
> + if (!prot_fd) {
> + pr_err("Unable to locate fd_dev->fd_prot_file\n");
> + return -ENODEV;
> + }
> +
> + switch (dev->dev_attrib.pi_prot_type) {
redundant - see below.
> + case TARGET_DIF_TYPE3_PROT:
> + ref_tag = 0xffffffff;
> + break;
> + case TARGET_DIF_TYPE2_PROT:
> + case TARGET_DIF_TYPE1_PROT:
> + inc_reftag = true;
> + break;
> + default:
> + break;
> + }
> +
> + buf = vzalloc(unit_size);
> + if (!buf) {
> + pr_err("Unable to allocate FILEIO prot buf\n");
> + return -ENOMEM;
> + }
> +
> + prot_length = (dev->transport->get_blocks(dev) + 1) * dev->prot_length;
> + size = prot_length;
> +
> + pr_debug("Using FILEIO prot_length: %llu\n",
> + (unsigned long long)prot_length);
> +
> + for (prot = 0; prot < prot_length; prot += unit_size) {
> +
> + fd_init_format_buf(dev, buf, unit_size, &ref_tag, 0xffff,
> + inc_reftag);
I didn't send you my latest patches (my fault...).T10-PI format should
only place
escape values throughout the protection file (fill it with 0xff). so I
guess in this case
fd_init_formast_buf() boils down to memset(buf, 0xff, unit_size) once
before the loop
and just loop until prot_length writing buf, no need to address
apptag/reftag...
> +
> + len = min(unit_size, size);
> +
> + rc = kernel_write(prot_fd, buf, len, pos);
> + if (rc != len) {
> + pr_err("vfs_write to prot file failed: %d\n", rc);
> + ret = -ENODEV;
> + goto out;
> + }
> + pos += len;
> + size -= len;
> + }
> +
> +out:
> + vfree(buf);
> + return ret;
> +}
> +
> +static void fd_free_prot(struct se_device *dev)
> +{
> + struct fd_dev *fd_dev = FD_DEV(dev);
> +
> + if (!fd_dev->fd_prot_file)
> + return;
> +
> + filp_close(fd_dev->fd_prot_file, NULL);
> + fd_dev->fd_prot_file = NULL;
> +}
> +
> static struct sbc_ops fd_sbc_ops = {
> .execute_rw = fd_execute_rw,
> .execute_sync_cache = fd_execute_sync_cache,
> @@ -730,6 +864,9 @@ static struct se_subsystem_api fileio_template = {
> .show_configfs_dev_params = fd_show_configfs_dev_params,
> .get_device_type = sbc_get_device_type,
> .get_blocks = fd_get_blocks,
> + .init_prot = fd_init_prot,
> + .format_prot = fd_format_prot,
> + .free_prot = fd_free_prot,
> };
>
> static int __init fileio_module_init(void)
> diff --git a/drivers/target/target_core_file.h b/drivers/target/target_core_file.h
> index 37ffc5b..583691e 100644
> --- a/drivers/target/target_core_file.h
> +++ b/drivers/target/target_core_file.h
> @@ -4,6 +4,7 @@
> #define FD_VERSION "4.0"
>
> #define FD_MAX_DEV_NAME 256
> +#define FD_MAX_DEV_PROT_NAME FD_MAX_DEV_NAME + 16
> #define FD_DEVICE_QUEUE_DEPTH 32
> #define FD_MAX_DEVICE_QUEUE_DEPTH 128
> #define FD_BLOCKSIZE 512
> @@ -15,6 +16,8 @@
> #define FBDF_HAS_PATH 0x01
> #define FBDF_HAS_SIZE 0x02
> #define FDBD_HAS_BUFFERED_IO_WCE 0x04
> +#define FDBD_FORMAT_UNIT_SIZE 2048
> +
>
> struct fd_dev {
> struct se_device dev;
> @@ -29,6 +32,7 @@ struct fd_dev {
> u32 fd_block_size;
> unsigned long long fd_dev_size;
> struct file *fd_file;
> + struct file *fd_prot_file;
> /* FILEIO HBA device is connected to */
> struct fd_host *fd_host;
> } ____cacheline_aligned;
--
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/
==============================================================================
TOPIC: c0f4dfd4f9: -65% softirqs.RCU
http://groups.google.com/group/linux.kernel/t/f63ed5986826cf00?hl=en
==============================================================================
== 1 of 1 ==
Date: Sun, Jan 19 2014 4:20 am
From: Fengguang Wu
Hi Paul,
Just FYI, we noticed the following changes (which looks good) on old commit
c0f4dfd4f9 ("rcu: Make RCU_FAST_NO_HZ take advantage of numbered callbacks")
in test case dd-write/4HDD-JBOD-cfq-btrfs-1dd:
b11cc5 (parent) c0f4dfd4f90f1667d234d21f1
--------------- -------------------------
213757 ~ 4% -65.4% 73929 ~ 3% softirqs.RCU
21193 ~ 5% -36.5% 13451 ~ 4% softirqs.SCHED
2036 ~ 4% -59.4% 825 ~ 3% vmstat.system.cs
1304520 ~ 4% -59.2% 532451 ~ 3% perf-stat.context-switches
95685 ~ 4% -44.0% 53598 ~ 2% perf-stat.cpu-migrations
The "~ N%" numbers are stddev percent.
perf-stat.cpu-migrations
120000 ++----------------------------------------------------------------+
| |
110000 ++ * * *. * **. |
100000 *+ .* * :+ :: + *.* : : : * .* |
| * *. + +: * : : * : : : : + .* : |
90000 ++ * * + : * : * * * *.* |
| * * |
80000 ++ |
| |
70000 ++ |
60000 ++ |
| O O O O O O O O O O O O O O O O
50000 O+ OO O O O O O OO O O O O O OO O |
| O O O O |
40000 ++----------------------------------------------------------------+
perf-stat.context-switches
1.5e+06 ++---------------------------------------------------------------+
1.4e+06 ++ * * * *. * *.*.* * |
*. .** : + :+ + *. + ** + :+ : + + |
1.3e+06 ++* + : * *.* * + .* * *.* ** |
1.2e+06 ++ * * |
1.1e+06 ++ |
1e+06 ++ |
| |
900000 ++ |
800000 ++ |
700000 ++ |
600000 ++O O O |
O OO O OO O O O O OO O O OO O O OO O O OO O O O O O O O
500000 ++ O O OO |
400000 ++---------------------------------------------------------------+
vmstat.system.cs
2400 ++------------------------------------------------------------------+
| * *. *. * *. * * |
2200 *+ .*.* *. + + : *. + *.* + + + * + + + |
2000 ++* :+ * *.* * *.* * *.* *.* |
| * |
1800 ++ |
1600 ++ |
| |
1400 ++ |
1200 ++ |
| |
1000 ++O OO O |
800 O+ O OO O O O O O O O O O O O OO O O O O OO O O O O O O O
| O O O O |
600 ++------------------------------------------------------------------+
Thanks,
Fengguang
==============================================================================
TOPIC: perf tools: Do proper comm override error handling
http://groups.google.com/group/linux.kernel/t/fbde0854e39b253b?hl=en
==============================================================================
== 1 of 3 ==
Date: Sun, Jan 19 2014 4:30 am
From: tip-bot for Frederic Weisbecker
Commit-ID: 3178f58b989430fd0721df97bf21cf1c0e8cc419
Gitweb: http://git.kernel.org/tip/3178f58b989430fd0721df97bf21cf1c0e8cc419
Author: Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Tue, 14 Jan 2014 16:37:14 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 16 Jan 2014 16:44:39 -0300
perf tools: Do proper comm override error handling
The comm overriding API ignores memory allocation failures by silently
keeping the previous and out of date comm.
As a result, the user may get buggy events without ever being notified
about the problem and its source.
Lets start to fix this by propagating the error from the API. Not all
callers may be doing proper error handling on comm set yet but this is
the first step toward it.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1389713836-13375-2-git-send-email-fweisbec@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/comm.c | 19 ++++++++++---------
tools/perf/util/comm.h | 2 +-
tools/perf/util/thread.c | 5 ++++-
3 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/tools/perf/util/comm.c b/tools/perf/util/comm.c
index 67d1e40..f9e7776 100644
--- a/tools/perf/util/comm.c
+++ b/tools/perf/util/comm.c
@@ -94,19 +94,20 @@ struct comm *comm__new(const char *str, u64 timestamp)
return comm;
}
-void comm__override(struct comm *comm, const char *str, u64 timestamp)
+int comm__override(struct comm *comm, const char *str, u64 timestamp)
{
- struct comm_str *old = comm->comm_str;
+ struct comm_str *new, *old = comm->comm_str;
- comm->comm_str = comm_str__findnew(str, &comm_str_root);
- if (!comm->comm_str) {
- comm->comm_str = old;
- return;
- }
+ new = comm_str__findnew(str, &comm_str_root);
+ if (!new)
+ return -ENOMEM;
- comm->start = timestamp;
- comm_str__get(comm->comm_str);
+ comm_str__get(new);
comm_str__put(old);
+ comm->comm_str = new;
+ comm->start = timestamp;
+
+ return 0;
}
void comm__free(struct comm *comm)
diff --git a/tools/perf/util/comm.h b/tools/perf/util/comm.h
index 7a86e56..fac5bd5 100644
--- a/tools/perf/util/comm.h
+++ b/tools/perf/util/comm.h
@@ -16,6 +16,6 @@ struct comm {
void comm__free(struct comm *comm);
struct comm *comm__new(const char *str, u64 timestamp);
const char *comm__str(const struct comm *comm);
-void comm__override(struct comm *comm, const char *str, u64 timestamp);
+int comm__override(struct comm *comm, const char *str, u64 timestamp);
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home