Re: Are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA, PCI, serial port and etc) by vmalloc() instea

2020-06-26 Thread Greg KH
On Sat, Jun 27, 2020 at 01:16:50PM +0800, 孙世龙 sunshilong wrote: > >So as per the above - you allocate one struct array at driver load time for > >this stuff. You already know how big the structure/array has to be based on > >the maximum number of devices or whatever you're trying to track. > >And

Re: Are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA, PCI, serial port and etc) by vmalloc() instea

2020-06-26 Thread 孙世龙 sunshilong
Hi, Valdis Klētnieks,Greg KH Thanks a lot to both of you. >As I mentioned a few days ago, the fact that a high-order allocation failed >does not necessarily mean a total failure, as often the driver can instead >allocate several smaller areas. The related code snippet is not used for a driver,

Re: Are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA, PCI, serial port and etc) by vmalloc() instea

2020-06-26 Thread Greg KH
On Fri, Jun 26, 2020 at 11:36:05PM +0800, 孙世龙 sunshilong wrote: > Thank you for your attention to this matter. > > >Why are you having so many issues in allocating memory? > I often saw the page allocation failure recently. I must resolve this problem. What code is causing that failure by asking

Re: Are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA, PCI, serial port and etc) by vmalloc() instea

2020-06-26 Thread Valdis Klētnieks
On Fri, 26 Jun 2020 23:36:05 +0800, 孙世龙 sunshilong said: > Thank you for your attention to this matter. > > >Why are you having so many issues in allocating memory? > I often saw the page allocation failure recently. I must resolve this problem. As I mentioned a few days ago, the fact that

Re: Are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA, PCI, serial port and etc) by vmalloc() instea

2020-06-26 Thread 孙世龙 sunshilong
Thank you for your attention to this matter. >Why are you having so many issues in allocating memory? I often saw the page allocation failure recently. I must resolve this problem. I have no choice other than disabling these options (i.e. CONFIG-MIGRATION and CONFIG-COMPACTION) since I am using a

Re: Are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA, PCI, serial port and etc) by vmalloc() instea

2020-06-26 Thread Greg KH
On Fri, Jun 26, 2020 at 04:30:48PM +0800, 孙世龙 sunshilong wrote: > Hi, list > > Besides kmalloc() is more efficient, are there some potential problems that > I should be aware of if I allocate the memory which doesn't have any > relation to peripheral hardwares(i.e. DMA,PCI,serial port and etc) by

Are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA, PCI, serial port and etc) by vmalloc() instead of

2020-06-26 Thread 孙世龙 sunshilong
Hi, list Besides kmalloc() is more efficient, are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA,PCI,serial port and etc) by vmalloc() instead of kmalloc() to avoid the page allocation

Besides kmalloc() is more efficient, are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA,PCI,serial po

2020-06-26 Thread 孙世龙 sunshilong
Hi, list Besides kmalloc() is more efficient, are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA,PCI,serial port and etc) by vmalloc() instead of kmalloc() to avoid the page allocation