All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <elder@ieee.org>
To: mchristi@redhat.com, ceph-devel@vger.kernel.org,
	target-devel@vger.kernel.org
Subject: Re: [PATCH 01/18] libceph: add scatterlist messenger data type
Date: Wed, 29 Jul 2015 08:34:47 -0500	[thread overview]
Message-ID: <55B8D677.8040800@ieee.org> (raw)
In-Reply-To: <1438161835-27960-1-git-send-email-mchristi@redhat.com>

On 07/29/2015 04:23 AM, mchristi@redhat.com wrote:
> From: Mike Christie <michaelc@cs.wisc.edu>
> 
> LIO uses scatterlist for its page/data management. This patch
> adds a scatterlist messenger data type, so LIO can pass its sg
> down directly to rbd.
> 
> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>

I'm not going to be able to review all of these, and this
isnt' even a complete review.  But it's something...

You're clearly on the right track, but I want to provide
a meaningful review for correctness and design so I'm
looking for a bit more information.

> ---
>  include/linux/ceph/messenger.h  | 13 ++++++
>  include/linux/ceph/osd_client.h | 12 +++++-
>  net/ceph/messenger.c            | 96 +++++++++++++++++++++++++++++++++++++++++
>  net/ceph/osd_client.c           | 26 +++++++++++
>  4 files changed, 146 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h
> index 3775327..bc1bde8 100644
> --- a/include/linux/ceph/messenger.h
> +++ b/include/linux/ceph/messenger.h
> @@ -79,6 +79,7 @@ enum ceph_msg_data_type {
>  #ifdef CONFIG_BLOCK
>  	CEPH_MSG_DATA_BIO,	/* data source/destination is a bio list */
>  #endif /* CONFIG_BLOCK */
> +	CEPH_MSG_DATA_SG,	/* data source/destination is a scatterlist */
>  };
>  
>  static __inline__ bool ceph_msg_data_type_valid(enum ceph_msg_data_type type)
> @@ -90,6 +91,7 @@ static __inline__ bool ceph_msg_data_type_valid(enum ceph_msg_data_type type)
>  #ifdef CONFIG_BLOCK
>  	case CEPH_MSG_DATA_BIO:
>  #endif /* CONFIG_BLOCK */
> +	case CEPH_MSG_DATA_SG:
>  		return true;
>  	default:
>  		return false;
> @@ -112,6 +114,11 @@ struct ceph_msg_data {
>  			unsigned int	alignment;	/* first page */
>  		};
>  		struct ceph_pagelist	*pagelist;
> +		struct {
> +			struct scatterlist *sgl;
> +			unsigned int	sgl_init_offset;
> +			u64		sgl_length;
> +		};

Can you supply a short explanation of what these fields
represent?  It seems sgl_init_offset is the offset of the
starting byte in the sgl, but is the purpose of that for
page offset calculation, or does it represent an offset
into the total length of the sgl?  Or put another way,
does sgl_init_offset represent some portion of the
sgl_length that has been consumed already (and so the
initial residual length is sgl_length - sgl_init_offset)?

>  	};
>  };
>  
> @@ -139,6 +146,10 @@ struct ceph_msg_data_cursor {
>  			struct page	*page;		/* page from list */
>  			size_t		offset;		/* bytes from list */
>  		};
> +		struct {
> +			struct scatterlist	*sg;		/* curr sg */

							/* current sg */

> +			unsigned int		sg_consumed;

Here too, what does sg_consumed represent with respect to the
initial offset and the length?

I guess I'm going to stop with that.  It'll be a lot easier
for me to review this if I'm sure I'm sure I understand what
these represent.  Thanks.

					-Alex

> +		};
>  	};
>  };
>  

. . .

  parent reply	other threads:[~2015-07-29 13:34 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-29  9:23 [PATCH 01/18] libceph: add scatterlist messenger data type mchristi
2015-07-29  9:23 ` [PATCH 02/18] rbd: add support for scatterlist obj_request_type mchristi
2015-07-29  9:23 ` [PATCH 03/18] rbd: add lio specific data area mchristi
2015-07-29  9:23 ` [PATCH 04/18] libceph: support bidirectional requests mchristi
2015-11-21 23:32   ` Goldwyn Rodrigues
2015-07-29  9:23 ` [PATCH 05/18] libceph: add support for CMPEXT compare extent requests mchristi
2015-07-29  9:23 ` [PATCH 06/18] rbd: add write test helper mchristi
2015-07-29  9:23 ` [PATCH 07/18] rbd: add num ops calculator helper mchristi
2015-07-29  9:23 ` [PATCH 08/18] rbd: add support for COMPARE_AND_WRITE/CMPEXT mchristi
2015-07-29  9:23 ` [PATCH 09/18] libceph: add support for write same requests mchristi
2015-07-29  9:23 ` [PATCH 10/18] rbd: add support for writesame requests mchristi
2015-07-29  9:23 ` [PATCH 11/18] target: add compare and write callback mchristi
2015-07-29  9:23 ` [PATCH 12/18] target: compare and write backend driver sense handling mchristi
2015-09-04 19:41   ` Mike Christie
2015-09-04 22:34     ` Andy Grover
2015-09-06  6:38     ` Sagi Grimberg
2015-09-06  7:12   ` Christoph Hellwig
2015-07-29  9:23 ` [PATCH 13/18] target: add COMPARE_AND_WRITE sg creation helper mchristi
2015-07-29  9:23 ` [PATCH 14/18] libceph: fix pr_fmt compile issues mchristi
2015-07-29  9:23 ` [PATCH 15/18] rbd: export some functions used by lio rbd backend mchristi
2015-07-29  9:23 ` [PATCH 16/18] rbd: move structs used by lio rbd to new header mchristi
2015-07-29  9:23 ` [PATCH 17/18] target: add rbd backend mchristi
2015-07-29 14:27   ` Bart Van Assche
2015-07-29 17:07     ` Mike Christie
2015-07-29  9:23 ` [PATCH 18/18] target: add lio rbd to makefile/Kconfig mchristi
2015-07-29 13:34 ` Alex Elder [this message]
2015-07-29 17:49   ` [PATCH 01/18] libceph: add scatterlist messenger data type Mike Christie
2015-07-29 17:55 ` Christoph Hellwig
2015-07-29 22:59   ` Mike Christie
2015-07-29 23:40     ` Mike Christie
2015-07-30  7:34       ` Nicholas A. Bellinger
2015-07-30 14:55       ` Christoph Hellwig
2016-02-04 10:33 ` David Disseldorp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55B8D677.8040800@ieee.org \
    --to=elder@ieee.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=mchristi@redhat.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.