Re: ARM + CACHE_LINE_SIZE + DMA

2012-05-23 Thread Svatopluk Kraus
Hi, with respect to your replies and among other things, the following summary could be made: There are three kinds of DMA buffers according to their origin: 1. driver buffers As Alexander wrote, the buffers should be allocated by bus_dmamap_alloc(). The function should be implemented to allocat

Re: ARM + CACHE_LINE_SIZE + DMA

2012-05-23 Thread Svatopluk Kraus
On Mon, May 21, 2012 at 6:20 PM, Ian Lepore wrote: >> ... >> Some more notes. >> >> SMP makes things worse and ARM11mpcore is about SMP too. For example, >> another thread could be open about that how to flush caches (exclusive >> L1 cache) in SMP case. >> >> I'm not sure how to correctly change m

Re: ARM + CACHE_LINE_SIZE + DMA

2012-05-18 Thread Svatopluk Kraus
On Thu, May 17, 2012 at 10:07 PM, Ian Lepore wrote: > On Thu, 2012-05-17 at 15:20 +0200, Svatopluk Kraus wrote: >> Hi, >> >> I'm working on DMA bus implementation for ARM11mpcore platform. I've >> looked at implementation in ARM tree, but IMHO it only works

ARM + CACHE_LINE_SIZE + DMA

2012-05-17 Thread Svatopluk Kraus
Hi, I'm working on DMA bus implementation for ARM11mpcore platform. I've looked at implementation in ARM tree, but IMHO it only works with some assumptions. There is a problem with DMA on memory block which is not aligned on CACHE_LINE_SIZE (start and end) if memory is not coherent. Let's have a

Re: [vfs] buf_daemon() slows down write() severely on low-speed CPU

2012-04-04 Thread Svatopluk Kraus
2012/3/21 Konstantin Belousov : > On Thu, Mar 15, 2012 at 08:00:41PM +0100, Svatopluk Kraus wrote: >> 2012/3/15 Konstantin Belousov : >> > On Tue, Mar 13, 2012 at 01:54:38PM +0100, Svatopluk Kraus wrote: >> >> On Mon, Mar 12, 2012 at 7:19 PM, Konstantin Belousov >

Re: [vfs] buf_daemon() slows down write() severely on low-speed CPU

2012-04-04 Thread Svatopluk Kraus
On Wed, Mar 21, 2012 at 5:55 AM, Adrian Chadd wrote: > Hi, > > I'm interested in this, primarily because I'm tinkering with file > storage stuff on my little (most wifi targetted) embedded MIPS > platforms. > > So what's the story here? How can I reproduce your issue and do some > of my own profil

Re: [vfs] buf_daemon() slows down write() severely on low-speed CPU

2012-03-15 Thread Svatopluk Kraus
2012/3/15 Konstantin Belousov : > On Tue, Mar 13, 2012 at 01:54:38PM +0100, Svatopluk Kraus wrote: >> On Mon, Mar 12, 2012 at 7:19 PM, Konstantin Belousov >> wrote: >> > On Mon, Mar 12, 2012 at 04:00:58PM +0100, Svatopluk Kraus wrote: >> >> Hi, >> >>

Re: [vfs] buf_daemon() slows down write() severely on low-speed CPU

2012-03-13 Thread Svatopluk Kraus
On Mon, Mar 12, 2012 at 7:19 PM, Konstantin Belousov wrote: > On Mon, Mar 12, 2012 at 04:00:58PM +0100, Svatopluk Kraus wrote: >> Hi, >> >>    I have solved a following problem. If a big file (according to >> 'hidirtybuffers') is being written, the write speed

pccbb device doesn't send device_shutdown() to childs (reboot freezes)

2012-03-12 Thread Svatopluk Kraus
Hi, I solved very curious problem with rarely system (FreeBSD-9) freezing during reboot. Finally, I found out that system freezes in ep device callout. The part of device tree is following: -> pccbb -> pccard -> ep cbb_pci_shutdown() method in pccbb device places the cards in reset, tur

[vfs] buf_daemon() slows down write() severely on low-speed CPU

2012-03-12 Thread Svatopluk Kraus
Hi, I have solved a following problem. If a big file (according to 'hidirtybuffers') is being written, the write speed is very poor. It's observed on system with elan 486 and 32MB RAM (i.e., low speed CPU and not too much memory) running FreeBSD-9. Analysis: A file is being written. All

i386 - pmap_enter() & superpage promotion on kernel addresses

2011-11-09 Thread Svatopluk Kraus
Hi, I'm tuning pmap code for arm11 mpcore port, which is inspired by i386 one. My question is about superpage promotions on kernel addresses in i386 pmap code. pmap_promote_pde() is called from pmap_enter() only and if following conditions are fulfilled: 1. promotions are enabled, 2. all

Re: mmap performance and memory use

