General :: Mask Local Timer Interrupts In User Space?
Oct 27, 2010
I am trying to figure out how to mask local timer interrupts on a specific core of a multicore system from within user space. The interrupts are causing latency spikes of 3-10u that we would like to remove. We are only running 1 thread on the core h everything shielded except for these timer interrupts. This thread makes no system calls and thus is never getting context switched out. I am not looking to turn them off entirely but rather turn them off, run my code, turn them on in a continuous loop. The thread runs in user space which we are hoping to maintain. We also have no desire to modify the kernel if possible. I've read about using spinlock_irqsave() but it appears (not positive) that it must be used within kernel space.
I hope this is the right place to post to because I haven't found any other related forums.I'm working on an AMD opteron running Linux 2.6.28.6 I want to preload a hardware performance counter (register) with a value to have it overflow after a number of a specific event counts. As I understand, when the counter in the register overflows, an interrupt will be generated and handled by the appropriate interrupt handler. How can my user-level application get notified whenever the interrupt occurs? I want to obtain information on the instruction that caused the overflow. Is this possible? I think this is different than responding to signals with sigaction().
I'm trying to understand how interrupts work. Is there a way to generate timer interrupts in C. Also can we enter into the protected mode of the CPU. Does OS (specifically, linux) place any restrictions on user programs entering protected mode. If it does not, do we just have an assembly language program which changed the mode, followed by the C code... I'm just trying to understand how things work at the lowest level. So I'm trying to write few snippets to test my understanding.
Uptime 5 minutes Wakeups-from-idle per second : 86,8interval: 15,0s no ACPI power usage estimate available Top causes for wakeups: 37,8% (129,7) <interrupt> : uhci_hcd:usb2, uhci_hcd:usb5, rr26xx 23,6% ( 81,0) <kernel core> : hrtimer_start_range_ns (tick_sched_timer)[code]....
As you can see, when system is "fresh" booted there are no noticeable "Extra timer interrupts". As time goes, this number seems to increase. I have tried to find out what causes this behaviour without any luck. I am not even sure if this is any practical problem, as performance seems to be more or less unaffected, but any explanation to this would be nice. Anyone else ever notice this?I am running Ubuntu 9.10 Server edition on a Dell Poweredge SC1420, 64-bit version. The server is used for web and file sharing mostly, with little load. (15 min avg. about 0,10).
Logical Memory Space of 4GB is divided in to 3GB User Space and 1GB Kernel Space. Always. Correct?
1. How can we change it? (just changing value of PAGE_OFFSET is okay?)
2. If system have only 256MB of memory (embedded system) and suppose Kernel Modules eat away all the memory during boot. User space will be left will no memory. Is this case possible?
I am writing device driver in which i have to call callback function from kernel space, which are saving my data. But the callback functions are in userspace. While accessing them i am getting segmentation fault.
In a 32-bit system, max memory addressable is 4GB. Now Linux kernel does memory mapping division of 1GB for kernel address space and 3GB for user address space. That means 4GB of virtual address space is divided between kernel (1GB) and user (3GB).
Q1. All virtual mapping utilizes the available physical RAM without any division? I mean to say that if RAM is 512MB then a page in kernel space can lie any where RAM (leave aside old PCI dma accesses)? (How this fits to fact that kernel memory is non-pageble)
Q2. If a process is created in user space, it has visibility 4GB address space or 3GB address space?
I am thinking about setting up a local Debian Repository mirror. I want it to mirror just the Debian Repo at [URL].. Anyone have any idea how much disk space I might need to do it?
How would you make NIS user information override local user information on client systems? This is what I think is right? Add nis on the passwd registration file on the second line Is this correct?
I am developing a I2C CDROM client driver. The CDROM firmware supports TOC information read through a I2C command. It sends the TOC information in burst ( Interrupts a GPIO pin when it is ready ) and my CPU does a I2C read to read the TOC. When the CDROM firmware finishes sending the last data burst , it informs my CPU that it is done with the TOC, by a flag in the last data burst. I would like to know, which is the most efficinet way I can send these TOC information to userspace?
I wanna write a file in kernel space but from my searching I can to know that instead of writeing file in kernel space ,I can write data to user space by copy_to_user space.
But link is missing ...I dont know how will my user space will access kernel space means my function in kernel space which will do copy_to_user /....How my user space function will call my kernel level function ..
Can any one of you provide me with some example file which are doing this .I know every char driver is using it ...but i could not trace back how user level function is accessing it ...i m confused between user space and kernel space.
I am trying to login to a redhat server via VNC. This used to work until I reloaded the box. Although I had previously logged in directly to the box, then I could vnc to it remotely. The service is running, netstat states the ports are open and listening.I can ssh to the box, and ran the usual commands to start the services.So my question is. Do I need to have a local user logged in before I can VNC, if so how can I do that via the command line.If this is not required for a local user to be logged in, what am I missing. Other than VNC, which other services do I need to start.
I have the following requirement in my module. The driver gets some data from the external device. After getting 1MB of data it has to send it to the user space application. What is the best thing to implement for this in driver.? Is it ok to implement like, after getting data, the driver will send a signal to the user space application. Then the user space application sends an ioctl to read the data. Is there any alternate, that the driver directly sends the data without the user space application asks for it.?
I am working on development of an TOS that runs in Protected Mode. I am required to switch it from text mode to graphics mode. Everywhere I google I get only one solution set AX to 0013h and call INT 10 and easily the VGA Graphics Mode is set.
I am working in protected mode and hence cannot use INT 10. Can someone please guide me? I came across a post where it was said that this can be done by setting the VGA registers, but I could not understand much from the link provided in the post on how to implement it.
Is possible to send a message (popup window or something) to local user logged into X (xdm, fluxbox) from console ? For example: user1 is logged and using X/fluxbox, user2 logging into the same box by ssh to console. Now - what user2 have to do to send message to user1 ?
I am trying to figure out a way to pull the user information from local users on a Linux server. I have approximately 40 servers running SUSE and Ubuntu that are using Microsoft Active Directory in order to authenticate. Our internal auditing group has made us disable root ssh ability, I was doing this with clusterssh, but I can login as me then su on the server to conduct root, admin, work. This is an ongoing request to get the local users and it is a painfully slow process since I have to login to each server to get the /etc/passwd file. Is there another way to get the local user information? They are now asking about seeing the last logon date or if the account is disabled, any thoughts there as well?Most of our auditors think Windows and I am trying to make my life easier but not sure what options I have. I need to get local accounts and if they are active or disabled plus last logon date. I'm sure there will be more but if I can get the basics adding more shouldn't be too difficult but I guess I'll cross that bride when I get there.
I'm new to SUSE Linux 10 and I am having a problem with a local user account. Here is the scenario,Logged in successfully to a putty session as the "user" and try to change the password :
cusexmp, the example of CUSE program, works. Is there real programs that makes use of it? For example, a thing that just mirrors other character device or thing that allows networked character devices.
I've been looking to get some torrent downloads running on school servers, but I obviously can't install a torrent client because I don't have root (and by extent, can't run anything requiring root privileges). Servers are running various versions of Red Hat (at least the x86_64 ones are, I don't want to recompile if I don't have to). Google has failed me thus far.
I need a shared buffer between user and kernel space. I read that one way is to allocated buffer in kernel and then call mmap from the user space. I searched for an example but couldn't find something useful. If you know, could you please send me any links or sample code that does this..
I would like to know how can I have remote desktop to a Linux Box without any disturbance of local user or others who logged in like me .I mean exactly like remote desktop in windows 2003 or 2008 which every users who logged in remotely has it's own desktop without any disturbance of others. and is this possible to do it from fedora to ubuntu and vice versa .
I want to extract some information from ifconfig, E.g.: inet addr:123.123.123.123 Bcast:123.123.123.255 Mask:255.255.254.0 I want to extract the mask value, how can I do that? I've tried using Code: grep -o "Mask:*" test1.txt but it only outputs "Mask:" I need to get 255.255.254.0
Take a physical user FRED. FRED is a linux user ( known by linux on his laptop ) FRED is a Samba user ( Known by samba on the samba pdc server ) When he logs locally (with username/password) on its standalone laptop (with no network), he is known as FRED:user. He access his data in /home/FRED/. When he logs through samba (with username/password) on the domain MY_DOM, he is known as MY_DOMFRED:MY_DOMdomain user. He access his data in /home/MY_DOM/FRED/. ) Is it possible that the human FRED has only one repository and have full access to its repository regardless of how it was connected. If yes, how to do it
2) If not, Is it possible that the human FRED has full access to /home/FRED/.............. and /home/MY_DOM/FRED/.
There are some user-space based NFS clients (e.g. NFS Client library). Can I bypass file permissions by using such client? code...
Client1 uses usual NFS client (kernel-mode based) and user1@client1 can read only file1, but not file2. As I understand, client1 sends uid in nfs request, server1 do a permissions check based on the request data. So, I suggest this is possible to have a client2:
Client2 uses user-space client, and hacker@client2 knows uids of user1 and user2; If he wants to read file1 he can send uid of user1; if he wants to read file2, he sends uid of user2.
For the past few days I was putting effort on understanding the software control flow starting from "Boot loader" to "Linux User space".
I am consolidating the entire process and putting forth in this forum...It would be great if someone can validate this..It might be useful to other new bees too.
Step 1 : Power up the board
Step 2 : The CPU control goes to EEPROM/storage memory where BIOS resides
Step 3: BIOS gets loaded in RAM and gets executed
Step 4: During execution, the selection of Boot device has to be done with the help of BIOS Menu [Blue screen appearance during start up in normal PC's]
Step 5: BIOS shall access the Bootloader stored in boot device [for eg.,Hard disk]. Boot loader is stored in MBR area.
for explanation purpose I take the following configurations
Bootloader = GRUB Boot Device = Hard Disk
Step 6: GRUB shall be loaded in RAM and gets executed
Step 7: GRUB shall load the KERNEL image to RAM. Kernel image is stored in Hard Disk.
The question of "How the GRUB knows where the Kernel image is stored".
The answer is 1. In the "Grub.config" file, the location of "Kernel Image" and " Ramdisk Image" [which will be discussed later in the section] is being given.
Step 8: Kernel Image followed by Ramdisk Image is loaded in RAM by GRUB bootloader
Step 9: Kernel Image gets executed...During execution, top portion of the code shall make initial hardware initialization and latter part of the code shall just decompress the Kernel Image
Step 10 : After decompressing the Kernel Image, it shall decompress the already loaded Ramdisk Image
Ram disk is just creating a temporary hard disk in RAM. The main responsibility includes it consists of minimal driver files, executables, directory structures to created a TEMPORARY ROOT FILE SYSTEM.
This Temporary Root File system shall be used by Kernel Image
1. Execute the executables to access the Hard disk 2. For creating Permanent Root File System in HARD DISK
Step 11 : Kernel Shall look for the file /Linuxrc in Ramdisk. Linuxrc is a USER script file [not sure]
Step 12: At the end of script file Linuxrc, the Ramdisk shall give the control to "USER SPACE" [path for writing the script not known]in Linux kernel