All of lore.kernel.org
 help / color / mirror / Atom feed
* How could I allocate a huge memory in rtdm driver?
@ 2020-04-13  7:20 孙世龙
  2020-04-13  8:17 ` Richard Weinberger
  2020-04-13  8:19 ` Meng, Fino
  0 siblings, 2 replies; 6+ messages in thread
From: 孙世龙 @ 2020-04-13  7:20 UTC (permalink / raw)
  To: xenomai

Hi,
     I am using xenomai 3.1.

     How could I allocate a huge memory which may be larger then 50MB in
rtdm driver?

     I have tried rtdm_malloc function,but it returns NULL.

    To provide the operating system a large amount of free memory, I do
this test when the ubuntu is started at once in vmware.

    Best regards.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How could I allocate a huge memory in rtdm driver?
  2020-04-13  7:20 How could I allocate a huge memory in rtdm driver? 孙世龙
@ 2020-04-13  8:17 ` Richard Weinberger
  2020-04-13  8:47   ` 孙世龙
  2020-04-13  8:19 ` Meng, Fino
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Weinberger @ 2020-04-13  8:17 UTC (permalink / raw)
  To: 孙世龙; +Cc: xenomai

On Mon, Apr 13, 2020 at 9:21 AM 孙世龙 via Xenomai <xenomai@xenomai.org> wrote:
>
> Hi,
>      I am using xenomai 3.1.
>
>      How could I allocate a huge memory which may be larger then 50MB in
> rtdm driver?
>
>      I have tried rtdm_malloc function,but it returns NULL.

Depends on the use case, what exactly do you need?
Physical contiguous memory? Who should use it?
But 50MiB is a lot, in any context.

I'd allocate it in a non-realtime context with either vmalloc(), cma
or requesting
pages manually and then provide the allocated memory to my RT related code.

-- 
Thanks,
//richard


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: How could I allocate a huge memory in rtdm driver?
  2020-04-13  7:20 How could I allocate a huge memory in rtdm driver? 孙世龙
  2020-04-13  8:17 ` Richard Weinberger
@ 2020-04-13  8:19 ` Meng, Fino
  2020-04-13  9:07   ` 孙世龙
  1 sibling, 1 reply; 6+ messages in thread
From: Meng, Fino @ 2020-04-13  8:19 UTC (permalink / raw)
  To: 孙世龙; +Cc: Xenomai



> From: Xenomai <xenomai-bounces@xenomai.org> On Behalf Of ??? via
> Xenomai
> Sent: Monday, April 13, 2020 3:21 PM
> To: xenomai <xenomai@xenomai.org>
> Subject: How could I allocate a huge memory in rtdm driver?
> 
> Hi,
>      I am using xenomai 3.1.
> 
>      How could I allocate a huge memory which may be larger then 50MB in
> rtdm driver?
> 
>      I have tried rtdm_malloc function,but it returns NULL.
> 
>     To provide the operating system a large amount of free memory, I do this
> test when the ubuntu is started at once in vmware.
> 
>     Best regards.

Hi Shilong,

Which kind of application u want to do? If u throw out multi questions at once, we may hard to catch, 
Run a ubuntu in vmware cannot get correct real-time performance,
And a normal PC mainboard's BIOS usually cannot match real-time profile also.
we can recommend some Industry PC module available on market if u want to test, 

BR / Fino (孟祥夫)
Intel – IOTG Developer Enabling

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How could I allocate a huge memory in rtdm driver?
  2020-04-13  8:17 ` Richard Weinberger
@ 2020-04-13  8:47   ` 孙世龙
  2020-04-13  8:58     ` Richard Weinberger
  0 siblings, 1 reply; 6+ messages in thread
From: 孙世龙 @ 2020-04-13  8:47 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: xenomai

Hi,

     Thanks a lot for your reply.

     I am not a native speaker. I hope you won't be confused by my poor
english.



    The huge memory allocated is no need to be contiguous.    I have seen
the suggestion that cma is not recommend to be used with xenomai through
Philippe Gerum have allready relaxed the requirement on CONFIG_MIGRATION to
support cma. You could see the commit which commit id is 265ca3c3c for
detail .

    The memory will be used to store high definition video to be processed
later .Though many image processing algorithms require contiguous memory, I
do not need contiguous memory indeed.



  Best regards.

Richard Weinberger <richard.weinberger@gmail.com> 于2020年4月13日周一 下午4:17写道:

> On Mon, Apr 13, 2020 at 9:21 AM 孙世龙 via Xenomai <xenomai@xenomai.org>
> wrote:
> >
> > Hi,
> >      I am using xenomai 3.1.
> >
> >      How could I allocate a huge memory which may be larger then 50MB in
> > rtdm driver?
> >
> >      I have tried rtdm_malloc function,but it returns NULL.
>
> Depends on the use case, what exactly do you need?
> Physical contiguous memory? Who should use it?
> But 50MiB is a lot, in any context.
>
> I'd allocate it in a non-realtime context with either vmalloc(), cma
> or requesting
> pages manually and then provide the allocated memory to my RT related code.
>
> --
> Thanks,
> //richard
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How could I allocate a huge memory in rtdm driver?
  2020-04-13  8:47   ` 孙世龙
