All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loic Dachary <loic@dachary.org>
To: Andreas-Joachim Peters <andreas.joachim.peters@cern.ch>
Cc: Ceph Development <ceph-devel@vger.kernel.org>
Subject: Buffer alignment
Date: Tue, 10 Dec 2013 09:32:52 +0100	[thread overview]
Message-ID: <52A6D1B4.1010503@dachary.org> (raw)

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

Hi Andreas,

In Ceph, buffers can be aligned if required using buffer::create_page_aligned

https://github.com/ceph/ceph/blob/master/src/common/buffer.cc#L519
https://github.com/ceph/ceph/blob/master/src/common/buffer.cc#L230

and although the Jerasure plugin has alignment requirements

https://github.com/ceph/ceph/blob/master/src/osd/ErasureCodePluginJerasure/ErasureCodeJerasure.cc#L79

it did not occur to me that aligning the buffers used to stored the encoded 

https://github.com/ceph/ceph/blob/master/src/osd/ErasureCodePluginJerasure/ErasureCodeJerasure.cc#L87

result would be needed. For decoding the caller is responsible for allocating the buffers. For encoding it also is, except for the padding. 

Do you think the API should recommend something regarding alignment ? 

https://github.com/ceph/ceph/blob/master/src/osd/ErasureCodeInterface.h#L20

Cheers

-- 
Loïc Dachary, Artisan Logiciel Libre


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

             reply	other threads:[~2013-12-10  8:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10  8:32 Loic Dachary [this message]
2013-12-11  9:50 ` Buffer alignment Andreas Joachim Peters
2013-12-11 12:25   ` Loic Dachary

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=52A6D1B4.1010503@dachary.org \
    --to=loic@dachary.org \
    --cc=andreas.joachim.peters@cern.ch \
    --cc=ceph-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.