RE: Linux and usb device drivers using functionfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg, 

> >
> > >
> > > And where is your swap?  What happens if you just do not have swap at all?
> > Our system has no swap. Running 'top' says 0 total, 0 free, 0 used
> 
> then your program can not get swapped out, so this whole thing is crazy.

Colleague says when there is memory pressure, program code can get paged out of RAM. 
The way I read your sentence above, program code stays in RAM.

What is the right answer?
Can program code, with no swap and no calls to mlockall(), get paged out of RAM under extreme memory pressure?  


Andy Purcell
Keysight Technologies
900 South Taft
Loveland, Colorado 80537
970-679-5976

> -----Original Message-----
> From: Greg KH [mailto:gregkh@xxxxxxxxxxxxxxxxxxx]
> Sent: Thursday, November 2, 2017 3:31 PM
> To: PURCELL,ANDY (K-Loveland,ex1) <andy_purcell@xxxxxxxxxxxx>
> Cc: felipe.balbi@xxxxxxxxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx
> Subject: Re: Linux and usb device drivers using functionfs
> 
> On Thu, Nov 02, 2017 at 08:43:04PM +0000, andy_purcell@xxxxxxxxxxxx wrote:
> > Hello,
> >
> >
> > >
> > > And where is your swap?  What happens if you just do not have swap at all?
> > Our system has no swap. Running 'top' says 0 total, 0 free, 0 used
> 
> then your program can not get swapped out, so this whole thing is crazy.
> 
> > > > A colleague claims mlockall() does not help, and says it is not a
> > > > good idea anyway.
> > >
> > > That's not true, have you tried it?
> >
> > Developer says he tried mlockall(). No help...
> 
> that doesn't matter if you don't have swap, your program isn't going anywhere.
> 
> > Developer then got some input from some Linux experts that we must
> > also modify the scheduling priority in order for mlockall() to work.
> > Is this true?
> 
> What?  No, that's not true at all.
> 
> Again, if you do not have swap, and your program does not exit, it's there in
> memory just fine.
> 
> You really should run 'perf' or something else to get a better understanding of
> what is going on...
> 
> good luck!
> 
> greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux