On Mon, 25 Apr 2016 15:56:58 +0300
Ian Ray <ian....@ge.com> wrote:

> On Mon, Apr 25, 2016 at 02:40:31PM +0200, Marek Chalupa wrote:
> > 
> > On 04/25/16 12:20, Pekka Paalanen wrote:  
> > > On Mon, 25 Apr 2016 11:33:00 +0200
> > > Marek Chalupa <mchqwe...@gmail.com> wrote:
> > >  
> > >> If posix_fallocate or ftruncate is interrupted by signal
> > >> while working, we return -1 as fd and the allocation process
> > >> returns BadAlloc error. That causes xwayland clients to abort
> > >> with 'BadAlloc (insufficient resources for operation)'
> > >> even when there's a lot of resources available.
> > >>
> > >> Fix it by trying again when we get EINTR.  
> 
> I have recently hit this, on a rather low powered platform, and solved
> the problem slightly differently by falling-back to ftruncate. (Posted
> to the list just now in a separate thread.)
> 
> <snip>
> > > Hi Marek,
> > >
> > > curious, how did you hit this case? And is the signal that intercept
> > > these usually the smart scheduler's SIGALRM?  
> > 
> > Hi Pekka,
> > 
> > under gnome-shell it's enough to open terminator and resize it very
> > quickly. Under Weston (and also gnome-shell) I hit this with Firefox.
> > Just start it and in a moment it goes down with this error.  
> 
> I wonder if immediately falling-back to ftruncate is too aggressive?

Hello Ian,

I would not do that, because it exposes Xwayland to SIGBUS in case the
tmpfs runs of out space. It might be a usable workaround for you,
though.

I would really like to know if there is something wrong on your
platform that makes fallocate on tmpfs so painfully slow, and is
fallocate supposed to make progress if simply restarted like in Marek's
patch.

In the mean time, Marek's patch gets my
Reviewed-by: Pekka Paalanen <pekka.paala...@collabora.co.uk>
because it is an improvement for many (most?) systems.


Thanks,
pq

Attachment: pgptnsGE7tGAM.pgp
Description: OpenPGP digital signature

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to