> 1) During my functions for dumping the data I have, do I need to put
> locks around the code? I regularly freeze up during those routines.
> I find this odd because I'm only doing reads from that buffer and
> updates should be able to happen without it affecting my code.
It is strange. Maybe, your /proc reading procedure is incorrect
and loops sometimes. Did you try to catch loop with sysreq?
BTW locks may be necessary only in the case if you need "atomic" snapshots
of counters. As I understand, atomicity of your data is not very important.
> 2) Would it be better to dynamically allocate memory with kmalloc
> instead of doing an unsigned int backlog_track[SIZE_X][SIZE_Y]??
It does not matter. Actually, if SIZE_X,SIZE_Y are enough large,
you will not able to kmalloc or eat lots of space, when kmalloc rounds to 2^n.
If data buffer is large, vmalloc is the best variant.
Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu