Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Nov 2005 20:49:05 +1100
From:      Peter Jeremy <PeterJeremy@optushome.com.au>
To:        kamal kc <kamal_ckk@yahoo.com>
Cc:        freebsd <freebsd-hackers@freebsd.org>, Giorgos Keramidas <keramida@linux.gr>
Subject:   Re: allocating 14KB memory per packet compression/decompression results in vm_fault
Message-ID:  <20051104094904.GL39882@cirb503493.alcatel.com.au>
In-Reply-To: <20051104065630.9592.qmail@web35704.mail.mud.yahoo.com>
References:  <20051103145729.GA2088@flame.pc> <20051104065630.9592.qmail@web35704.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[dropping -net]
On Thu, 2005-Nov-03 22:56:30 -0800, kamal kc wrote:
>as i said before the compression/decompression works
>fine. but soon the kernel would panic with one 
>of the vm_fault: error message.

What's the exact panic and traceback?  Have you enabled the various
sanity checks (WITNESS, DEBUG_MEMGUARD, INVARIANTS)?

>what would be the best possible way to 
>allocate/deallocate 14KB memory per packet without 
>causing vm_faults ?? 

The most efficient way would be to statically allocate the dictionary
and string tables.  The downside is that you then need to serialise
the [de]compression.

You could look at zone(9) as an alternative to malloc(9).

>is there anything i am missing ??

- Are you correctly allocating the mbuf for the outgoing packet correctly?
- Are you correctly freeing the mbuf for the incoming packet?
- Are you sure that you're not writing outside the bounds of one of the
  memory blocks you're allocating?

-- 
Peter Jeremy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051104094904.GL39882>