All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about svc_age_temp_sockets
@ 2007-09-09 17:33 Tom Tucker
  2007-09-14  9:16 ` Greg Banks
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Tucker @ 2007-09-09 17:33 UTC (permalink / raw)
  To: nfs


I'm confused about how svc_age_temp_sockets is supposed to work. From my
reading, the timer fires every 6 minutes and calls the svc_age_temp_sockets
function. This function sweeps the tempsocks list and unconditionally
test_and_sets every transport SK_OLD. If it was the first to set it, it will
test if the transport's not busy and then shut it down. So here's what I
don't get:

- A transport that was added 5 minutes into the timer period, could get shut
down after only a minute of idleness

- A transport that was busy may _never_ get shutdown because it will already
have it's SK_OLD bit set when it comes back through 6 minutes later. If no
more requests ever arrive from the client, the SK_OLD bit will never get
reset and the test_and_set check skips the transport if the bit's already
set.

- There's a check for a zero sk_inuse count. I don't see a legitimate way
for a socket to be on the tempsocks list with a zero refcount.

Am I just hopelessly confused here or is this code broken?

Tom



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Question about svc_age_temp_sockets
@ 2007-09-10  8:33 Wolfgang Walter
  2007-09-10 14:04 ` Tom Tucker
  2007-09-14  9:19 ` Greg Banks
  0 siblings, 2 replies; 5+ messages in thread
From: Wolfgang Walter @ 2007-09-10  8:33 UTC (permalink / raw)
  To: Tom Tucker; +Cc: nfs

> I'm confused about how svc_age_temp_sockets is supposed to work. From my
> reading, the timer fires every 6 minutes and calls the svc_age_temp_socke=
ts
> function. This function sweeps the tempsocks list and unconditionally
> test_and_sets every transport SK_OLD. If it was the first to set it, it
> will test if the transport's not busy and then shut it down. So here's wh=
at
> I don't get:
>
> - A transport that was added 5 minutes into the timer period, could get
> shut down after only a minute of idleness
>
> - A transport that was busy may _never_ get shutdown because it will
> already have it's SK_OLD bit set when it comes back through 6 minutes
> later. If no more requests ever arrive from the client, the SK_OLD bit wi=
ll
> never get reset and the test_and_set check skips the transport if the bit=
's
> already set.

Hmm, I think it works like that:

		if (!test_and_set_bit(SK_OLD, &svsk->sk_flags))
                        continue;

So: if SK_OLD is NOT already set then
		=

		  !test_and_set_bit(SK_OLD, &svsk->sk_flags)

is true and therefor continue is executed (so the transport is not closed,
only SK_OLD is set).

If SK_OLD is already set then this evaluates to false and the transport is =

removed. This means that SK_OLD was set when the timer run the last time an=
d =

there was no request has arrived since then.

>
> - There's a check for a zero sk_inuse count. I don't see a legitimate way
> for a socket to be on the tempsocks list with a zero refcount.
>

This is something I don't understand, too. See my posting:

http://marc.info/?l=3Dlinux-nfs&m=3D118927571630268&w=3D4

As far as I see it does not work.

Regards,
-- =

Wolfgang Walter
Studentenwerk M=FCnchen
Anstalt des =F6ffentlichen Rechts

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-09-14  9:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-09 17:33 Question about svc_age_temp_sockets Tom Tucker
2007-09-14  9:16 ` Greg Banks
  -- strict thread matches above, loose matches on Subject: below --
2007-09-10  8:33 Wolfgang Walter
2007-09-10 14:04 ` Tom Tucker
2007-09-14  9:19 ` Greg Banks

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.