2011-10-31 Thread Svatopluk Kraus
On Fri, Oct 28, 2011 at 7:38 AM, Alan Cox wrote: > On 10/26/2011 06:23, Svatopluk Kraus wrote: >> >> Hi, >> >> well, I'm working on new port (arm11 mpcore) and pmap_enter_object() >> is what I'm debugging rigth now. And I did not find any way

Re: mmap performance and memory use

2011-10-26 Thread Svatopluk Kraus
Hi, well, I'm working on new port (arm11 mpcore) and pmap_enter_object() is what I'm debugging rigth now. And I did not find any way in userland how to force kernel to call pmap_enter_object() which makes SUPERPAGE mapping without promotion. I tried to call mmap() with MAP_PREFAULT_READ without su

Re: threads runtime value is incorrect (tc_cpu_ticks() problem)

2011-06-22 Thread Svatopluk Kraus
On Wed, Jun 22, 2011 at 1:40 PM, Uffe Jakobsen wrote: > > > On 2011-06-22 12:33, Svatopluk Kraus wrote: >> >> Hi, >> >>   I've tested FreeBSD-current from June 16 2011 on x86 (AMD Elan >> SC400). I found out that a sum of runtimes of all threads is abou

threads runtime value is incorrect (tc_cpu_ticks() problem)

2011-06-22 Thread Svatopluk Kraus
Hi, I've tested FreeBSD-current from June 16 2011 on x86 (AMD Elan SC400). I found out that a sum of runtimes of all threads is about 120 minutes after 180 minutes of system uptime and the difference is getting worse with time. The problem is in tc_cpu_ticks() implementation which takes into aco

Re: ichsmb - correct locking strategy?

2011-02-23 Thread Svatopluk Kraus
On Tue, Feb 22, 2011 at 3:37 PM, John Baldwin wrote: > On Friday, February 18, 2011 9:10:47 am Svatopluk Kraus wrote: >> Hi, >> >>   I try to figure out locking strategy in FreeBSD and found 'ichsmb' >> device. There is a mutex which protects smb b

Re: ichsmb - correct locking strategy?

2011-02-21 Thread Svatopluk Kraus
On Fri, Feb 18, 2011 at 4:09 PM, Hans Petter Selasky wrote: > On Friday 18 February 2011 15:10:47 Svatopluk Kraus wrote: >> Hi, >> >>   I try to figure out locking strategy in FreeBSD and found 'ichsmb' >> device. There is a mutex which protects smb b

Sleepable locks with priority propagation?

2011-02-18 Thread Svatopluk Kraus
Hi, I deal with devices (i2c bus, flash memory), which are quite slow, i.e. some or mostly all operations on it are quite slow. One must wait for it for rather long time. Use of DELAY() is too expensive and an inactive (so called unbound) wait isn't permited with mutexes. So, no priority propagati

ichsmb - correct locking strategy?

2011-02-18 Thread Svatopluk Kraus
Hi, I try to figure out locking strategy in FreeBSD and found 'ichsmb' device. There is a mutex which protects smb bus (ichsmb device). For example in ichsmb_readw() in sys/dev/ichsmb/ichsmb.c, the mutex is locked and a command is written to bus, then unbounded (but with timeout) sleep is done (

A question about "WARNING: attempt to domain_add(xyz) after domainfinalize()"

2011-01-12 Thread Svatopluk Kraus
Hi, I'd like to add a new network domain into kernel (and never remove it) from loadable module. In fact, I did it, but I got following warning from domain_add(): "WARNING: attempt to domain_add(xyz) after domainfinalize()". Now, I try to figure out what is behind the warning, which seems to becom

Re: page table fault, which should map kernel virtual address space

2010-10-05 Thread Svatopluk Kraus
On Mon, Oct 4, 2010 at 2:03 AM, Alan Cox wrote: > On Thu, Sep 30, 2010 at 6:28 AM, Svatopluk Kraus wrote: >> >> On Tue, Sep 21, 2010 at 7:38 PM, Alan Cox wrote: >> > On Mon, Sep 20, 2010 at 9:32 AM, Svatopluk Kraus >> > wrote: >> >> Beyond 'ker

Re: page table fault, which should map kernel virtual address space

2010-09-30 Thread Svatopluk Kraus
On Tue, Sep 21, 2010 at 7:38 PM, Alan Cox wrote: > On Mon, Sep 20, 2010 at 9:32 AM, Svatopluk Kraus wrote: >> Beyond 'kernel_map', some submaps of 'kernel_map' (buffer_map, >> pager_map,...) exist as result of 'kmem_suballoc' function cal

page table fault, which should map kernel virtual address space

2010-09-20 Thread Svatopluk Kraus
Hallo, this is about 'NKPT' definition, 'kernel_map' submaps, and 'vm_map_findspace' function. Variable 'kernel_map' is used to manage kernel virtual address space. When 'vm_map_findspace' function deals with 'kernel_map' then 'pmap_growkernel' function is called. At least in 'i386' architectur