Steven Dake wrote:
> In a recent patch to validate that shared memory is actually available
> for use, Angus used a write call with 64 byte writes at a time to
> validate the space was available before mmap()ing. This results in alot
> of write() syscalls which is slowing down ipc connection creation.
>
> This patch uses a page sized write() call.
>
> Regards
> -steve
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Openais mailing list
> [email protected]
> https://lists.linux-foundation.org/mailman/listinfo/openais
Steve,
+ }
+ memset (buffer, 0, page_size);
+ for (i = 0; i < (bytes / page_size); i++) {
retry_write:
Seems correct, but it isn't. Let's say, page_size is 4096 and you want
preallocate 4093 bytes. Code will not work as expected.
Take a look to my patch for whitetank, where exactly this is solved.
Regards,
Honza
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais