From: "Jan Beulich" Subject: Re: Proposed new "memory capacity claim" hypercall/feature Date: Thu, 08 Nov 2012 09:47:29 +0000 Message-ID: <509B8DC102000078000A72BA@nat28.tlf.novell.com> References: <509B813B02000078000A7279@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Keir Fraser Cc: TimDeegan , Olaf Hering , IanCampbell , Konrad Rzeszutek Wilk , George Dunlap , Ian Jackson , George Shuklin , Dan Magenheimer , xen-devel@lists.xen.org, DarioFaggioli , Kurt Hackel , Zhigang Wang List-Id: xen-devel@lists.xenproject.org >>> On 08.11.12 at 10:12, Keir Fraser wrote: > On 08/11/2012 08:54, "Jan Beulich" wrote: >> That may have mattered when ioctl-s were run with the big kernel >> lock held, but even 2.6.18 didn't do that anymore (using the >> .unlocked_ioctl field of struct file_operations), which means >> that even softirqs will get serviced in Dom0 since the preempted >> hypercall gets restarted via exiting to the guest (i.e. events get >> delivered). Scheduling is what indeed wouldn't happen, but if >> allocation latency can be brought down, 8M might turn out pretty >> small a chunk size. > > Ah, then I am out of date on how Linux services softirqs and preemption? Can > softirqs/preemption occur any time, even in kernel mode, so long as no locks > are held? > > I thought softirq-type work only happened during event servicing, only if > the event servicing had interrupted user context (ie, would not happen if > started from within kernel mode). So the restart of the hypercall trap > instruction would be an opportunity to service hardirqs, but not softirqs or > scheduler... No, irq_exit() can invoke softirqs, provided this isn't a nested IRQ (soft as well as hard) or softirqs weren't disabled in the interrupted context. The only thing that indeed is - on non-preemptible kernels - done only on exit to user mode is the eventual entering of the scheduler. Jan