Re: How to acquire the occupancy time of CPUs within a certain duration, i.e. 10ms, 1ms, and etc?

2020-09-05 Thread sunshilong
020 at 11:59 AM Mulyadi Santosa wrote: > > > On Fri, Aug 28, 2020 at 4:14 PM 孙世龙 sunshilong > wrote: > >> Hi, list >> >> How to acquire the occupancy time of CPUs within a certain duration, >> i.e. 10ms, 1ms, and etc? >> >> Could somebody please

How to acquire the occupancy time of CPUs within a certain duration, i.e. 10ms, 1ms, and etc?

2020-08-28 Thread sunshilong
Hi, list How to acquire the occupancy time of CPUs within a certain duration, i.e. 10ms, 1ms, and etc? Could somebody please shed some light on this matter? I would be grateful to have some help with this question. Best Regards. Sunshilong ___

Re: Are there some potentially serious problems that I should be aware of if I totally disable the CONFIG_ACPI option on the X86_64 platform?

2020-07-18 Thread sunshilong
Hi, Greg KH >Yes, your ACPI-based system will not boot. Do you mean the OS will not boot or some of the Linux subsystems(i.e. USB PCI etc) will not boot? Thank you for your attention to this matter. On Wed, Jul 1, 2020 at 6:58 PM Greg KH wrote: > > On Wed, Jul 01, 2020 at 05:15:52PM +

Why disabling CONFIG_APIC may cause the kernel failing to boot up?

2020-07-19 Thread sunshilong
Hi, list The same kernel Deb is installed on two different platforms(both are intel X86_64 CPUs, but not the same model). But what confuses is that it works well on one platform whereas it causes the kernel failing to boot up on the other one. Could you please shed some light on this matter?

Re: Are there some potentially serious problems that I should be aware of if I totally disable the CONFIG_ACPI option on the X86_64 platform?

2020-07-18 Thread sunshilong
Hi, Pavel >> Are there some potentially serious problems that I should be aware of >> if I totally disable the CONFIG_ACPI option on the X86_64 platform? >These machines are still mostly IBM-PC compatible, so it is likely to >somehow work. You'll likely get worse power and thermal >management. Try

How to comfirm whether __GI___clock_gettime() implemented as fast system call or not on x86_64 platform with Linux 4.19.84?

2020-07-19 Thread sunshilong
Hi, list How to comfirm whether __GI___clock_gettime() implemented as fast system call or not on x86_64 platform with Linux 4.19.84? Here is some related backtrace log(hope there is some hint on this question): (gdb) bt #0 0x7ffc41da89fa in ?? () #1 0x7fa90785aaf0 in ?? () #2

Is there some method or software that could purposely generate a lot of physical memory fragmentations on linux?

2020-06-30 Thread sunshilong
Hi, list Is there some method or software that could purposely generate a lot of physical memory fragmentations on Linux? I need to do some tests under such circumstances. Thank you for your attention to this matter. ___ Kernelnewbies

Re: Are there some potentially serious problems that I should be aware of if I totally disable the CONFIG_ACPI option on the X86_64 platform?

2020-07-01 Thread sunshilong
Hi, Gred Thank you for taking the time to respond to me. >> Would it do harm to the hardware? > It might, try it and see :) It's really bad news. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org

Re: Are there some potentially serious problems that I should be aware of if I totally disable the CONFIG_ACPI option on the X86_64 platform?

2020-07-01 Thread sunshilong
Hi, Gred Thank you for taking the time to respond to me. >> Would it do harm to the hardware? > It might, try it and see :) It's really bad news. 孙世龙 sunshilong 于2020年7月1日周三 下午8:24写道: > > Hi, Gred > Thank you for taking the time to respond to me. > >> Would

Re: There is "softlockup_tick()" function in the source code of linux-2.6.32, but what's the corresponding function name in the linux-4.9 or later?

2020-07-05 Thread sunshilong
Thank you for the clarification. I have a better understanding of this matter with help. Valdis Klētnieks 于2020年7月6日周一 上午2:58写道: > > On Sun, 05 Jul 2020 15:34:32 +0800, "e- d8 i> sunshilong" said: > > > There is "softlockup_tick()" function in the source code of > > linux-2.6.32(refer to > >

Re: How can I investigate the cause of "watchdog: BUG: soft lockup"?

2020-07-07 Thread sunshilong
[ 1176.166292] __vfs_write+0x3a/0x190 One more question, what's the relation between "queued_spin_lock_slowpath" and "_raw_spin_lock"? Best Regards. 孙世龙 sunshilong 于2020年7月4日周六 下午5:13写道: > > Hi, Valdis Klētnieks > > Thank you for taking the time to respond to me. &

Re: Are there some potentially serious problems that I should be aware of if I totally disable the CONFIG_ACPI option on the X86_64 platform?

2020-07-04 Thread sunshilong
Thank you for taking the time to respond to me. >These machines are still mostly IBM-PC compatible, so it is likely to >somehow work. You'll likely get worse power and thermal >management. Try it. It's an industrial personal computer with an Intel processor. What I am worried about is that it may

What are the relations between queued_spin_lock_slowpath function and __raw_spin_lock function?

2020-07-06 Thread sunshilong
Hi, list What are the relations between queued_spin_lock_slowpath function and __raw_spin_lock function? For your convenience, here are the URLs of the related code snippets: https://elixir.bootlin.com/linux/v4.19.84/source/include/linux/spinlock_api_smp.h#L139

Re: How can I investigate the cause of "watchdog: BUG: soft lockup"?

2020-07-04 Thread sunshilong
Hi, Valdis Klētnieks Thank you for your generous help. My understanding of this matter is on a different level with your help. >>Jul 3 10:23:31 yx kernel: [ 1176.166058] watchdog: BUG: soft lockup - >>CPU#0 stuck for 22s! [rt_cansend:1837] >>Jul 3 10:23:31 yx kernel: [ 1176.166066] Modules

Re: How can I investigate the cause of "watchdog: BUG: soft lockup"?

2020-07-04 Thread sunshilong
o this matter. Best Regards. Valdis Klētnieks 于2020年7月4日周六 下午4:09写道: 孙世龙 sunshilong 于2020年7月4日周六 下午5:04写道: > > Hi, Valdis Klētnieks > > Thank you for taking the time to respond to me. > I have a better understanding of this matter. > > >> Can I draw the con

Re: How can I investigate the cause of "watchdog: BUG: soft lockup"?

2020-07-04 Thread sunshilong
Hi, Valdis Klētnieks Thank you for taking the time to respond to me. I have a better understanding of this matter. >> Can I draw the conclusion that continually acquiring the spinlock causes the >> soft >> lockup and the CPU has been stuck for 22s? >> Can I think in this way? >No. It's been

How can I investigate the cause of "watchdog: BUG: soft lockup"?

2020-07-03 Thread sunshilong
Hi, list I encountered the error of "watchdog: BUG: soft lockup" when I sent data through the can bus. Could you please give me some hint on how to investigate the cause deeply? Thank you for your attention to this matter. The most related log(full log is seen at the footnote): Jul 3 10:22:36

Re: How do you investigate the cause of total hang? Is there some information that I should pay attention to in order to get some hint?

2020-07-03 Thread sunshilong
Hi, Cong Wang Thank you for taking the time to respond to me. Do you think the message(i.e. "RCU detect a stall on CPU 2") indicates there is a lockup. Cong Wang 于2020年7月1日周三 下午2:07写道: > > On Tue, Jun 30, 2020 at 7:49 PM 孙世龙 sunshilong > wrote: > > > >

Could interruptions be handled while current process context is switching?

2020-07-02 Thread sunshilong
Could interruptions be handled while current process context is switching? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Is there some method or software that could purposely generate a lot of physical memory fragmentations on linux?

2020-07-02 Thread sunshilong
Hi, Valdis Klētnieks, Mulyadi Santosa Thanks to both of you. >> Just pseudo idea, if this is in user space, try to: allocate many blocks >> of memory using malloc, each having different size, keep the returned >> pointer, then randomly free() some of them, then malloc() again with >> different

Re: Are there some potentially serious problems that I should be aware of if I totally disable the CONFIG_ACPI option on the X86_64 platform?

2020-07-04 Thread sunshilong
I see. Thank you . Pavel Machek 于2020年7月5日周日 上午4:09写道: > > On Sat 2020-07-04 21:34:36, 孙世龙 sunshilong wrote: > > Thank you for taking the time to respond to me. > > > > >These machines are still mostly IBM-PC compatible, so it is likely to > > >somehow

How do you investigate the cause of total hang? Is there some information that I should pay attention to in order to get some hint?

2020-06-30 Thread sunshilong
Hi, list My x86 machine(linux4.19) sometimes hangs, suddenly not responding in any way to the mouse or the keyboard. How can I investigate why it hung up? Is there extra information I can find for a clue? Is there anything less drastic than power-off to get some kind of action, if only some

What are the most frequently used methods for system level-tracing?

2020-07-08 Thread sunshilong
Hi, list What are the most frequently used methods for system level-tracing? I would appreciate it if you could give me some related documents to go through. Thank you for your attention to this matter. Best regards. ___ Kernelnewbies mailing list

What are the major differences between soft lockup and hard lockup which are both detected by watchdog?

2020-07-11 Thread sunshilong
What are the major differences between soft lockup and hard lockup which are both detected by watchdog? Here are some example logs: 1. Watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [cantest:1669] 2. NMI watchdog: Watchdog detected hard LOCKUP on CPU 0 Best regards.

What methods or tools could be used to investigate the causes of hard or soft lockup?

2020-07-11 Thread sunshilong
Hi, list I have frequently faced sort lockups and hard lockups. Here are some example logs: 1. Watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [cantest:1669] 2. NMI watchdog: Watchdog detected hard LOCKUP on CPU 0 What methods or tools could be used to investigate the causes of hard or soft

Why are there "" and "" in the call trace section? What does them imply?

2020-07-09 Thread sunshilong
Hi, list As the subject, here is the related log: [72873.713472] Call Trace: [72873.713473] [72873.713474] switch_mm_irqs_off+0x31b/0x4e0 [72873.713475] xnarch_switch_to+0x2f/0x80 [72873.713476] ___xnsched_run.part.74+0x154/0x480 [72873.713476] ___xnsched_run+0x35/0x50 [72873.713477]

Why did not the kernel use the memory block named by "Node 0 DMA" while the argument of funtion kzalloc is "GFP_KERNEL"?

2020-06-19 Thread sunshilong
As per the documentation (https://elixir.bootlin.com/linux/latest/source/include/linux/gfp.h#L292), which says: #define GFP_KERNEL (__GFP_RECLAIM | __GFP_IO | __GFP_FS). It does not explicitly bind the option of GFP_KERNEL to any of the physical address zone modifiers(i.e. __GFP_DMA,__GFP_HIGHMEM,

Why the kernel could not use the memory block contained by "Node 0 DMA" while the argument of kzalloc() is "GFP_KERNEL"?

2020-06-19 Thread sunshilong
As per the documentation( https://elixir.bootlin.com/linux/latest/source/include/linux/gfp.h#L292), which says: #define GFP_KERNEL (__GFP_RECLAIM | __GFP_IO

Are there still some methods that could be used by the Linux kernel to reduce memory fragmentation while both CONFIG-MIGRATION and CONFIG-COMPACTION are disabled?

2020-06-23 Thread sunshilong
Are there still some methods that could be used by the Linux kernel to reduce memory fragmentation while both CONFIG-MIGRATION and CONFIG-COMPACTION are disabled? Are there some system settings that could make for this goal? ___ Kernelnewbies mailing

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

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
ldis Klētnieks 于2020年6月27日周六 上午1:22写道: > > 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 recen

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-27 Thread sunshilong
es in swap cache [22041.388079] Swap cache stats: add 1015, delete 1008, find 0/1 [22041.388081] Free swap = 995068kB [22041.388083] Total swap = 999420kB [22041.388086] 1020511 pages RAM [22041.388088] 0 pages HighMem/MovableOnly [22041.388090] 39417 pages reserved [22041.388092] 0 pages hwpoisoned &

About the uage of "__GFP_COMP"?

2020-06-19 Thread sunshilong
Hi, I found nothing useful but only comment on "__GFP_COMP" through out the source code of kernel, which says:"__GFP_COMP address compound page metadata." I googled it, but still confused. Besides, I called function kzalloc with the argument of "GFP_KERNEL" on Linux-4.19.82, but the

What the differences between "__GFP_NOFAIL" and "__GFP_REPEAT"?

2020-06-19 Thread sunshilong
As per the documentation( https://www.linuxjournal.com/article/6930), which says: FlagDescription __GFP_REPEAT The kernel repeats the allocation if it fails. __GFP_NOFAIL The kernel can repeat the allocation. So, both of them may cause the kernel to repeat the allocation

Re: Why does “page allocation failure” occur whereas there are still “58*4096kB (C)” could be used?

2020-06-19 Thread sunshilong
月19日周五 下午3:14写道: > On Fri, 19 Jun 2020 14:56:20 +0800, 孙世龙 sunshilong said: > > > Why doesn't the kernel use two memory blocks whose size is > 2048KB(i.e.*oder 9 *) > > instead of one block *order 10 *(you see, there are still three free > blocks and > > 20

How do you comprehend the saying that the kernel's memory is not pageable whereas get_free_page use a page-oriented technique?

2020-06-20 Thread sunshilong
As per the documentation( https://www.linuxjournal.com/article/6930 ), which says[emphasis mine]: Unfortunately for kernel developers, allocating memory in the kernel is not as simple as allocating memory in userspace. A number of factors contribute to the complication, among them: The kernel is

Re: How do you comprehend the saying that the kernel's memory is not pageable whereas get_free_page use a page-oriented technique?

2020-06-20 Thread sunshilong
more question raises, what about the memory related to the user processes, e.g. process control block? Can it be swapped out? Thank you for your attention to this matter. Look forward to hearing from you. Valdis Klētnieks 于2020年6月20日周六 下午5:11写道: > On Sat, 20 Jun 2020 14:18:21 +0800, 孙世龙 sunshilon

What are the potential problems if the option CONFIG_MIGRATION is disabled?

2020-06-22 Thread sunshilong
As the subject, I find it has some relation with the error: "page allocation failure: order:9".This error occurs frequently if this option is disabled. Could memory fragmentation still be reduced by other methods if this option is disabled? ___

Re: Why does “page allocation failure” occur whereas there are still “58*4096kB (C)” could be used?

2020-06-19 Thread sunshilong
>> Why does "page allocation failure" occur whereas there are still "58*4096kB >> (C)"(*I think it indicates there are 58 order 10 memory could be used*) >> could be used? >> >> Here is the related log: >> >> [ 2161.623563] : page allocation failure: order:10, >>

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
年6月26日周五 下午10:13写道: > > 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 > >

Why the trigered counts of NMIs is equivalent to PMI's?

2020-07-15 Thread sunshilong
As the subject, here is the statics got from my PC at a different time: $cat /proc/interrupts | grep -E 'NMI|PMI' NMI:649374347424 Non-maskable interrupts PMI:649374347424 Performance monitoring interrupts $ cat

How to comprehend this code snippet: __asm__ __volatile__("rdtsc" : "=A"(t))?

2020-07-16 Thread sunshilong
Hi, list Here is the code snippet: #define ipipe_read_tsc(t) \ __asm__ __volatile__("rdtsc" : "=A"(t)) I found that the rdtsc (Read Time-Stamp Counter) instruction is used to determine how many CPU ticks took place since the processor was reset. But what does "=A"(t) mean? Thank

Re: How to comprehend this code snippet: __asm__ __volatile__("rdtsc" : "=A"(t))?

2020-07-16 Thread sunshilong
this matter. Looking forward to hearing from you. Best Wishes. sunshilong On Thu, Jul 16, 2020 at 8:52 PM Jeffrey Walton wrote: > > On Thu, Jul 16, 2020 at 8:22 AM 孙世龙 sunshilong > wrote: > > > > Here is the code snippet: > > #define ipipe_read_tsc(t) \

Are there some potentially serious problems that I should be aware of if I totally disable the CONFIG_ACPI option on the X86_64 platform?

2020-07-01 Thread sunshilong
Hi, list Are there some potentially serious problems that I should be aware of if I totally disable the CONFIG_ACPI option on the X86_64 platform? Would it do harm to the hardware? Thank you for your attention to this matter. ___ Kernelnewbies

There is "softlockup_tick()" function in the source code of linux-2.6.32, but what's the corresponding function name in the linux-4.9 or later?

2020-07-05 Thread sunshilong
Hi, list There is "softlockup_tick()" function in the source code of linux-2.6.32(refer to https://elixir.bootlin.com/linux/v2.6.32.39/source/kernel/softlockup.c#L104), but what's the corresponding function in the linux-4.9 or later? There is not even a source code file named by softlockup.c in

About the kernel configuration(CONFIG_CPU_FREQ and CONFIG_CPU_IDLE.)

2022-01-18 Thread sunshilong
Hi, list I am using Linux 5.4.78 with PREEMPT_RT patch. Hardware name: UNO-2372G-J021AE. It's strange that the frequency of the CPU is not constant(i.e. not fixed at a specific frequency) if I both disable CONFIG_CPU_FREQ and CONFIG_CPU_IDLE whereas the frequency of the CPU is constant if I only

Re: About the kernel configuration(CONFIG_CPU_FREQ and CONFIG_CPU_IDLE.)

2022-01-19 Thread sunshilong
Updated: I check the frequency of the CPU by `cat /proc/cpuinfo`. On Wed, Jan 19, 2022 at 9:23 AM 孙世龙 sunshilong wrote: > Hi, list > I am using Linux 5.4.78 with PREEMPT_RT patch. > Hardware name: UNO-2372G-J021AE. > > It's strange that the frequency of the CPU is not constant(i