Re: [RFC][PATCH 0/3] TCP/IP Critical socket communication mechanism



David S. Miller wrote:
From: Matt Mackall <mpm@xxxxxxxxxxx>
Date: Wed, 14 Dec 2005 21:02:50 -0800


There needs to be two rules:

iff global memory critical flag is set
- allocate from the global critical receive pool on receive
- return packet to global pool if not destined for a socket with an
 attached send mempool


This shuts off a router and/or firewall just because iSCSI or NFS peed
in it's pants.  Not really acceptable.


But that should only happen (shut off a router and/or firewall) in cases where we now completely deadlock and never recover, including shutting off the router and firewall, because they don't have enough memory to recv packets either.


I think this will provide the desired behavior


It's not desirable.

What if iSCSI is protected by IPSEC, and the key management daemon has
to process a security assosciation expiration and negotiate a new one
in order for iSCSI to further communicate with it's peer when this
memory shortage occurs?  It needs to send packets back and forth with
the remove key management daemon in order to do this, but since you
cut it off with this critical receive pool, the negotiation will never
succeed.


I guess IPSEC would be a critical socket too, in that case. Sure there is nothing we can do if the daemon insists on allocating lots of memory...

This stuff won't work.  It's not a generic solution and that's
why it has more holes than swiss cheese. :-)

True it will have holes. I think something that is complementary and would be desirable is to simply limit the amount of in-flight writeout that things like NFS allows (or used to allow, haven't checked for a while and there were noises about it getting better).

--
SUSE Labs, Novell Inc.

Send instant messages to your online friends http://au.messenger.yahoo.com -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/




Relevant Pages

  • Re: Help!!! Memory allocation!!!
    ... I'm trying to map the continuous memory to user space address. ... dont know if the MmAllocateContiguousMemory didnt allocate the continuous ... memory from non-paged pool but from paged pool or some other places, ... Lock it first whatever it is allocated from nonpaged pool or not ...
    (microsoft.public.development.device.drivers)
  • Re: Assigning data structures to certain memory locations during porting
    ... "Dynamically allocating and freeing memory is often discouraged in ... there's no possibility of running ouf of memory later on." ... I thought the primary reason for dynamic allocation was to allocate ... The pool is just a preallocated chunk of memory which is ...
    (comp.arch.embedded)
  • Re: kernel memory
    ... Kernel virtual address space is used for a number of things. ... Pat of this are the memory pools, from which you can allocate memory for your drivers. ... You can allocate physical memory using a DDI like MmAllocatePagesForMdl and then map those into the system address space. ... That's probably the easiest way to explain why you cannot allocate 1GB of non-paged pool for yourself:) ...
    (microsoft.public.development.device.drivers)
  • [PATCH] make genpool allocator adhere to kernel-doc standards
    ... * Create a new special memory pool that can be used to manage special purpose ... * Add a new chunk of special memory to the specified pool. ... * Allocate the requested number of bytes from the specified pool. ...
    (Linux-Kernel)
  • Re: [RFC][PATCH 0/3] TCP/IP Critical socket communication mechanism
    ... >> I think we need a global receive pool and per-socket send pools. ... The device drivers allocate packets ... It is fully anonymous memory, ... > in response to hitting those water marks. ...
    (Linux-Kernel)