dear all,
i created a kernel daemon thread using the SYSINIT().
i want that daemon thread to do more cpu
intensive tasks and that's why
i want to give it more cpu time.
my daemon thread get a priority of -84 and
a nice value of 0.
i guess when the nice value is 0 it affects
its scheduling.
--- kamal kc [EMAIL PROTECTED] wrote:
Queue a task to a taskqueue. Behind the scenes
that
will invoke a swi_add if
you use the taskqueue_swi queue. However, given
that you want to do some
rather complicated work, you'd be better off
creating a dedicated taskqueue
thread
--- John Baldwin [EMAIL PROTECTED] wrote:
On Thursday 12 January 2006 06:19 am, kamal kc
wrote:
--- kamal kc [EMAIL PROTECTED] wrote:
Queue a task to a taskqueue. Behind the
scenes
that
will invoke a swi_add if
you use the taskqueue_swi queue. However,
given
dear everybody,
i had previous thread going on about the cpu load
average. and had some discussion regarding it. i have
a newer thing to discuss on so i started this thread.
as i mentioned earlier i had put some code in the
bridge.c
that performed compression which took a long time and
hence
--- John Baldwin [EMAIL PROTECTED] wrote:
the man page discussed the swi_add() and
swi_sched()
functions.
what i don't understand is, how do i register my
handler
function ??
if i use the swi_add() for that purpose what
do i use for the void *arg argument.
and how can i
--- John Baldwin [EMAIL PROTECTED] wrote:
the man page discussed the swi_add() and
swi_sched()
functions.
what i don't understand is, how do i register my
handler
function ??
if i use the swi_add() for that purpose what
do i use for the void *arg argument.
and how can i
--- Dan Nelson [EMAIL PROTECTED] wrote:
In the last episode (Jan 09), kamal kc said:
dear everybody,
i want to use the routine get_system_info() to get
the load averages
of the cpu. i found it that top uses it.
get_system_info is just a function /in/ top itself
that gets the CPU
--- Peter Jeremy [EMAIL PROTECTED] wrote:
On Mon, 2006-Jan-09 23:59:10 -0800, kamal kc wrote:
thanks i tried getloadavg() it worked.
but when i tried to put it in the kernel the kernel
failed to link.
You didn't mention the kernel bit before. To access
the load average in the kernel
--- Tofik Suleymanov [EMAIL PROTECTED] wrote:
kamal kc wrote:
--- Peter Jeremy [EMAIL PROTECTED]
wrote:
thanks i tried getloadavg() it worked.
but when i tried to put it in the kernel the
kernel
failed to link.
You didn't mention the kernel bit before. To
access
the load average
dear everybody,
i want to use the routine get_system_info() to get the
load
averages of the cpu. i found it that top uses it.
but i do not know which object files do i need to link
it to
my program. also the struct system_info is defined
in the machine.h of the /usr/src/contrib/top. do i
need
On Mon, 2006-Jan-09 19:14:53 -0800, kamal kc wrote:
i want to use the routine get_system_info() to get
the
load averages of the cpu. i found it that top uses
it.
The approved mechanism is via the sysctl(3) name
vm.loadavg or OID
CTL_VM.VM_LOADAVG - which returns a struct loadavg.
See
dumps here that may help
some of you suggest me whether there is anything i
can possibly do in order to solve this panic.
Is the problem related to memory leaks or sleeping
on mutexes or some other causes.
i have added my function just before the
IFQ_HANDOFF().
thanks,
kamal kc
,
kamal
Xin LI [EMAIL PROTECTED] wrote: Hi,
On 12/25/05, kamal kc wrote:
[...]
Is the problem related to memory leaks or sleeping
on mutexes or some other causes.
From the backtrace you have provided, it looks like a memory
corruption. In order to aid your debugging, you will want INVARIANTS
dear all,
i am written code for compression/decompression
which works very fine for binary as well as the
ascii data.
i have put the routine just before the
if_output() so that i do not interfere with
the kernel ip operations.
Now the compression/decompression works fine most
of the times
for my compression/decompression i use string
tables and temporary
buffers which take about 14KB of memory per
packet.
If you're allocating 14 KB of data just to send
(approximately) 1.4 KB
and then you throw away the 14 KB immediately, it
sounds terrible.
yes that's true.
since i
dear everybody,
i am trying to compress/decompress ip packets.
for this i have implemented the adaptive lzw compression.
i put the code in the ip_output.c and do my compression/decompression
just before the if_output() function call so that i won't interfere with
the ip processing of the kernel.
dear all,
i have to make modifictions to the kernel and
i have been encountering kernel crashes all the
time.
the kernel panics with messages starting with
vm_fault: and then crashes and reboots.
i guess i have done incorrect memory operations and
i want to know where i went wrong.
so i
dear all,
i have put sshd_enable=YES
and inetd_enable=YES
in /etc/rc.conf.
netstat -an also shows that the port numbers
21 and 22 are in listen state
ftp is uncommented in /etc/inetd.conf
but still the ssh/ftp services does not work.
when i ftp from another computer the netstat
shows
hello everybody,
i am new to kernel programming.
i am developing a compression/decompression
functionality in the ip layer.
i want to compile the kernel faster.
it would
be ok if the kernel doesn't have support for sound
devices, or other devices like scsi,usb etc. because
i would be using the
i come across this unusual problem.
i changed the ip_tos field of the struct ip and
computed
the checksum by using in_cksum().
when the packet uses only one mbuf the computed
checksum is ok but when the packet uses more than one
mbuf then the computed checksum is wrong.
eg. pinging with
i changed the ip_tos field of the struct ip and
computed the checksum
by using in_cksum().
when the packet uses only one mbuf the computed
checksum is ok but
when the packet uses more than one mbuf then the
computed checksum is
wrong.
Note that the IP header contains a checksum
void copy_the_memorybuffer(struct mbuf **m)
{
struct mbuf *mbuf_pointer=*m;
struct mbuf **next_packet;
next_packet=mbuf_pointer;
struct ip *my_ip_hdr;
my_ip_hdr=mtod((*next_packet),struct ip *);
my_ip_hdr-ip_tos=64;
my_ip_hdr-ip_sum=0;
void copy_the_memorybuffer(struct mbuf **m)
{
struct mbuf *mbuf_pointer=*m;
struct mbuf **next_packet;
next_packet=mbuf_pointer;
struct ip *my_ip_hdr;
my_ip_hdr=mtod((*next_packet),struct ip *);
my_ip_hdr-ip_tos=64;
my_ip_hdr-ip_sum=0;
this may be a trivial question for many of you
but i am confused in doing memory allocation in the
kernel.
sys/malloc.h has function prototypes for malloc()
kern/kern_malloc.c defines the malloc()
the malloc() definition is
void *
malloc(size, type, flags)
unsigned long size;
sys/malloc.h has function prototypes for malloc()
kern/kern_malloc.c defines the malloc()
the malloc() definition is
void *
malloc(size, type, flags)
unsigned long size;
struct malloc_type *type;
int flags;
i understand the size and flags but what shall i
does anybody know what is the best way
to start kernel hack.
Any references to any web page would
be appreciated
__
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
___
26 matches
Mail list logo