Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librbd: support eventfd for AIO completion notifications #5465

Merged
merged 18 commits into from Dec 1, 2015

Conversation

yuyuyu101
Copy link
Member

Currently librbd support aio_read/write with specified
callback(AioCompletion). It would be nice for simple caller logic, but
it also has some problems:

  1. Performance bottleneck: librbd internal finisher thread complete "callback" isn't a *very
    littleweight" job, especially when "callback" need to update some status with lock hold
  2. Call logic: Usually like fio rbd engine, caller will maintain some status with io and rbd callback isn't enough to finish all the jobs related to io. For example, caller need to check each queued io stupidly again when rbd callback finished.

@yuyuyu101 yuyuyu101 force-pushed the wip-librbd-ap branch 2 times, most recently from 51335be to a19a61e Compare August 5, 2015 14:58
#define CEPH_COMMON_EVENT_TYPE_H

#define EVENT_SOCKET_TYPE_NONE 0
#define EVENT_SOCKET_TYPE_PIPE 1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need librbd API exposed version of _PIPE and _EVENTFD. Since this file isn't part of the API, might as well move to an enum within event_socket.h?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if user specify notify type? like rbd_set_image_notification

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's my concern -- this header file isn't part of the API so the end-user won't have access to it. My suggestion is to create librbd specific aliases for these values in librbd.h (similar to how librados aliases own flag constants within the API).

@yuyuyu101 yuyuyu101 force-pushed the wip-librbd-ap branch 3 times, most recently from 3d83a69 to 9c884da Compare November 12, 2015 03:46
@yuyuyu101
Copy link
Member Author

updated @dillaman

@dillaman
Copy link

@yuyuyu101 can you rebase and repush?

EventSocket will wrap different user event notification method like linux
eventfd, solaris port. Caller can user this to replace signal

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
@yuyuyu101
Copy link
Member Author

@dillaman done

TP_FIELDS(
ctf_integer_hex(void*, imagectx, imagectx)
ctf_integer(int, numcomp, numcomp)
ctf_integer(int, max, max)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter max doesn't exist

@dillaman dillaman changed the title Adding eventfd support for LibRBD librbd: support eventfd for AIO completion notifications Nov 30, 2015
yuyuyu101 and others added 17 commits December 1, 2015 10:02
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Haomai Wang <haomai@xsky.com>
Signed-off-by: Haomai Wang <haomai@xsky.com>
Signed-off-by: Haomai Wang <haomai@xsky.com>
Signed-off-by: Haomai Wang <haomai@xsky.com>
Since xlist clear method invoked below is enough to disassociate the xlist
item from the xlist, so the remove_myself() call in the destructor is safe
to invoke since it's already been removed from the list.

Signed-off-by: Haomai Wang <haomai@xsky.com>
Signed-off-by: Haomai Wang <haomai@xsky.com>
Signed-off-by: Haomai Wang <haomai@xsky.com>
Signed-off-by: Haomai Wang <haomai@xsky.com>
dillaman pushed a commit that referenced this pull request Dec 1, 2015
librbd: support eventfd for AIO completion notifications

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
@dillaman dillaman merged commit 2884d8b into ceph:master Dec 1, 2015
@yuyuyu101 yuyuyu101 deleted the wip-librbd-ap branch December 1, 2015 14:39
@yuyuyu101
Copy link
Member Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants