All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: "孙世龙 sunshilong" <sunshilong369@gmail.com>
Cc: "孙世龙 sunshilong via Xenomai" <xenomai@xenomai.org>,
	"Fino Meng" <fino.meng@linux.intel.com>
Subject: Re: Is it possible to implement a real-time API to read the files on the disk?
Date: Thu, 14 Jan 2021 17:55:33 +0100	[thread overview]
Message-ID: <212749.1610643333@gemini.denx.de> (raw)
In-Reply-To: <CAAvDm6ZsQwrFoLfjnespyx65cmzWgYXGk=dyUE_UD5-dAUKaNQ@mail.gmail.com>

Dear 孙世龙 sunshilong,

In message <CAAvDm6ZsQwrFoLfjnespyx65cmzWgYXGk=dyUE_UD5-dAUKaNQ@mail.gmail.com> you wrote:
>
> >You can guarantee _average_ data for I/O to storage devices, like a
> >guaranteed sustained throughput (*), but you will not be able to
> >guarantee any hard real-time behaviour (like latencies or such).
> It seems that real-time OS could not guarantee a hard real-time
> behaviour for reading files.
>
> Two more questions arise:
> 1. A lot of real-time applications based on Xenomai have to meet this
>  problem (i.e reading files), how do you solve it?
> Reading files by non-rt thread and sending the data(or the pointer to
> the data) to the rt thread by XDDP?

Yes, use another task (process or thread).

> 2.Can I draw the conclusion that there is no real-time OS that could
> guarantee a hard real-time behaviour for reading?

Thisis correct, assuming "reading" means reading from conventional
rotating hard disks, SSD drives or any other kind of NAND flash
based storage devices (USB sticks, eMMC, SDCard, CompactFlash
etc.).  None of these devices guarantee any RT capabilites (*).

(*) As far as I can tell; there may be special models with
alternative firmware which is tailored for RT responses -
technically that would be possible, but I have never seen any such
thing, and a quick search on your favorite search engine comes up
empty.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
It may be bad manners to talk with your mouth full, but it isn't  too
good either if you speak when your head is empty.


      reply	other threads:[~2021-01-14 16:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 11:58 Is it possible to implement a real-time API to read the files on the disk? 孙世龙 sunshilong
2021-01-04 13:22 ` Julien Blanc
2021-01-06  0:04 ` Fino Meng
2021-01-07  2:03   ` 孙世龙 sunshilong
2021-01-07  2:28     ` Fino Meng
2021-01-07 11:14     ` Wolfgang Denk
2021-01-07 12:12       ` 孙世龙 sunshilong
2021-01-14 16:55         ` Wolfgang Denk [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=212749.1610643333@gemini.denx.de \
    --to=wd@denx.de \
    --cc=fino.meng@linux.intel.com \
    --cc=sunshilong369@gmail.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.