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

2005-12-14 Thread Ingo Oeser
Sridhar Samudrala wrote: > The only reason i made these macros is that i would expect this to a compile > time configurable option so that there is zero overhead for regular users. > > #ifdef CONFIG_CRIT_SOCKET > #define SK_CRIT_ALLOC(sk, flags) ((sk->sk_allocation & __GFP_CRITICAL) | > flags) >

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

2005-12-14 Thread Sridhar Samudrala
On Wed, 2005-12-14 at 04:12 -0800, Mitchell Blank Jr wrote: > Alan Cox wrote: > > But your user space that would add the routes is not so protected so I'm > > not sure this is actually a solution, more of an extended fudge. > > Yes, there's no 100% solution -- no matter how much memory you reserve

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

2005-12-14 Thread Sridhar Samudrala
On Wed, 2005-12-14 at 11:17 +, Alan Cox wrote: > On Mer, 2005-12-14 at 01:12 -0800, Sridhar Samudrala wrote: > > Pass __GFP_CRITICAL flag with all allocation requests that are critical. > > - All allocations needed to process incoming packets are marked as CRITICAL. > > This includes the allo

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

2005-12-14 Thread Ingo Oeser
Mitchell Blank Jr wrote: > Alan Cox wrote: > > > +#define SK_CRIT_ALLOC(sk, flags) ((sk->sk_allocation & __GFP_CRITICAL) | > > > flags) > > > > Lots of hidden conditional logic on critical paths. > > How expensive is it compared to the allocation itself? Cost is readability here. You should ope

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

2005-12-14 Thread Mitchell Blank Jr
Alan Cox wrote: > But your user space that would add the routes is not so protected so I'm > not sure this is actually a solution, more of an extended fudge. Yes, there's no 100% solution -- no matter how much memory you reserve and how many paths you protect if you try hard enough you can come up

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

2005-12-14 Thread Alan Cox
On Mer, 2005-12-14 at 01:12 -0800, Sridhar Samudrala wrote: > Pass __GFP_CRITICAL flag with all allocation requests that are critical. > - All allocations needed to process incoming packets are marked as CRITICAL. > This includes the allocations > - made by the driver to receive incoming pac