kernel

clock_gettime() still not monotonic - alternatives?

痴心易碎 提交于 2020-01-15 09:01:14
问题 As has been known for a while (see, e.g., this old question, and bug reports that pop when you google this), clock_gettime() doesn't appear to report back time monotonically. To rule out any silly error I might have overseen, here is the relevant code (excerpt from larger program): <include time.h> long nano_1, nano_2; double delta; struct timespec tspec, *tspec_ptr; clock_gettime(CLOCK_MONOTONIC_RAW, tspec_ptr); nano_1 = tspec.tv_nsec; sort_selection(sorted_ptr, n); clock_gettime(CLOCK

How to interpret ARM's SMC calls?

守給你的承諾、 提交于 2020-01-15 07:35:22
问题 I have been reading Android's kernel to see how dynamic power management for CPU cores (aka DVFS, DCVS) is being done. The code I found here makes some calls to the following function (defined here) which in turn calls the SMC assembly instruction. ARM has a document that explains SMC calling convention, but I haven't been able to use it to make sense of the following function. How can I track down the SMC instruction further to see what it actually does based on its input operands? s32 scm

Where is the standard kernel libraries to let kernel module link to?

女生的网名这么多〃 提交于 2020-01-15 07:23:18
问题 The kernel module can not call libc since libc run under user space. There are some other kernel specified APIs just like printk() to make modules work fine. As I understand that libc is a collection of several standard c function obj(s). It is supposed to exist a collection (or library) to include several kernel standard function objects. So I can link my kernel module with these kernel standard libraries to do work, right ? briefly speaking , my question is as followings ... in user space :

nf_conntrack_helper_register return error

爷,独闯天下 提交于 2020-01-15 05:01:48
问题 In kernel if I want to restart my conntrack registers with: nf_conntrack_helper_unregister(&sip[i][j]); ....// redefinition of the sip[i][j] parameters nf_conntrack_helper_register(&sip[i][j]); the nf_conntrack_helper_register(&sip[i][j]) will fail what I m missing? Here after the detailed source code: static void __nf_conntrack_sip_fini(void) { int i, j; for (i = 0; i < ports_c; i++) { for (j = 0; j < ARRAY_SIZE(sip[i]); j++) { if (sip[i][j].me == NULL) continue; nf_conntrack_helper

Weblogic后台报:'weblogic.kernel.Default (self-tuning)

女生的网名这么多〃 提交于 2020-01-14 12:01:05
本文转载: https://blog.csdn.net/mail_bai/article/details/7440940 ]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds . Stack trace: Thread-3847 "[STUCK] ExecuteThread: '92' for queue: 'weblogic.kernel.Default (se lf-tuning)'" <alive, suspended, priority=1, DAEMON> {。。。。。} ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "653" secon ,"weblogic.kernel.Default"是从客户端提交请求后产生的线程所在的队列名。这个队列的线程数默认是15个。如果超过15个线程堵塞,则部署的应用将不能访问。同时后台报: <2008-2-27 下午09时37分48秒 CST> <Error> <WebLogicServer> <BEA-000337> <ExecuteThread: '14' for queue: 'weblogic

How does the OS know disk address of an absent page?

落花浮王杯 提交于 2020-01-14 10:37:30
问题 Paging acts as indirection layer between virtual address space and physical address space. Given an address, the Operating System(OS)/Memory Management Unit(MMU) translates it to a primary memory location. My questions are: In the scenario that the page is absent in primary memory How does the OS know where to find the page on disk? Where does it store information for 1?(It is not stored in the page table entry). Links to code examples would be great! 回答1: You can find the detailed

SysFs interface. I can't export gpio pins in a Xilinx's Board (Zybo and other)

老子叫甜甜 提交于 2020-01-14 02:30:26
问题 Using a linux-kernel compiled as it is described here, I'm trying to make a led blinking following this wiki: Linux GPIO Driver. I'm working with a Zybo-board of Xilinx. I enabled the kernel options: CONFIG_GPIO_SYSFS=y CONFIG_SYSFS=y CONFIG_GPIO_XILINX=y I checked that I have mounted in /sys the SysFs I want to configure the pin 7 of the MIO port because it is attached to the led LD4 in the board. So I used this expression: echo 7 > /sys/class/gpio/export And I always obtain this error:

Haproxy压测及参数调优

可紊 提交于 2020-01-14 00:32:56
Haproxy压测及参数调优 [root@3b9d411b-0a16-4bc4-acd8-10f71b997c29 etc]# ss -s&&free -g Total: 102008 (kernel 102040) TCP: 102003 (estab 101812, closed 56, orphaned 77, synrecv 0, timewait 0/0), ports 30060 Transport Total IP IPv6 * 102040 - - RAW 0 0 0 UDP 4 3 1 TCP 101947 101946 1 INET 101951 101949 2 FRAG 0 0 0 total used free shared buffers cached Mem: 7 2 5 0 0 0 -/+ buffers/cache: 2 5 Swap: 0 0 0 先看上面的信息: 这台机器已将建立10w个链接,最高压测到17w左右 但是内存和cpu都没有到达瓶颈 cpu和内存的原因可能是没有用ssl链接都是基于http链接计算量小的缘故,也有可能是vegeta 没有输出足够的压力源导致,后期会完善压测方法,由此说明我们haproxy还有更大潜力挖掘。 下面会介绍单个Haproxy机器上实现这种规模访问所需的配置,和详细的内核调优方法。 测试目标

kernel信息及其相关命令

拜拜、爱过 提交于 2020-01-13 21:10:54
内核 linux内核是单内核体系设计、但充分借鉴了微内核设计体系的优点,为内核引入模块化机制 内核组成部分: kernel: 内核核心,一般为bzImage,通常在/boot 目录下,名称为vmlinuz-VERSION-RELEASE. kernel object: 内核对象,一般放置于/lib/modules/VERSION-RELEASE/ 辅助文件: ramdisk initrd initramfs 内核版本 运行中的内核: uname 命令: uname - print system information uname [OPTION]... -n: 显示节点名称; -r: 显示VERSION-RELEASE; -a: 显示所有信息 -s, --kernel-name 显示kernel名称 -v, --kernel-version 显示kernel版本 -m, --machine 显示机器硬件名称 -p, --processor 显示进程类型 or "unknown" -i, --hardware-platform 显示硬件平台or "unknown" -o, --operating-system 显示操作系统 uname -a Linux centos6 2.6.32-696.el6.x86_64 #1 SMP Tue Mar 21 19:29:05 UTC 2017

Documentation about device driver programming on kernel 3.x

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-13 20:32:29
问题 I have some homework which I should program a virtual device driver on kernel 3.x Can you suggest some documentation about it? I'm using fedora btw. I know there are lots of tutorials, but there is some difference between 2.x and 3.x. 回答1: There is no major difference between the last 2.6.x series kernel and the 3.x series. It's an arbitrary distinction. The reference work for Linux device drivers is the aptly named Linux Device Drivers. It's somewhat out of date (being based on 2.6.10), but