Re: Kernel timers infrastructure

2011-09-12 Thread Marc Lörner
Hello again, it seems that uprintf needs a tty to put output to. I tried your code with printf instead of uprintf and got output to root-console ttyu0 every second. HTH, Marc Original-Nachricht > Datum: Mon, 12 Sep 2011 11:58:37 +0200 > Von: Filippo Sironi > An: &qu

Re: Re: Kernel timers infrastructure

2011-09-12 Thread Marc Lörner
Hello, what about changing order of callout_reset and uprintf? And your timeout isn't 1minute, it's one second! Regards, Marc >I already did that to ensure timer_event_handler would be called correctly. > >The result follows: > >freebsd# kldload ./timer.ko >timer_event_handler() with MOD_LOAD >

re: how to do page level mem alloc in freebsd kernel?

2010-07-15 Thread Marc Lörner
Hello, what about using contigmalloc(9), there you can specify alignment and boundary. HTH, Marc >Hi, > >I want to allocate one (or more) pages in kernel space. >I'm not sure what is the api in freebsd (something which >is similar to __get_free_pages() of linux). > >Would malloc(4096, ...) guara

Re: ide with DMA and ram > 4GB

2008-11-19 Thread Marc Lörner
On Thursday 13 November 2008 21:02, John Baldwin wrote: > On Wednesday 12 November 2008 12:23:14 pm Marc Lörner wrote: > > Hello, > > I just stepped over a problem with my IDE disk running in DMA-mode > > and having more than 4GB of RAM. > > It seems that the whole way d

ide with DMA and ram > 4GB

2008-11-12 Thread Marc Lörner
Hello, I just stepped over a problem with my IDE disk running in DMA-mode and having more than 4GB of RAM. It seems that the whole way down GEOM, ata-disk, ata-dma never is checked whether physical address of buffer is less than 4GB an so fits in 32bits. => when PRD is set the address is rigorously

Re: question on asymmetric mtx_[un]lock_sleep

2008-09-17 Thread Marc Lörner
On Wednesday 10 September 2008 20:09, John Baldwin wrote: > On Wednesday 10 September 2008 04:19:30 am Marc Lörner wrote: > > On Tuesday 09 September 2008 21:38, John Baldwin wrote: > > > On Thursday 04 September 2008 08:00:04 am Marc Lörner wrote: > > > > Hello, &

Re: question on asymmetric mtx_[un]lock_sleep

2008-09-10 Thread Marc Lörner
On Tuesday 09 September 2008 21:38, John Baldwin wrote: > On Thursday 04 September 2008 08:00:04 am Marc Lörner wrote: > > Hello, > > I just read through the code of mutexes and turnstiles > > and it seems to me that _mtx_lock_sleep and _mtx_unlock_sleep > > are s

question on asymmetric mtx_[un]lock_sleep

2008-09-04 Thread Marc Lörner
Hello, I just read through the code of mutexes and turnstiles and it seems to me that _mtx_lock_sleep and _mtx_unlock_sleep are some kind of asymmetric when turning SMP and adaptive mutexes on in kernel-configuration. On locking the mutex, we try to "quick" obtain the lock. If we can't do this, we

Re: forcefsck on booting stage

2008-07-28 Thread Marc Lörner
On Monday 28 July 2008 15:00, Jeremy Chadwick wrote: > On Mon, Jul 28, 2008 at 04:11:49PM +0400, sam wrote: > > Hello, > > > > How to make 'fsck -f' on booting stage of remote system? > > I believe by setting background_fsck="no" in /etc/rc.conf? That's the > only way I know of, besides booting si

Re: reading a file in kernelmode

2008-07-16 Thread Marc Lörner
Hello David! On Thursday 17 July 2008 01:46, David wrote: > Hello, > > > > I'm developing a FreeBSD kernel module and I'm searching for a good > solution to open/read/close a file. > > My goal is to generate a MD5-Hash of a given file (path). > > > > Open-Syscall seems to be improper. > > > > Any

Re: How to get a kthread ID?

2007-10-25 Thread Marc Lörner
On Thursday 25 October 2007 11:02, Sergey Matveychuk wrote: > Is there a possibility to get a kthread ID inside a kthread? > Just like pthread_self(3). In function kthread_exit there you see that you can obtain the thread-structure with curthread. And then in this thread-structure is the field t

Re: Writing a plain text file to disk from kernel space

2007-05-14 Thread Marc Lörner
the kernel-files. BTW, you can get an thread-struct pointer from curthread (c.f. sys/pcpu.h). HTH, Marc Lörner ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[

Re: Usage of kern_* functions in kernel

2007-04-26 Thread Marc Lörner
On Thursday 26 April 2007 19:49, John Baldwin wrote: > On Thursday 26 April 2007 08:08:19 am Marc Lörner wrote: > > Hello, > > I googled but found nothing about the usage of the kern_* functions > > (kern_open, kern_close, kern_pwritev, kern_preadv) that are located

Usage of kern_* functions in kernel

2007-04-26 Thread Marc Lörner
Hello, I googled but found nothing about the usage of the kern_* functions (kern_open, kern_close, kern_pwritev, kern_preadv) that are located in vfs_syscalls.c When I use kern_open to open a file within the kernel, I get an error. When I use the normal vn_open function instead, all works well.

Re: i am facing these issues after my FreeBSD 6.2 installation.

2007-03-13 Thread Marc Lörner
rs usually keep their kernel sources in sync with the > main Central Kernel source? Do we use CVS or Subversion for this? dunno > > Thanks & Regards, > Ajay. > ___ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/fr

Re: Allocate aligned memory

2006-12-15 Thread Marc Lörner
On Friday 15 December 2006 10:19, Hans Petter Selasky wrote: ... > > My suggestion is to make the your high limit (currently 1 << 22) MUCH > > higher, if possible. Also, getting rid of the 1MB boundary might help. > > PS: contigmalloc is on the way out. Please use "man bus_dma" instead. For > an ex

Allocate aligned memory

2006-12-15 Thread Marc Lörner
Hello all, I want to allocate 120KB of memory thats aligned to 32KB. I already saw/found the function contigmalloc, now my question is, why following functioncall never does return with an resulting address, instead null is returned? unsigned long *p = (unsigned long*) contigmalloc(120