Saving data

“AGB” <agb32@nospam.remove.this.cam.ac.uk> wrote in message
news:3F85819C.8030801@nospam.remove.this.cam.ac.uk

Thanks for patience! I’ve tried both of these… at >21 it still has
the same problem.
If I run the save data process without saving, it works perfectly.
Actually, I run it just saving a time stamp, and not the data, and the
timestamp is then always incremented at the correct amount between
frames… So it could be the shared memory access locks, but I would
have thought that on a strict real time system the high priority process
should always be able to run? If it is the problem with shared memory
access, how can I get around then? Maybe by writing smaller chunks of
data at a time? (currently 65536 bytes at a time)

First make sure the data is properly aligned when you sent it.

Watch for processes that may change priority. For example if your grabbing
process runs at prio 63 and send a message to “saving” program, it will
process the message at priority 63. If the program does a write() the
filesystem will process that message at priority 63 as well.

Grabber and harddisk both are PCI master device (DMA), they can hold the PCI
bus while transfering data. I’m not familiar enough with your hardware (or
the PCI spec for that matter) to determine if HD DMA activity can lock the
grabber, maybe you could try running the HD in NON DMA just to investigate
that avenue (you may have problem writting at 3M with non DMA)





Thanks.

Jens H Jorgensen wrote:
Well - it is a little hard to say what is going on.

I think I would try to perform following experiements:

Hmm, well I’ve now successfully managed to change some of the harddrive
parameters using the script from Eduard – thanks – but it hasn’t
helped my application!

I have a high priority process which is a frame grabber, grabbing data
into shared memory - which another lower priority process then writes to
disk when it has time (it doesn’t necessarily save the newest grabbed
data, ie a backlog can build up). However, I find that for some reason
the writing to disk slows down the higher priority process, and so
frames are missed - which is very bad news!!!

I had thought that qnx would allow a higher priority process to have
priority, but it seems that the hardware (ie hard disk) is stopping the
grabbing process from writing to memory for a bit or something… and so
causing the grabbing process to skip frames.

Comments?

Thanks.

Jens H Jorgensen wrote:

It is probably because you have the NC version.

I am not sure what you can do to solve this with the NC version -

anybody?


Jens


“AGB” <> agb32@nospam.remove.this.cam.ac.uk> > wrote in message
news:> 3F851A85.307@nospam.remove.this.cam.ac.uk> …


I had thought of doing this, but my 6.2.1 system doesn’t have a
/boot/build directory - the only things in /boot/ are sys/ and fs/.

I had assumed that this was because the need for this had been removed
for 6.2.1 or something. Is there anywhere I can obtain a sample build
script which would be correct for my current install? (default 6.2.1
NC
install).

Thanks.

Jens H Jorgensen wrote:
You would have to build a custom kernel image. Look in /boot/build for
sample build scripts.

mkifs is used to compile these build scripts into kernel image files

(such

as .boot and .altboot)

Replace .altboot with the new kernel boot image and it ESC when boot

process


allows to boot alternative image.

Jens


“AGB” <> agb32@nospam.remove.this.cam.ac.uk> > wrote in message
news:> 3F844B8B.1000609@nospam.remove.this.cam.ac.uk> …

Thanks - where can I set these parameters? ie where is devb-eide

started?

Presumably, I cant stop and restart it (if I turn off the filesystem,
if
can’t load itself), so will have to reboot each time?

Thanks.

Jens H Jorgensen wrote:

You can try to adjust some of the cache and commit parameters for

devb-eide.

For details go to:







http://www.qnx.com/developer/docs/momentics621_docs/neutrino/utilities/d/devb-eide.html

and







http://www.qnx.com/developer/docs/momentics621_docs/neutrino/utilities/i/io-blk.so.html

Parameters tgat you want to look at are:

cache=2m,noatime,delwri=0,commit=high


Jens



AGB wrote:


Hi,
I have an application which requires me to write about 3MB/s to disk
continuously. I have a modern harddrive, and am told the max data
rate
is over 100MB/s, so in theory I should have no problems. However, I
find that QNX seems to be writing data in clumps, ie very low cpu
activity for a few seconds, followed by high activity while writing
is
done. This high activity then causes problems as it slows down some
of
my processes. Is there any way to get QNX to write data regularly at
the (slow) 3MB/s rate as it is ready?

Thanks.


\

In article <3F854DD7.3000804@nospam.remove.this.cam.ac.uk>, agb32@nospam.remove.this.cam.ac.uk
says…

Hi Eduard,
Thanks for the scripts. I’m having a bit of a problem with them, and
wonder if you can help. My first problem was that libcam.so.2 wasn’t

hm…, it should be in /proc/boot , i.e. in your boot image which still should be available in RAM.

found. However I solved this by copying it into /dev/shmem/ and
changing my path/ld_library_path variable in the script to include this.
However, it seems that my system won’t re mount things. When it gets
to the mount commands in the scripts, it says:
eg. mounting /dev/hd1t79

Do you have qnx partition on second HDD? Actually you have to change name to appropriate one for
your system, i.e /dev/hd0t79 or /dev/hd1t77 or whatever you have. Just boot from harddrive and look
into /dev by ‘ls’. If you have few QNX partitions choose the that one which is / (has .diskroot file
in root directory). This is passed to devb-eide for automounting, check the options of devb-eide.

Best regards,

mount: cant mount / (type qnx4)
mount: possible reason: invalid arguement

When I look at /dev/hd1t79 after running the script, it doesn’t exist.

Any ideas (QNX 6.2.1 NC)?

Thanks.

ed1k wrote:
In article <> 3F844B8B.1000609@nospam.remove.this.cam.ac.uk> >, > agb32@nospam.remove.this.cam.ac.uk
says…

Thanks - where can I set these parameters? ie where is devb-eide started?

Presumably, I cant stop and restart it


Actually you can. You can take a look at shell scripts Eide.rst and eide.rst.kabe at:
ftp://ftp.qnx.org.ru/pub/projects/ed1k/
Eide.rst - you should change mount lines according to your configuration;
eide.rst.kabe - this script uses proposed by kabe awk-script to remount filesystems as it was before
killing devb-eide.
In both cases you should revise parameters of devb-eide driver. These scripts could be only useful
if you have NC version and willing to play with devb-eide’s options. If you have commercial version
of QNX the right way is to rebuild image (don’t use diskboot because it doesn’t pass options to
devb-eide driver anyway).

Eduard.