[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BOUNCE rtl@rtlinux.org: Approval required: (fwd)
- To: rtl@rtlinux.org
- Subject: BOUNCE rtl@rtlinux.org: Approval required: (fwd)
- From: Der Herr Hofrat <der.herr@hofr.at>
- Date: Sun, 8 Jul 2001 13:12:05 +0200 (CEST)
>From owner-rtl Sun Jul 8 05:05:38 2001
Received: from eising.k-net.dk (eising.k-net.dtu.dk [130.225.71.229])
by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f68B5bh02009
for <rtl@fsmlabs.com>; Sun, 8 Jul 2001 05:05:38 -0600
Received: from carlsberg.kampsax.dtu.dk (carlsberg.kampsax.dtu.dk [192.38.212.2])
by eising.k-net.dk (Postfix) with SMTP id 9E471C2E0
for <rtl@fsmlabs.com>; Sun, 8 Jul 2001 12:58:43 +0200 (CEST)
Received: (qmail 2219 invoked from network); 8 Jul 2001 10:58:43 -0000
Received: from carlsberg.kampsax.dtu.dk (HELO carlsberg) (nuh@192.38.212.2)
by carlsberg.kampsax.dtu.dk with SMTP; 8 Jul 2001 10:58:43 -0000
Date: Sun, 8 Jul 2001 12:58:43 +0200 (CEST)
From: Nicolai Hanssing <nuh@kampsax.dtu.dk>
To: Michael Barabanov <baraban@fsmlabs.com>
Cc: rtl@fsmlabs.com
Subject: Re: [rtl] Newbieproblems - stacksize
In-Reply-To: <20010707124359.F6961@fsmlabs.com>
Message-ID: <Pine.LNX.4.21.0107081241090.25079-100000@carlsberg.kampsax.dtu.dk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
First off, Michael thanks for your answers.
> > By atomic, I mean non-divideble - i.e. You put something of size 30B in
> > RTFx from userspace, and when the handler get woken theres 30B in the RTFx.
>
> Kernel rtf_put and user-space write are atomic in this sense.
> rtf_get or a user-space read may return with less data than requested
> if there's not enough data in the FIFO.
Thats not really my question, I'll try again:
If a userspace task only writes blocks of 30 bytes to an RTF-fifo, and the
rtl taks reads blocks of 30 bytes, can the task then return a read with
less than 30 bytes?
I.e. are the data from the userspace "committed" to
the fifo partly ?
Also of intrest: When is the rtf-handler woken?
At the end of operations
on the fifo - bucause that would gice the false effect of an atomic fifo,
allthough it might not be.
> > > How can I tell if the stack runs out [has run out - overwrite kernelspace
> > > - whatever], and how can I increase the size
> > > dynammicly?
>
> In the current version, there's no such mechanizm. This could be solved
> by allocating an unmapped page right above the RTLinux thread structure
> on the stack. Patches are welcome..
I think I'll write a simple initialising/cleanup routine for RTL, where
the stack-dataareas is initilised with bytes like "01010101", and in the
end a simple funcktion can traverse the stackarea, and *estimate* what the
maximum peak stackallocation was during runtime [can ofcourse allso be
called in the thread]. Theres no way of trapping memoryviolations in
kernelspace, and the idea above should be sufficent for most
debugging purposes.
Actually my insight into how the c-compile works is not sufficient, but I
think you should be able to access the current stackpointer for the
thread, and compare it with the starting adress of the thread-stack to get
the current usage.
BTW Michael: when you write the note about stacksize, dont forget to
mention the effect of allocating varibles as 'static', as a hint to
newbies such as myself.
Regards
Nicolai Hanssing
Denmark
----- End of forwarded message from owner-rtl@fsmlabs.com -----