2010-01-06 14:35:55

by Anders Eriksson

[permalink] [raw]
Subject: Re: [linux-pm] [suspend/resume] Re: userspace notification from module


[email protected] said:
> Ummm sorry, it's IM App, to be realible for such app it's needed to close
> conn before suspend, because after resume tcp connections will wait
> (especialy on linux) quiet a lot of time to broke and reconnect.

I don't know the details here, but shouldn't the kernel fix this internally?

If sufficient time have elapsed so the kernel _should_ have sent keep alives
etc on an othervise idle connection, they shold be sent immediately on resume.
If the other end has disappeared by then, the resulting port unreachable
should trigger a local closure of the tcp state which the app will notice
(EBADF, or similar). Or?

Seems to me the kernel should sit on enough info to handle this nicely.


2010-01-06 20:37:44

by Bartłomiej Zimoń

[permalink] [raw]
Subject: Re: [linux-pm] [suspend/resume] Re: userspace notific ation from module

Dnia 6 stycznia 2010 15:35 Anders Eriksson <[email protected]> napisał(a):
>
> [email protected] said:
> > Ummm sorry, it's IM App, to be realible for such app it's needed to close
> > conn before suspend, because after resume tcp connections will wait
> > (especialy on linux) quiet a lot of time to broke and reconnect.
>
> I don't know the details here, but shouldn't the kernel fix this internally?
>
> If sufficient time have elapsed so the kernel _should_ have sent keep alives
> etc on an othervise idle connection, they shold be sent immediately on resume.
> If the other end has disappeared by then, the resulting port unreachable
> should trigger a local closure of the tcp state which the app will notice
> (EBADF, or similar). Or?
>
> Seems to me the kernel should sit on enough info to handle this nicely.
>

Good bohevior is client to close session before suspend to not loose any message.

Best Regards
Bartlomiej Zimon

2010-01-06 20:56:41

by Roland Dreier

[permalink] [raw]
Subject: Re: [linux-pm] [suspend/resume] Re: userspace notific ation from module


> thanks, applied.

MUA hickup, sorry -- replied to wrong mail.

2010-01-15 20:02:55

by Pavel Machek

[permalink] [raw]
Subject: Re: [linux-pm] [suspend/resume] Re: userspace notification from module

On Wed 2010-01-06 15:35:34, Anders Eriksson wrote:
>
> [email protected] said:
> > Ummm sorry, it's IM App, to be realible for such app it's needed to close
> > conn before suspend, because after resume tcp connections will wait
> > (especialy on linux) quiet a lot of time to broke and reconnect.
>
> I don't know the details here, but shouldn't the kernel fix this internally?
>
> If sufficient time have elapsed so the kernel _should_ have sent keep alives
> etc on an othervise idle connection, they shold be sent immediately on resume.
> If the other end has disappeared by then, the resulting port unreachable
> should trigger a local closure of the tcp state which the app will notice
> (EBADF, or similar). Or?

Patches welcome.
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html