From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Thu, 24 Nov 2016 08:18:50 +0100 Subject: Custom Linux Kernel Scheduler issue In-Reply-To: References: Message-ID: <20161124071850.GA11966@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Thu, Nov 24, 2016 at 02:01:41AM -0500, Kenneth Adam Miller wrote: > Hello, > > > I have a scheduler issue in two different respects: > > 1) I have a process that is supposed to tight loop, and it is being > given very very little time on the system. I don't want that - I want > those who would use the processor to be given the resources to run as > fast as they each can. What is causing it to give up its timeslice? Is it waiting for I/O? Doing something else to sleep? > 2) I am seeing with perf that the maximum overhead at each section > does not sum up to be more than 15 percent. Total, probably something > like 18% of cpu time is used, and my binary has rocketed in slowness > from about 2 seconds or less total to several minutes. What changed to make things slower? Did you change kernel versions or did you change something in your userspace program? > I think that > the linux scheduler isn't scheduling it, because this process is just > some unit tests that double as benchmarks in that they shm_open a file > and write into it with memcpy's. Are you sure that I/O isn't happening here like through swap or something else? What does perf say is taking all of your time? thanks, greg k-h