@ 2020-04-13  8:58     ` Richard Weinberger
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Weinberger @ 2020-04-13  8:58 UTC (permalink / raw)
  To: 孙世龙; +Cc: xenomai

On Mon, Apr 13, 2020 at 10:47 AM 孙世龙 <sunshilong369@gmail.com> wrote:
>
> Hi,
>
>      Thanks a lot for your reply.
>
>      I am not a native speaker. I hope you won't be confused by my poor english.
>
>
>
>     The huge memory allocated is no need to be contiguous.    I have seen the suggestion that cma is not recommend to be used with xenomai through Philippe Gerum have allready relaxed the requirement on CONFIG_MIGRATION to support cma. You could see the commit which commit id is 265ca3c3c for detail .
>
>     The memory will be used to store high definition video to be processed later .Though many image processing algorithms require contiguous memory, I do not need contiguous memory indeed.

If CMA is really not an option you can still vmalloc() it or use page_alloc().
Since the memory does not have to be physically contiguous this are
not that hard.

Thanks,
//richard


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How could I allocate a huge memory in rtdm driver?
  2020-04-13  8:19 ` Meng, Fino
@ 2020-04-13  9:07   ` 孙世龙
  0 siblings, 0 replies; 6+ messages in thread
From: 孙世龙 @ 2020-04-13  9:07 UTC (permalink / raw)
  To: Meng, Fino; +Cc: Xenomai

Hi Meng,

    Thanks a lot for your reply.
     I will follow your advice not to throw out multi questions at once
any more.

     I have some industry PCs in hand which allready installed xenoami. I
use vmware to verify my code.
     It's more convenient to use word etc on windows while ubuntu installed
in vmwareis used for coding.

     The huge memory to be allocated will be used to store high
definitionvideo to be processed later .Though many image
processing algorithmsrequire contiguous memory, I do not need
contiguous memory indeed.

     Best regards.
Meng, Fino <fino.meng@intel.com> 于2020年4月13日周一 下午4:19写道:

>
>
> > From: Xenomai <xenomai-bounces@xenomai.org> On Behalf Of ??? via
> > Xenomai
> > Sent: Monday, April 13, 2020 3:21 PM
> > To: xenomai <xenomai@xenomai.org>
> > Subject: How could I allocate a huge memory in rtdm driver?
> >
> > Hi,
> >      I am using xenomai 3.1.
> >
> >      How could I allocate a huge memory which may be larger then 50MB in
> > rtdm driver?
> >
> >      I have tried rtdm_malloc function,but it returns NULL.
> >
> >     To provide the operating system a large amount of free memory, I do
> this
> > test when the ubuntu is started at once in vmware.
> >
> >     Best regards.
>
> Hi Shilong,
>
> Which kind of application u want to do? If u throw out multi questions at
> once, we may hard to catch,
> Run a ubuntu in vmware cannot get correct real-time performance,
> And a normal PC mainboard's BIOS usually cannot match real-time profile
> also.
> we can recommend some Industry PC module available on market if u want to
> test,
>
> BR / Fino (孟祥夫)
> Intel – IOTG Developer Enabling
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-13  9:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13  7:20 How could I allocate a huge memory in rtdm driver? 孙世龙
2020-04-13  8:17 ` Richard Weinberger
2020-04-13  8:47   ` 孙世龙
2020-04-13  8:58     ` Richard Weinberger
2020-04-13  8:19 ` Meng, Fino
2020-04-13  9:07   ` 孙世龙

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.