Re: [PATCH] client: Allow send error recovery without an abort

2019-01-18 Thread Pekka Paalanen
On Mon, 7 Jan 2019 17:19:20 -0800 Lloyd Pique wrote: > Hi Pekka, > > I did upload a new set of patches back in September: > > https://patchwork.freedesktop.org/patch/247841/ > https://patchwork.freedesktop.org/patch/247842/ > https://patchwork.freedesktop.org/patch/247843/ > > I understand fro

Re: [PATCH] client: Allow send error recovery without an abort

2018-08-07 Thread Pekka Paalanen
On Mon, 6 Aug 2018 14:54:16 -0700 Lloyd Pique wrote: > Hi Pekka, > > Sorry for the lack of any updates for (over) a month. I was on holiday for > a while, and had a few other things come up delaying me from getting back > to this. Hi, so was I! :-) > > I've created a first set of patches (se

Re: [PATCH] client: Allow send error recovery without an abort

2018-06-21 Thread Pekka Paalanen
On Tue, 19 Jun 2018 21:06:15 -0700 Lloyd Pique wrote: > I did think of one more option to avoid the dup() abort. > > - Open MAX_FDS_OUT to reserve a pool of fds (open /dev/nul or something > innocuous) > - Whenever the core client needs to dup a caller fd, use dup2/dup3 on an fd > in the pool >

Re: [PATCH] client: Allow send error recovery without an abort

2018-06-21 Thread Pekka Paalanen
On Tue, 19 Jun 2018 13:23:44 -0700 Lloyd Pique wrote: > Hi Pekka, > > - ABI to query a "flush recommended" flag; This flag would be set when > > the soft-buffer is at least half-full, and cleared when it drops > > to... below half? empty? > > > This sounds reasonable, I'm happy to incorp

Re: [PATCH] client: Allow send error recovery without an abort

2018-06-21 Thread Pekka Paalanen
On Tue, 19 Jun 2018 12:10:36 -0700 Lloyd Pique wrote: > Hi Pekka, > > On Tue, Jun 19, 2018 at 5:12 AM Pekka Paalanen wrote: > > > If I'm reading the code right, MAX_FDS_OUT is only a limit for a single > > sendmsg() call. The fds_out buffer is capable of holding 1k fds. > > > > > We have 4

Re: [PATCH] client: Allow send error recovery without an abort

2018-06-19 Thread Lloyd Pique
Hi Pekka, On Tue, Jun 19, 2018 at 5:12 AM Pekka Paalanen wrote: > I think the aim should be to remove the abort(). I do not see any > reason to leave it in even as an option. > Thank you. Will proceeed in that direction. > The soft-buffer in libwayland-client is quite small, the kernel socket

Re: [PATCH] client: Allow send error recovery without an abort

2018-06-19 Thread Pekka Paalanen
On Mon, 18 Jun 2018 19:54:23 -0700 Lloyd Pique wrote: > Let me take things back a step. I was a bit too hasty in suggesting > something that would work for me for the fact that MAX_FDS_OUT is small. In > our client the buffer creation ends up being serialized, and so only one > thread will be cre

Re: [PATCH] client: Allow send error recovery without an abort

2018-06-19 Thread Pekka Paalanen
On Mon, 18 Jun 2018 18:41:28 -0700 Lloyd Pique wrote: > Hi Pekka! > > Thank you for the feedback. In the end, I think we have a good basic > agreement about the patch, and after reading your linked bug ( > https://gitlab.freedesktop.org/wayland/wayland/issues/12), which I was > previously unawar

Re: [PATCH] client: Allow send error recovery without an abort

2018-06-18 Thread Lloyd Pique
Hi Pekka! Thank you for the feedback. In the end, I think we have a good basic agreement about the patch, and after reading your linked bug ( https://gitlab.freedesktop.org/wayland/wayland/issues/12), which I was previously unaware of, it sounds like I will be just stripping out the callback+retry

Re: [PATCH] client: Allow send error recovery without an abort

2018-06-18 Thread Pekka Paalanen
On Tue, 5 Jun 2018 18:14:54 -0700 Lloyd Pique wrote: > Introduce a new call wl_display_set_error_handler_client(), which allows > a client to register a callback function which is invoked if there is an > error (possibly transient) while sending messages to the server. > > This allows a Wayland