Thread (17 messages) 17 messages, 3 authors, 2016-08-15

Re: [RFC PATCH v7 7/7] Restartable sequences: self-tests

flat view

From: Dave Watson <hidden>
Date: 2016-07-24 18:02:32
Also in: lkml

Possibly related (same subject, not in this thread)

quoted
+static inline __attribute__((always_inline))
+bool rseq_finish(struct rseq_lock *rlock,
+ intptr_t *p, intptr_t to_write,
+ struct rseq_state start_value)
quoted
This ABI looks like it will work fine for our use case. I don't think it
has been mentioned yet, but we may still need multiple asm blocks
for differing numbers of writes. For example, an array-based freelist push:
quoted
void push(void *obj) {
if (index < maxlen) {
freelist[index++] = obj;
}
}
quoted
would be more efficiently implemented with a two-write rseq_finish:
quoted
rseq_finish2(&freelist[index], obj, // first write
&index, index + 1, // second write
...);
Would pairing one rseq_start with two rseq_finish do the trick
there ?
Yes, two rseq_finish works, as long as the extra rseq management overhead
is not substantial.  --
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help