All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: URCU use cases
       [not found] <CANRvXTM__Z4M2zThuz4+jUUGowd7QFWL79M2gYD9txwcbHZnKA@mail.gmail.com>
@ 2014-09-06 13:18 ` Michel Dagenais
       [not found] ` <2038780079.12468624.1410009481977.JavaMail.root@polymtl.ca>
  1 sibling, 0 replies; 3+ messages in thread
From: Michel Dagenais @ 2014-09-06 13:18 UTC (permalink / raw)
  To: Ilya Mirsky; +Cc: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 702 bytes --]

> Studying the API of URCU it seems that it's mostly intended for
> link-based data structures, such a lists. Suppose I have a large
> struct that is often accessed by many readers, and some writers that
> occasionally update few fields each time. If I understand correctly,
> using URCU, the writers would have to make a copy of the struct on
> each write, make the changes, and then publish the updated version.
> This is wasteful for small updates to a large struct.
RCU / URCU is efficient for read-mostly structures. In that case, copying a large struct may not be such a problem since it is infrequent. You also have the option of splitting the structure into smaller independently updated ones. 

[-- Attachment #1.2: Type: text/html, Size: 1614 bytes --]

[-- Attachment #2: Type: text/plain, Size: 155 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: URCU use cases
       [not found] ` <2038780079.12468624.1410009481977.JavaMail.root@polymtl.ca>
@ 2014-09-11  9:22   ` Ilya Mirsky
  0 siblings, 0 replies; 3+ messages in thread
From: Ilya Mirsky @ 2014-09-11  9:22 UTC (permalink / raw)
  To: Michel Dagenais; +Cc: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 1097 bytes --]

That's what I thought, thanks for confirming my understanding.
I still miss something about URCU's implementation.
How would a code that operates on multiple structures look like,
as all the api functions are context free (read_lock(), rcu_synchronize(),
etc. have no parameters)?

Thanks,
Ilya

On Sat, Sep 6, 2014 at 4:18 PM, Michel Dagenais <michel.dagenais@polymtl.ca>
wrote:

> Studying the API of URCU it seems that it's mostly intended for link-based
> data structures, such a lists. Suppose I have a large struct that is often
> accessed by many readers, and some writers that occasionally update few
> fields each time. If I understand correctly, using URCU, the writers would
> have to make a copy of the struct on each write, make the changes, and then
> publish the updated version. This is wasteful for small updates to a large
> struct.
>
> RCU / URCU is efficient for read-mostly structures. In that case, copying
> a large struct may not be such a problem since it is infrequent. You also
> have the option of splitting the structure into smaller independently
> updated ones.
>
>

[-- Attachment #1.2: Type: text/html, Size: 2428 bytes --]

[-- Attachment #2: Type: text/plain, Size: 155 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* URCU use cases
@ 2014-09-06  8:34 Ilya Mirsky
  0 siblings, 0 replies; 3+ messages in thread
From: Ilya Mirsky @ 2014-09-06  8:34 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 542 bytes --]

Hi,

Studying the API of URCU it seems that it's mostly intended for link-based
data structures, such a lists. Suppose I have a large struct that is often
accessed by many readers, and some writers that occasionally update few
fields each time. If I understand correctly, using URCU, the writers would
have to make a copy of the struct on each write, make the changes, and then
publish the updated version. This is wasteful for small updates to a large
struct.

Am I missing something here? Is there a better way of doing this?

Thanks,
Ilya

[-- Attachment #1.2: Type: text/html, Size: 650 bytes --]

[-- Attachment #2: Type: text/plain, Size: 155 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-11  9:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CANRvXTM__Z4M2zThuz4+jUUGowd7QFWL79M2gYD9txwcbHZnKA@mail.gmail.com>
2014-09-06 13:18 ` URCU use cases Michel Dagenais
     [not found] ` <2038780079.12468624.1410009481977.JavaMail.root@polymtl.ca>
2014-09-11  9:22   ` Ilya Mirsky
2014-09-06  8:34 Ilya Mirsky

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.