Re: segmentation question

2010-10-02 Thread Raz
Can you share the code? On 02/10/2010 12:10, Daniel Baluta daniel.bal...@gmail.com wrote: Hi, On Sat, Oct 2, 2010 at 12:38 AM, Sri Ram Vemulpali sri.ram.gm...@gmail.com wrote: Hi All, I am developing segmentation for my kernel. In that process I choose to divide ... You don't have to

Re: Integer Division on 32 Bit Machines

2010-09-07 Thread Raz
use do_div On Tue, Sep 7, 2010 at 1:02 PM, Andreas Leppert wu...@web.de wrote: Hello, I have encountered a problem on my 32 bit machine. Here some code snippets: typedef signed long s64; asmlinkage long sys_optStopMeasure(int __user workamount) { s64 currentPerformance,

porting to linux - survey

2010-08-14 Thread Raz
source control system ? bug tracking system ? Did you keep your code closed or is it open/partialy open ? thank you raz -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies to ecar...@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ

Re: Get UTC from RDTSC

2010-07-18 Thread Raz
On Sun, Jul 18, 2010 at 5:32 AM, Mulyadi Santosa mulyadi.sant...@gmail.comwrote: Here I see you begun to understand... now since I forgot what's that CMOS clock real name isI can no longer help.. how about checking what gettimeofday() syscall really does? you can boot kernel with

Re: How to check whether executing in atomic context?

2009-10-14 Thread Raz
take a look at might_sleep On Wed, Oct 14, 2009 at 10:09 AM, Leonidas . leonidas...@gmail.com wrote: Hi List, I am aware of in_interrupt() call which can be used to check current context and take action accordingly. Is there any api which can help figure out whether we are executing

Re: the sendfile function call of file_operations

2009-10-13 Thread Raz
http://linuxgazette.net/issue91/tranter.html On Tue, Oct 13, 2009 at 5:48 PM, loody milo...@gmail.com wrote: Dear all: I saw there is a callback function in file_operations, sendfile, and it seems user mode can pass file handle to kernel by this function. is there any document or example can

Re: Copying kernel module error messages to userspace

2009-09-15 Thread raz ben yehuda
i would i have used netconsole. On Tue, 2009-09-15 at 11:45 +0530, Leonidas . wrote: On Mon, Sep 14, 2009 at 7:00 PM, Pei Lin telent...@gmail.com wrote: 2009/9/14 Leonidas . leonidas...@gmail.com: On Mon, Sep 14, 2009 at 4:01 PM,

Re: zero copy on socket recv

2009-08-17 Thread Raz
I have implemented receive zero copy. but i did in UDP and not TCP. what protocol do u use ? On Mon, Aug 17, 2009 at 11:55 AM, Rahul K Patel rahulk.pa...@einfochips.com wrote: Hi, I know about sendfile api which can be used to implement zero copy for sending data over socket. But I want to

Re: Cache Size

2009-08-17 Thread Raz
better if you simply read what programmer should know about memory by Urlich drepper. On Mon, Aug 17, 2009 at 11:39 AM, manish rangankar rangankarman...@gmail.com wrote: Hi All, How can we determine the size of cache? For example, In UFS filesystem some cache is reserved for CG. I read

Re: want to write a file system

2009-08-03 Thread Raz
I have written a file system in linux several years ago. I used a book called UNIX FILE SYSTEM by Steve Pate On Mon, Aug 3, 2009 at 12:54 PM, Anuz Pratap Singh Tomar chambilketha...@gmail.com wrote: On Mon, Aug 3, 2009 at 2:34 PM, Srdjan Todorovic todorovi...@googlemail.com wrote: Hi, On

Re: can u tell me how to write socket in a kernel and connect through it?

2009-07-12 Thread Raz
i suggest you take a look at khttpd or tux On Sun, Jul 12, 2009 at 12:25 PM, krushnaal paikrisonea...@gmail.com wrote: can u tell me how to write socket programs in a kernel and connect through it? -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies to

Re: kernel debugging in 30 minutes or less

2009-07-10 Thread Raz
an oops is more than essential. it is a must. Raz On Fri, Jul 10, 2009 at 3:37 AM, Leandro Dorileoldori...@gmail.com wrote: Hi Robert On Thu, Jul 9, 2009 at 11:19 AM, Robert P. J. Dayrpj...@crashcourse.ca wrote: On Thu, 9 Jul 2009, Mulyadi Santosa wrote: I think one of the core skills one

Re: Permission to use list.h and atomic.h in user space

2009-06-23 Thread Raz
On Tue, Jun 23, 2009 at 3:04 AM, Robert Hancockhancock...@gmail.com wrote: On 06/22/2009 07:44 AM, Raz wrote: Hello May I have permission to use atomic64.h ,atomic32.h and list.h in a proprietary software ? I do not know who the authors are. Thank you Raz You would likely have

Permission to use list.h and atomic.h in user space

2009-06-22 Thread Raz
Hello May I have permission to use atomic64.h ,atomic32.h and list.h in a proprietary software ? I do not know who the authors are. Thank you Raz -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies to ecar...@nl.linux.org Please read the FAQ at http://kernelnewbies.org

Re: Question regarding spinlock

2009-05-18 Thread raz ben yehuda
On Tue, 2009-05-19 at 00:49 +0700, Mulyadi Santosa wrote: On Tue, May 19, 2009 at 12:33 AM, Ole Loots o...@monochrom.net wrote: Hello to the list, I got a question about spinlocks. Here is some pseudo-code: my_external_int_handler(...) { spin_lock(my_lock); // do things...

Re: TCP kernel server

2009-03-22 Thread Raz
you have to aware to the difficulties in implementing a descent server in kernel space before diving into such depth. why do you want to do it kernel ? On Wed, Mar 18, 2009 at 1:18 PM, Razvan Deaconescu raz...@anaconda.cs.pub.ro wrote: On Wed, 2009-03-18 at 11:20 +0200, Mark Ryden wrote: Hello

Re: timeout of 10 usecs

2009-03-17 Thread Raz
you can try and use hpet directly. 10MHZ is the minimum by spec. On Mon, Mar 16, 2009 at 2:07 PM, Denis Borisevich dennis...@gmail.com wrote: 2009/3/16 Matthias Kaehlcke matth...@kaehlcke.net: El Mon, Mar 16, 2009 at 01:03:35PM +0300 Denis Borisevich ha dit: 2009/3/16 Razvan Deaconescu raz

Re: Wait for two clock ticks

2009-03-08 Thread Raz
Make sure your processor will not hang to long, a processor must walk through a quiesce state after some time else you will get RCU starvation. On Sun, Mar 8, 2009 at 9:50 PM, Asim linka...@gmail.com wrote: Thanks guys. The msleep solution looks good, but if my device does its work in 1

Re: Wait for two clock ticks

2009-03-06 Thread Raz
I implemented a timer that can operate without interrupts. but it relies on smp or smt. what do you need it for ? On Fri, Mar 6, 2009 at 5:08 PM, Greg Freemyer greg.freem...@gmail.com wrote: On Fri, Mar 6, 2009 at 9:59 AM, Asim linka...@gmail.com wrote: Yes - Actually I need to wait for a

Re: Wait for two clock ticks

2009-03-06 Thread Raz
I cannot use jiffies. Any simple solution would be appreciated. so why not use getnstimeofday ? Regards, Asim On 3/6/09, Raz razi...@gmail.com wrote: I implemented a timer that can operate without interrupts. but it relies on smp or smt. what do you need it for ? On Fri, Mar 6, 2009 at 5

Who originated the SI ?

2009-02-01 Thread Raz
I am having a storm of softirqs every few seconds. How can I tell which tasklet/softirq is responsible for a burst of SI in top ? raz -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies to ecar...@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ

Re: Linux and the L1/L2 caches

2008-10-22 Thread Raz
These is an excellent atricle What every programmer should about memory of Erlich dreeper. you will see what happens when you exceed L2,L1... On Wed, Oct 22, 2008 at 1:54 PM, Rene Herman [EMAIL PROTECTED] wrote: On 22-10-08 11:25, Ray Kinsella wrote: I have a process that fork's itself into

Re: any one knows how to truncate a file from its begining ?

2008-10-22 Thread Raz
, Raz [EMAIL PROTECTED] wrote: or a file system that can do it ? What does that mean ??? just doing $ filename on command line will truncate itor probably man ftruncate can help you. Thanks - Manish thank you raz -- To unsubscribe from this list: send an email

Re: any one knows how to truncate a file from its begining ?

2008-10-22 Thread Raz
whileFILE { $count++; if(100 $count 300) { next; } print $_ } both methods create a copy of the file and you can just copy your file over it. good luck On Wed, Oct 22, 2008 at 12:31 PM, Raz [EMAIL PROTECTED] wrote: no. I mean i want to remove a portion of the file

Re: What are the different timer that exists in the kernel?

2008-09-20 Thread Raz
The bellow is a list of Linux timers listed in Bovet's[1] Book. 2.1 PIT - programmable interval timer PIT is Linux default scheduler timer. Its frequency is 1KHZ at best. 2.2 TSC - Time Stamp counter All x86 processors include a CLK processor input pin. The processor has a timer which

Re: Why each c text file I take from the kernel source tree is not indented ?

2008-09-12 Thread Raz
On Tue, Sep 9, 2008 at 6:43 PM, Michael Blizek [EMAIL PROTECTED] wrote: Hi! On 09:50 Tue 09 Sep , Raz wrote: How a newbie like me is supposed not to break any coding style rule ? I use vim, not emacs . Do you have a vim configuration file for guys like me ? I truly hope I am

Re: About sending signals from kernel space to user space

2008-09-03 Thread Raz
tasklets/softirqs and evolution from bottom half. i suggest you read Robert Love excellent book, chapter 6. On Wed, Sep 3, 2008 at 1:01 AM, Om [EMAIL PROTECTED] wrote: Raz wrote: i would suggest you schedule a tasklet. doing staff like from ISR , from my opinion is too risky and bug prone

RE: About sending signals from kernel space to user space

2008-09-02 Thread Raz
Module/Driver. How can I do that in context of interrupt Service Routine? I found that using kill_async, it is possible to send SIGIO signal and handling that in User . Is there anyother way to achieve this ? -- Raz -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies

service oriented scheduler

2008-09-02 Thread Raz
hello I will be greatful for any criticism. In short, i offload a processor and assign it a service. raz x Service Oriented Scheduler MSC Concluding Assignment Table of Content 1. Document Content