[RFC] audit: avoid soft lockup in audit_log_start()

2013-08-28 Thread Luiz Capitulino
actually fix anything. It just bails out before we busy-wait. Which is better than nothing, but the system will still give a long pause when terminating all processes. Besides, we risk papering over the real bug... Signed-off-by: Luiz Capitulino --- kernel/audit.c | 9 - 1 file changed

Re: [RFC] audit: avoid soft lockup in audit_log_start()

2013-08-28 Thread Luiz Capitulino
On Wed, 28 Aug 2013 15:33:45 -0700 Andrew Morton wrote: > On Wed, 28 Aug 2013 18:21:14 -0400 Luiz Capitulino > wrote: > > > I'm getting the following soft lockup: > > > > CPU: 6 PID: 2278 Comm: killall5 Tainted: GF3.11.0-rc7+ #1 > > Hardwa

Re: [RFC] audit: avoid soft lockup in audit_log_start()

2013-08-28 Thread Luiz Capitulino
On Wed, 28 Aug 2013 16:08:13 -0700 Andrew Morton wrote: > On Wed, 28 Aug 2013 18:54:36 -0400 Luiz Capitulino > wrote: > > > > Are you really sure that kauditd is stuck in schedule() and doesn't > > > come out? > > > > No, that's a

Re: [RFC] audit: avoid soft lockup in audit_log_start()

2013-09-17 Thread Luiz Capitulino
On Tue, 17 Sep 2013 15:28:42 -0700 Andrew Morton wrote: > On Tue, 10 Sep 2013 12:03:25 -0400 Eric Paris wrote: > > > > --- a/kernel/audit.c > > > +++ b/kernel/audit.c > > > @@ -1215,9 +1215,10 @@ struct audit_buffer *audit_log_start(struct > > > audit_context *ctx, gfp_t gfp_mask, > > > > > >

Re: [PATCH 0/2] audit: fix soft lockup

2013-09-05 Thread Luiz Capitulino
On Tue, 3 Sep 2013 00:48:53 -0400 Luiz Capitulino wrote: > The second patch fixes a softlockup which is fully described and now is > 100% reproducible with simple steps. The first patch fixes a bug I found > while working on the second patch. Can someone look at this series please?

Re: [RFC] audit: avoid soft lockup in audit_log_start()

2013-09-09 Thread Luiz Capitulino
On Mon, 09 Sep 2013 18:32:13 +0400 Konstantin Khlebnikov wrote: > Luiz Capitulino wrote: > > I'm getting the following soft lockup: > > > > CPU: 6 PID: 2278 Comm: killall5 Tainted: GF3.11.0-rc7+ #1 > > Hardware name: Bochs Bochs, BIOS Bochs 0

Re: [RFC] audit: avoid soft lockup in audit_log_start()

2013-09-09 Thread Luiz Capitulino
On Mon, 09 Sep 2013 19:19:14 +0400 Konstantin Khlebnikov wrote: > Luiz Capitulino wrote: > > On Mon, 09 Sep 2013 18:32:13 +0400 > > Konstantin Khlebnikov wrote: > > > >> Luiz Capitulino wrote: > >>> I'm getting the following soft lockup: > >

Re: [RFC] audit: avoid soft lockup in audit_log_start()

2013-09-10 Thread Luiz Capitulino
On Tue, 10 Sep 2013 12:03:25 -0400 Eric Paris wrote: > On Mon, 2013-09-09 at 18:32 +0400, Konstantin Khlebnikov wrote: > > Luiz Capitulino wrote: > > > I'm getting the following soft lockup: > > > > > > CPU: 6 PID: 2278 Comm: killall5 Tainted: GF

Re: [RFC] audit: avoid soft lockup in audit_log_start()

2013-08-30 Thread Luiz Capitulino
On Wed, 28 Aug 2013 16:08:13 -0700 Andrew Morton wrote: > On Wed, 28 Aug 2013 18:54:36 -0400 Luiz Capitulino > wrote: > > > > Are you really sure that kauditd is stuck in schedule() and doesn't > > > come out? > > > > No, that's a

Re: [PATCH 0/2] audit: fix soft lockups and udevd errors when audit is overrun

2013-09-02 Thread Luiz Capitulino
On Mon, 02 Sep 2013 20:45:14 -0700 Chuck Anderson wrote: > The two patches that follow in separate emails resolve soft lockups and > udevd reported errors that prevented a large memory 3.8 system from booting. > > The patches are based on 3.11-rc7. > > I believe it is the same issue recently po

[PATCH 0/2] audit: fix soft lockup

2013-09-02 Thread Luiz Capitulino
posted his version, so I'm posting it anyway. Luiz capitulino (2): audit: flush_hold_queue(): don't drop queued SKBs audit: kaudit_send_skb(): make non-blocking call to netlink_unicast() kernel/audit.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) -

[PATCH 2/2] audit: kaudit_send_skb(): make non-blocking call to netlink_unicast()

2013-09-02 Thread Luiz Capitulino
From: Luiz capitulino Try this: 1. Download the readahead-collector program and build it 2. Run it with: # readahead-collector -f 3. From another terminal do: # pkill -SIGSTOP readahead-collector 4. Keep using the system, run top -d1, vmstat -S 1, etc 5. Eventually, you'l

[PATCH 1/2] audit: flush_hold_queue(): don't drop queued SKBs

2013-09-02 Thread Luiz Capitulino
From: Luiz capitulino flush_hold_queue() first dequeues an SKB and then checks if auditd exists. If auditd doesn't exist, the SKB is silently dropped. Avoid this by not dequeing an SKB when we detected that auditd disappeared. Signed-off-by: Luiz capitulino --- kernel/audit.c

Re: [RFC] Add mempressure cgroup

2012-11-30 Thread Luiz Capitulino
On Wed, 28 Nov 2012 17:27:51 -0800 Anton Vorontsov wrote: > On Wed, Nov 28, 2012 at 03:14:32PM -0800, Andrew Morton wrote: > [...] > > Compare this with the shrink_slab() shrinkers. With these, the VM can > > query and then control the clients. If something goes wrong or is out > > of balance,

Re: [RFC v3 0/3] vmpressure_fd: Linux VM pressure notifications

2012-11-09 Thread Luiz Capitulino
Hi Anton, On Wed, 7 Nov 2012 02:53:49 -0800 Anton Vorontsov wrote: > Hi all, > > This is the third RFC. As suggested by Minchan Kim, the API is much > simplified now (comparing to vmevent_fd): Which tree is this against? I'd like to try this series, but it doesn't apply to Linus tree. -- To un

[RFC 1/2] virtio_balloon: move locking to the balloon thread

2012-12-18 Thread Luiz Capitulino
reason for this move is that the next commit will introduce a shrinker callback for the balloon driver, which will also call leak_balloon() but will require different locking semantics. Signed-off-by: Luiz Capitulino --- drivers/virtio/virtio_balloon.c | 6 ++ 1 file changed, 2 insertions

[RFC 0/2] auto-ballooning prototype (guest part)

2012-12-18 Thread Luiz Capitulino
(please, never mind the repo name): git://repo.or.cz/qemu/qmp-unstable.git balloon/auto-ballooning/rfc Any feedback is appreciated! Luiz Capitulino (2): virtio_balloon: move locking to the balloon thread virtio_balloon: add auto-ballooning support drivers/virtio/virtio_balloon.c | 60

[RFC 2/2] virtio_balloon: add auto-ballooning support

2012-12-18 Thread Luiz Capitulino
s o the guest kernel seems to spin when the host is performing a long auto-inflate Signed-off-by: Luiz Capitulino --- drivers/virtio/virtio_balloon.c | 54 + include/uapi/linux/virtio_balloon.h | 1 + 2 files changed, 55 insertions(+) diff --git a

Re: [RFC 3/3] virtio-balloon: add auto-ballooning support

2012-12-19 Thread Luiz Capitulino
On Tue, 18 Dec 2012 14:53:30 -0800 Anton Vorontsov wrote: > Hello Luiz, > > On Tue, Dec 18, 2012 at 06:16:55PM -0200, Luiz Capitulino wrote: > > The auto-ballooning feature automatically performs balloon inflate > > or deflate based on host and guest memory pressure. This

Re: [RFC 1/2] virtio_balloon: move locking to the balloon thread

2012-12-19 Thread Luiz Capitulino
On Wed, 19 Dec 2012 09:55:58 -0200 Rafael Aquini wrote: > On Tue, Dec 18, 2012 at 06:17:29PM -0200, Luiz Capitulino wrote: > > Today, the balloon_lock mutex is taken and released by fill_balloon() > > and leak_balloon() when both functions are entered and when they > >

Re: [Qemu-devel] [RFC 3/3] virtio-balloon: add auto-ballooning support

2012-12-22 Thread Luiz Capitulino
On Thu, 20 Dec 2012 05:24:12 + Dietmar Maurer wrote: > > > Wow, you're fast! And I'm glad that it works for you, so we have two > > > full-featured mempressure cgroup users already. > > > > Thanks, although I think we need more testing to be sure this does what we > > want. I mean, the basic

Re: [PATCH v2] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-17 Thread Luiz Capitulino
On Wed, 5 Jun 2013 21:18:37 -0400 Luiz Capitulino wrote: > The balloon_page_dequeue() function can return NULL. If it does for > the first page being freed, then leak_balloon() will create a > scatter list with len=0. Which in turn seems to generate an invalid > virtio request. >

[PATCH] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-05 Thread Luiz Capitulino
The balloon_page_dequeue() function can return NULL. If it does for the first page being freed, then leak_balloon() will create a scatter list with len=0. Which in turn seems to generate an invalid virtio request. Signed-off-by: Luiz Capitulino --- PS: I didn't get this in practice. I fou

Re: [PATCH] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-05 Thread Luiz Capitulino
On Wed, 5 Jun 2013 18:24:49 -0300 Rafael Aquini wrote: > On Wed, Jun 05, 2013 at 05:10:31PM -0400, Luiz Capitulino wrote: > > The balloon_page_dequeue() function can return NULL. If it does for > > the first page being freed, then leak_balloon() will create a > > scatter l

[PATCH v2] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-05 Thread Luiz Capitulino
such an invalid virtio request will cause errors in QEMU and fill_balloon() also performs the same check implemented by this commit. Signed-off-by: Luiz Capitulino Acked-by: Rafael Aquini --- o v2 - Improve changelog drivers/virtio/virtio_balloon.c | 3 ++- 1 file changed, 2 insertions(

Re: [PATCH v2] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-06 Thread Luiz Capitulino
On Thu, 6 Jun 2013 11:13:58 -0300 Rafael Aquini wrote: > On Wed, Jun 05, 2013 at 09:18:37PM -0400, Luiz Capitulino wrote: > > The balloon_page_dequeue() function can return NULL. If it does for > > the first page being freed, then leak_balloon() will create a > > scatter l

[PATCH] vmpressure: implement strict mode

2013-06-25 Thread Luiz Capitulino
l. By default we still notify on higher levels. Signed-off-by: Luiz Capitulino --- PS: I'm following the discussion on the event storm problem, but I believe strict mode is orthogonal to what has been suggested (although the patches conflict) Documentation/cgroups/memor

Re: [PATCH] vmpressure: implement strict mode

2013-06-25 Thread Luiz Capitulino
On Wed, 26 Jun 2013 10:12:15 +0900 Hyunhee Kim wrote: > Please see "[PATCH v3] memcg: event control at vmpressure". mail > thread. (and also the thread I sent last Saturday.) > There was discussion on this mode not sending lower events when "level > != ev->level". The new argument this patch add

Re: [PATCH v2] vmpressure: implement strict mode

2013-07-02 Thread Luiz Capitulino
On Fri, 28 Jun 2013 17:56:37 -0700 Anton Vorontsov wrote: > On Fri, Jun 28, 2013 at 03:44:02PM -0400, Luiz Capitulino wrote: > > > Why can't you use poll() and demultiplex the events? Check if there is an > > > event in the crit fd, and if there is, then just ignore a

Re: [PATCH] vmpressure: implement strict mode

2013-07-02 Thread Luiz Capitulino
On Mon, 1 Jul 2013 10:51:03 +0200 Pavel Machek wrote: > Hi! > > > diff --git a/Documentation/cgroups/memory.txt > > b/Documentation/cgroups/memory.txt > > index ddf4f93..3c589cf 100644 > > --- a/Documentation/cgroups/memory.txt > > +++ b/Documentation/cgroups/memory.txt > > @@ -807,12 +807,14 @

Re: [PATCH v2] vmpressure: implement strict mode

2013-07-02 Thread Luiz Capitulino
On Tue, 2 Jul 2013 10:24:09 -0700 Anton Vorontsov wrote: > > Honestly, what Andrew suggested is the best design for me: apps > > are notified on all events but the event name is sent to the application. > > I am fine with this approach (or any other, I'm really indifferent to the > API itself --

Re: [PATCH] vmpressure: implement strict mode

2013-07-02 Thread Luiz Capitulino
On Tue, 2 Jul 2013 21:47:03 +0200 Pavel Machek wrote: > On Tue 2013-07-02 11:06:28, Luiz Capitulino wrote: > > On Mon, 1 Jul 2013 10:51:03 +0200 > > Pavel Machek wrote: > > > > > Hi! > > > > > > > diff --git a/Documentation/cgroups/mem

Re: [PATCH] vmpressure: implement strict mode

2013-06-26 Thread Luiz Capitulino
On Tue, 25 Jun 2013 21:03:31 -0700 Anton Vorontsov wrote: > On Tue, Jun 25, 2013 at 05:51:29PM -0400, Luiz Capitulino wrote: > > Currently, applications are notified for the level they registered for > > _plus_ higher levels. > > > > This is a problem if the app

Re: [PATCH] vmpressure: implement strict mode

2013-06-26 Thread Luiz Capitulino
On Wed, 26 Jun 2013 17:20:40 +0900 Minchan Kim wrote: > Hello Michal, > > On Wed, Jun 26, 2013 at 09:59:21AM +0200, Michal Hocko wrote: > > On Wed 26-06-13 16:50:51, Minchan Kim wrote: > > > On Tue, Jun 25, 2013 at 05:51:29PM -0400, Luiz Capitulino wrote: > > &

Re: [PATCH] vmpressure: implement strict mode

2013-06-26 Thread Luiz Capitulino
On Wed, 26 Jun 2013 10:08:27 +0200 Michal Hocko wrote: > On Tue 25-06-13 17:51:29, Luiz Capitulino wrote: > > Currently, applications are notified for the level they registered for > > _plus_ higher levels. > > > > This is a problem if the application wants to impl

[PATCH v2] vmpressure: implement strict mode

2013-06-26 Thread Luiz Capitulino
el it registered for. This new mode is optional, by default we still notify eventfds on higher levels too. Signed-off-by: Luiz Capitulino --- o v2 - Improve documentation - Use a bit to store mode instead of a bool - Minor changelog changes Documentation/cgroups/memory.txt

Re: [PATCH v2] vmpressure: implement strict mode

2013-06-27 Thread Luiz Capitulino
On Thu, 27 Jun 2013 11:26:16 +0200 Michal Hocko wrote: > On Wed 26-06-13 23:17:12, Luiz Capitulino wrote: > > Currently, an eventfd is notified for the level it's registered for > > _plus_ higher levels. > > > > This is a problem if an application wants to imp

Re: [PATCH v2] vmpressure: implement strict mode

2013-06-28 Thread Luiz Capitulino
On Thu, 27 Jun 2013 21:34:11 -0700 Anton Vorontsov wrote: > On Thu, Jun 27, 2013 at 06:13:53PM -0700, Andrew Morton wrote: > > On Thu, 27 Jun 2013 17:58:53 -0700 Anton Vorontsov wrote: > > > Current frequency is 1/(2MB). Suppose we ended up scanning the whole > > > memory on a 2GB host, this wil

Re: [PATCH v2] vmpressure: implement strict mode

2013-06-28 Thread Luiz Capitulino
On Thu, 27 Jun 2013 22:07:12 -0700 Anton Vorontsov wrote: > On Thu, Jun 27, 2013 at 09:34:11PM -0700, Anton Vorontsov wrote: > > ... we can add the strict mode and deprecate the > > "filtering" -- basically we'll implement the idea of requiring that > > userspace registers a separate fd for each

Re: [PATCH v2] vmpressure: implement strict mode

2013-06-28 Thread Luiz Capitulino
On Fri, 28 Jun 2013 10:09:17 -0700 Anton Vorontsov wrote: > On Fri, Jun 28, 2013 at 09:57:22AM -0700, Anton Vorontsov wrote: > > On Fri, Jun 28, 2013 at 10:00:27AM -0400, Luiz Capitulino wrote: > > > On Thu, 27 Jun 2013 22:07:12 -0700 > > > Anton Vorontsov wrote: &g

Re: [PATCH v2] vmpressure: implement strict mode

2013-06-28 Thread Luiz Capitulino
On Fri, 28 Jun 2013 10:09:17 -0700 Anton Vorontsov wrote: > So, I would now argue that the current scheme is perfectly OK and can do > everything you can do with the "strict" one, I forgot commenting this bit. This is not true, because I don't want a low fd to be notified on critical level. The

Re: [PATCH v2] vmpressure: implement strict mode

2013-06-28 Thread Luiz Capitulino
On Fri, 28 Jun 2013 11:45:47 -0700 Anton Vorontsov wrote: > On Fri, Jun 28, 2013 at 02:25:58PM -0400, Luiz Capitulino wrote: > > > > > That's how it's expected to work, because on strict mode you're > > > > > notified > > > > > for

Re: [PATCH v2] vmpressure: implement strict mode

2013-06-28 Thread Luiz Capitulino
On Fri, 28 Jun 2013 11:55:47 -0700 Anton Vorontsov wrote: > On Fri, Jun 28, 2013 at 02:45:07PM -0400, Luiz Capitulino wrote: > > On Fri, 28 Jun 2013 10:09:17 -0700 > > Anton Vorontsov wrote: > > > > > So, I would now argue that the current scheme is perfectly OK a

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Luiz Capitulino
On Sun, 12 May 2013 21:49:34 +0300 "Michael S. Tsirkin" wrote: > On Sun, May 12, 2013 at 12:36:09PM -0400, Rik van Riel wrote: > > On 05/12/2013 10:30 AM, Michael S. Tsirkin wrote: > > >On Thu, May 09, 2013 at 10:53:49AM -0400, Luiz Capitulino wrote: > >

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Luiz Capitulino
On Mon, 13 May 2013 11:34:41 -0300 Rafael Aquini wrote: > You're right, and the host's member is used to communicate the configured size > to guest's balloon device, however, by not changing it when the shrinker > causes > the balloon to deflate will make the balloon thread to be woken up again

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Luiz Capitulino
On Mon, 13 May 2013 22:02:50 +0300 "Michael S. Tsirkin" wrote: > On Mon, May 13, 2013 at 02:25:11PM -0400, Luiz Capitulino wrote: > > On Mon, 13 May 2013 11:34:41 -0300 > > Rafael Aquini wrote: > > > > > You're right, and the host's member

[PATCH] package: Makefile: unbreak binrpm-pkg target

2013-05-15 Thread Luiz Capitulino
Commit 6501320311664e11ad5489fedb17ea1f817c2617 dropped the rpm spec as a prerequisite for the binrpm-pkg target but forgot to update $< usage, which causes the rule to break. This commit fixes that by replacing $< with the spec name. Signed-off-by: Luiz Capitulino --- scripts/package/Ma

[RFC v2 0/2] virtio_balloon: auto-ballooning support

2013-05-09 Thread Luiz Capitulino
rue 5. Balloon the guest memory down, say from 1G to 256MB 6. Generate some pressure in the guest, say a kernel build with -j16 Any feedback is appreciated! Luiz Capitulino (2): virtio_balloon: move balloon_lock mutex to callers virtio_balloon: auto-ballooning support drivers/virtio/v

[RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-09 Thread Luiz Capitulino
4 3649 1079847 1616367 4543 953289 1635379 5642 913237 1514000 Auto-ballooning enabled: RUN TIME(s) SWAP IN SWAP OUT 1629 901 12537 2624 981 18506 3626 573 9085 4631 2250 42534 5627 1610 20808 Signed-of

[RFC 1/2] virtio_balloon: move balloon_lock mutex to callers

2013-05-09 Thread Luiz Capitulino
semantics. Signed-off-by: Luiz Capitulino --- drivers/virtio/virtio_balloon.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index bd3ae32..9d5fe2b 100644 --- a/drivers/virtio/virtio_balloon.c +++ b

Re: [RFC 1/2] virtio_balloon: move balloon_lock mutex to callers

2013-05-10 Thread Luiz Capitulino
On Thu, 9 May 2013 18:03:09 -0300 Rafael Aquini wrote: > On Thu, May 09, 2013 at 10:53:48AM -0400, Luiz Capitulino wrote: > > This commit moves the balloon_lock mutex out of the fill_balloon() > > and leak_balloon() functions to their callers. > > > > The reason for t

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-10 Thread Luiz Capitulino
On Thu, 9 May 2013 18:15:19 -0300 Rafael Aquini wrote: > On Thu, May 09, 2013 at 10:53:49AM -0400, Luiz Capitulino wrote: > > Automatic ballooning consists of dynamically adjusting the guest's > > balloon according to memory pressure in the host and in the guest. > >

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-10 Thread Luiz Capitulino
On Fri, 10 May 2013 09:20:46 -0400 Luiz Capitulino wrote: > On Thu, 9 May 2013 18:15:19 -0300 > Rafael Aquini wrote: > > > On Thu, May 09, 2013 at 10:53:49AM -0400, Luiz Capitulino wrote: > > > Automatic ballooning consists of dynamically adjusting the guest's >

Re: [RFC v2 0/2] virtio_balloon: auto-ballooning support

2013-05-16 Thread Luiz Capitulino
On Thu, 16 May 2013 16:56:34 -0400 Sasha Levin wrote: > On 05/09/2013 10:53 AM, Luiz Capitulino wrote: > > Hi, > > > > This series is a respin of automatic ballooning support I started > > working on last year. Patch 2/2 contains all relevant technical > > det

Re: [PATCH 0/2] Mempressure cgroup

2013-01-11 Thread Luiz Capitulino
On Fri, 4 Jan 2013 00:27:52 -0800 Anton Vorontsov wrote: > - I've split the pach into two: 'shrinker' and 'levels' parts. While the > full-fledged userland shrinker is an interesting idea, we don't have any > users ready for it, so I won't advocate for it too much. For the next version of th

Re: [RFC 2/2] virtio_balloon: add auto-ballooning support

2013-01-14 Thread Luiz Capitulino
On Sat, 12 Jan 2013 02:13:17 +0530 Amit Shah wrote: > On (Tue) 18 Dec 2012 [18:17:30], Luiz Capitulino wrote: > > The auto-ballooning feature automatically performs balloon inflate or > > deflate based on host and guest memory pressure. This can help to > > avoid swapping o

Re: [Qemu-devel] [PATCH v10] kvm: notify host when the guest is panicked

2012-10-01 Thread Luiz Capitulino
On Wed, 29 Aug 2012 13:18:54 +0800 Wen Congyang wrote: > We can know the guest is panicked when the guest runs on xen. > But we do not have such feature on kvm. What's the status of this series? It got lost in my queue and I ended up not reviewing it, but it seems to be stuck. > > Another pur

[PATCH 2/4] kvm: kvm_create_vm_debugfs(): cleanup on error

2016-08-31 Thread Luiz Capitulino
Memory and debugfs entries are leaked on error. Fix it. Signed-off-by: Luiz Capitulino --- virt/kvm/kvm_main.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index c1dc45e..9293285 100644 --- a/virt/kvm/kvm_main.c +++ b

[PATCH 4/4] kvm: x86: export TSC offset to user-space

2016-08-31 Thread Luiz Capitulino
sing only the TSC offset for now. So, let's get this merged first and do the TSC multiplier as a second step Signed-off-by: Luiz Capitulino --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm.c | 1 + arch/x86/kvm/vmx.c | 8 arch/x86/kvm/x8

[PATCH 1/4] kvm: kvm_destroy_vm_debugfs(): check debugs_stat_data pointer

2016-08-31 Thread Luiz Capitulino
This make it possible to call kvm_destroy_vm_debugfs() from kvm_create_vm_debugfs() in error conditions. Signed-off-by: Luiz Capitulino --- virt/kvm/kvm_main.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 1950782

[PATCH 0/4] kvm: export TSC offset to user-space

2016-08-31 Thread Luiz Capitulino
er line, for each vCPU. For example: vcpu0: 18446742405270834952 vcpu1: 18446742405270834952 vcpu2: 18446742405270834952 vcpu3: 18446742405270834952 Please, see patch 4/4 for additional details. Luiz Capitulino (4): kvm: kvm_destroy_vm_debugfs(): check debugs_stat_data pointer kvm:

[PATCH 3/4] kvm: add stub for arch specific debugfs support

2016-08-31 Thread Luiz Capitulino
kvm_arch_create_vm_debugfs() allows arch specific code to create entries in the VM's directory in debugfs. x86 will implement support for this in the next commit. Signed-off-by: Luiz Capitulino --- arch/arm/kvm/arm.c | 5 + arch/mips/kvm/mips.c | 5 + arch/powerp

Re: [PATCH 4/4] kvm: x86: export TSC offset to user-space

2016-09-02 Thread Luiz Capitulino
On Fri, 2 Sep 2016 09:43:01 -0400 Stefan Hajnoczi wrote: > On Wed, Aug 31, 2016 at 01:05:45PM -0400, Luiz Capitulino wrote: > > We need to retrieve a VM's TSC offset in order to use > > the host's TSC to merge host and guest traces. This is > > exp

Re: [PATCH 4/4] kvm: x86: export TSC offset to user-space

2016-09-02 Thread Luiz Capitulino
On Fri, 2 Sep 2016 12:26:55 -0400 Luiz Capitulino wrote: > I guess that what tools like trace-cmd want to do in those cases > is to warn the user and discard the trace. A simple way of doing > this would be to re-check that the TSC offset are the same after > tracing is done. It co

Re: [PATCH 4/4] kvm: x86: export TSC offset to user-space

2016-09-02 Thread Luiz Capitulino
On Fri, 2 Sep 2016 19:00:41 +0200 Paolo Bonzini wrote: > On 31/08/2016 19:05, Luiz Capitulino wrote: > > vcpu0: 18446742405270834952 > > vcpu1: 18446742405270834952 > > vcpu2: 18446742405270834952 > > vcpu3: 18446742405270834952 > > > >

[PATCH 0/2] x86/x2apic: fix conversion to CPU hotplug state machine

2016-08-04 Thread Luiz Capitulino
The first patch fixes a real reproducible issue. The second one is more theoretical. Please, check the paches for more details. Luiz Capitulino (2): x86/x2apic: fix NULL pointer def during boot x86/x2apic: check return value on probe arch/x86/kernel/apic/x2apic_cluster.c | 9 + 1

[PATCH 1/2] x86/x2apic: fix NULL pointer def during boot

2016-08-04 Thread Luiz Capitulino
Commit 6b2c28471, moved the allocation of cpus_in_cluster to the x2apic_prepare_cpu() callback. However, it forgot to move the cpumask_set_cpu() call that uses it. This generates a NULL pointer dereference during boot in machines with x2apic_mode=true. Signed-off-by: Luiz Capitulino --- arch

[PATCH 2/2] x86/x2apic: check return value on probe

2016-08-04 Thread Luiz Capitulino
cpuhp_setup_state() can fail. If it does, we have to return 0 to upper layers. Signed-off-by: Luiz Capitulino --- arch/x86/kernel/apic/x2apic_cluster.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic

[nohz_full/apic] multiple timer interrupts a second

2017-11-03 Thread Luiz Capitulino
[CC'ing lkml this time] Hi, I've observed that smp_apic_timer_interrupt() is sometimes called two or more times a second on a nohz_full core which has a single task taking 100% of the core. In one of the calls, hrtimer_interrupt() runs tick_sched_timer(), but in others it doesn't call any handle

Re: [nohz_full/apic] multiple timer interrupts a second

2017-11-06 Thread Luiz Capitulino
On Sat, 04 Nov 2017 10:14:52 +0100 Nicolai Stange wrote: > Hi Luiz, > > [John Stultz added to CC] > > On Fri, Nov 03 2017, Luiz Capitulino wrote: > > > [CC'ing lkml this time] > > > > I've observed that smp_apic_timer_interrupt() is someti

Re: [PATCH v7 05/11] task_isolation: add debug boot flag

2015-10-05 Thread Luiz Capitulino
On Mon, 28 Sep 2015 11:17:20 -0400 Chris Metcalf wrote: > The new "task_isolation_debug" flag simplifies debugging > of TASK_ISOLATION kernels when processes are running in > PR_TASK_ISOLATION_ENABLE mode. Such processes should get no > interrupts from the kernel, and if they do, when this boot

Re: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers

2015-09-04 Thread Luiz Capitulino
On Tue, 1 Sep 2015 22:47:24 +0200 Frederic Weisbecker wrote: > On Tue, Sep 01, 2015 at 07:14:13PM +, Jiang, Yunhong wrote: > > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > > > index 8b864ec..0902e4d 100644 > > > --- a/kernel/sched/core.c > > > +++ b/kernel/sched/core.c > > > @@

Re: [GIT PULL] isolation: 1Hz residual tick offloading v4

2018-01-24 Thread Luiz Capitulino
On Fri, 19 Jan 2018 01:02:14 +0100 Frederic Weisbecker wrote: > Ingo, > > Please pull the sched/0hz-v2 branch that can be found at: > > git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git > sched/0hz-v2 > > HEAD: 9b14d5204490f9acd03998a5e406ecadb87cddba > > Changes

Re: KASLR may break some kernel features (was Re: [PATCH v5 1/4] kaslr: add immovable_mem=nn[KMG]@ss[KMG] to specify extracting memory)

2018-01-12 Thread Luiz Capitulino
On Fri, 12 Jan 2018 10:47:53 +0800 Chao Fan wrote: > On Fri, Jan 12, 2018 at 10:31:52AM +0800, Baoquan He wrote: > >On 01/11/18 at 10:04am, Kees Cook wrote: > >> On Thu, Jan 11, 2018 at 1:00 AM, Baoquan He wrote: > >> > Hi Luiz, > >> > > >&

Re: [GIT PULL] isolation: 1Hz residual tick offloading v3

2018-01-12 Thread Luiz Capitulino
On Thu, 4 Jan 2018 05:25:32 +0100 Frederic Weisbecker wrote: > Ingo, > > Please pull the sched/0hz branch that can be found at: > > git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git > sched/0hz > > HEAD: 9e932b2cc707209febd130978a5eb9f4a943a3f4 > > -- > Now that

Re: [PATCH 4/5] sched/isolation: Residual 1Hz scheduler tick offload

2018-01-12 Thread Luiz Capitulino
es to the > housekeeping CPUs through /sys/devices/virtual/workqueue/cpumask or > domains isolation. > > Signed-off-by: Frederic Weisbecker > Cc: Chris Metcalf > Cc: Christoph Lameter > Cc: Luiz Capitulino > Cc: Mike Galbraith > Cc: Paul E. McKenney > Cc: Peter Z

KASLR may break some kernel features (was Re: [PATCH v5 1/4] kaslr: add immovable_mem=nn[KMG]@ss[KMG] to specify extracting memory)

2018-01-04 Thread Luiz Capitulino
On Thu, 4 Jan 2018 18:30:57 +0800 Baoquan He wrote: > On 01/04/18 at 04:02pm, Chao Fan wrote: > > In current code, kaslr may choose the memory region in movable > > nodes to extract kernel, which will make the nodes can't be hot-removed. > > To solve it, we can specify the memory region in immova

Re: [PATCH v5 1/4] kaslr: add immovable_mem=nn[KMG]@ss[KMG] to specify extracting memory

2018-01-08 Thread Luiz Capitulino
On Fri, 5 Jan 2018 10:58:11 +0800 Chao Fan wrote: > On Thu, Jan 04, 2018 at 06:30:57PM +0800, Baoquan He wrote: > >On 01/04/18 at 04:02pm, Chao Fan wrote: > >> In current code, kaslr may choose the memory region in movable > >> nodes to extract kernel, which will make the nodes can't be hot-rem

Re: [GIT PULL] isolation: 1Hz residual tick offloading v4

2018-01-29 Thread Luiz Capitulino
On Mon, 29 Jan 2018 02:10:26 +0100 Frederic Weisbecker wrote: > On Wed, Jan 24, 2018 at 10:46:08AM -0500, Luiz Capitulino wrote: > > On Fri, 19 Jan 2018 01:02:14 +0100 > > Frederic Weisbecker wrote: > > > > > Ingo, > > > > > > Please p

Re: [GIT PULL] isolation: 1Hz residual tick offloading v4

2018-01-29 Thread Luiz Capitulino
On Mon, 29 Jan 2018 16:54:31 +0100 Peter Zijlstra wrote: > On Mon, Jan 29, 2018 at 10:33:16AM -0500, Luiz Capitulino wrote: > > Cool, passing tsc=reliable worked for me. I finally got to the tick to > > go completely away. While I agree that fixing that is beyond the scope > &

Re: [PATCH v6 5/5] kaslr: add kaslr_mem=nn[KMG]!ss[KMG] to avoid memory regions

2018-01-16 Thread Luiz Capitulino
On Tue, 16 Jan 2018 08:43:20 +0800 Baoquan He wrote: > On 01/15/18 at 08:49pm, Chao Fan wrote: > > Hi Luiz, > > > > I don't know if this patch is OK for you. > > Of coure you can only use kaslr_mem=nn@ss to solve the 1G huge page > > issue. Because we know the region [0,1G] is not suitable for 1

Re: [GIT PULL] isolation: 1Hz residual tick offloading v3

2018-01-16 Thread Luiz Capitulino
On Tue, 16 Jan 2018 16:41:00 +0100 Frederic Weisbecker wrote: > On Fri, Jan 12, 2018 at 02:18:13PM -0500, Luiz Capitulino wrote: > > On Thu, 4 Jan 2018 05:25:32 +0100 > > Frederic Weisbecker wrote: > > > > > Ingo, > > > > > > Pleas

Re: [PATCH 4/5] sched/isolation: Residual 1Hz scheduler tick offload

2018-01-16 Thread Luiz Capitulino
On Tue, 16 Jan 2018 16:57:45 +0100 Frederic Weisbecker wrote: > On Fri, Jan 12, 2018 at 02:22:58PM -0500, Luiz Capitulino wrote: > > On Thu, 4 Jan 2018 05:25:36 +0100 > > Frederic Weisbecker wrote: > > > > > When a CPU runs in full dynticks mode, a 1Hz tick

Re: [PATCH v7 0/5] x86/KASLR: Add parameter kaslr_mem=nn[KMG]@ss[KMG]

2018-01-17 Thread Luiz Capitulino
On Wed, 17 Jan 2018 18:53:46 +0800 Chao Fan wrote: > ***Background: > People reported that kaslr may randomly chooses some positions > which are located in movable memory regions. This will break memory > hotplug feature. > > And also on kvm guest with 4GB meory, the good unfragmented 1GB could

Re: [GIT PULL] isolation: 1Hz residual tick offloading v3

2018-01-17 Thread Luiz Capitulino
On Tue, 16 Jan 2018 23:51:29 +0100 Frederic Weisbecker wrote: > On Tue, Jan 16, 2018 at 11:52:11AM -0500, Luiz Capitulino wrote: > > On Tue, 16 Jan 2018 16:41:00 +0100 > > Frederic Weisbecker wrote: > > > So isolcpus= is now the place where we control the isolation fe

Re: [PATCH v7 0/5] x86/KASLR: Add parameter kaslr_mem=nn[KMG]@ss[KMG]

2018-01-18 Thread Luiz Capitulino
On Thu, 18 Jan 2018 09:11:14 +0800 Chao Fan wrote: > On Wed, Jan 17, 2018 at 12:32:35PM -0500, Luiz Capitulino wrote: > >On Wed, 17 Jan 2018 18:53:46 +0800 > >Chao Fan wrote: > > > >> ***Background: > >> People reported that kaslr may randomly chooses s

Re: [GIT PULL] isolation: 1Hz residual tick offloading v3

2018-01-18 Thread Luiz Capitulino
On Thu, 18 Jan 2018 04:04:43 +0100 Frederic Weisbecker wrote: > On Wed, Jan 17, 2018 at 12:38:01PM -0500, Luiz Capitulino wrote: > > On Tue, 16 Jan 2018 23:51:29 +0100 > > Frederic Weisbecker wrote: > > > > > On Tue, Jan 16, 2018 at 11:52:11AM -0500, Luiz Capi

[PATCH] KVM: VMX: re-add ple_gap module parameter

2018-11-23 Thread Luiz Capitulino
Apparently, the ple_gap parameter was accidentally removed by commit c8e88717cfc6b36bedea22368d97667446318291. Add it back. Signed-off-by: Luiz Capitulino --- arch/x86/kvm/vmx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 4555077d69ce

Re: [PATCH] KVM: VMX: re-add ple_gap module parameter

2018-11-23 Thread Luiz Capitulino
On Fri, 23 Nov 2018 19:42:53 +0200 Liran Alon wrote: > > On 23 Nov 2018, at 19:02, Luiz Capitulino wrote: > > > > > > Apparently, the ple_gap parameter was accidentally removed > > by commit c8e88717cfc6b36bedea22368d97667446318291. Add it > > back. >

Re: [PATCH] KVM: VMX: re-add ple_gap module parameter

2018-11-28 Thread Luiz Capitulino
On Wed, 28 Nov 2018 15:57:53 + "Moger, Babu" wrote: > My bad.. Sorry about this. I think this should also go to > sta...@vger.kernel.org No problem man, this happens. Thanks for the review! > > > -Original Message- > > From: Luiz Capitulino > &g

Re: [PATCH v2 0/2] x86/boot/KASLR: Skip specified number of 1GB huge pages when do physical randomization

2018-06-26 Thread Luiz Capitulino
es when do kernel physical randomization. If the specified number of GB > huge pages is bigger than amount of good GB huge pages which system can > provide, it's consistent with the current huge page implementation. Reviewed-and-Tested-by: Luiz Capitulino > > v1->v2: > T

Re: [GIT PULL] isolation: 1Hz residual tick offloading v4

2018-05-25 Thread Luiz Capitulino
On Fri, 25 May 2018 04:56:25 +0200 Frederic Weisbecker wrote: > On Tue, May 22, 2018 at 10:10:19PM +0300, Yauheni Kaliuta wrote: > > Hi, Frederic! > > > > >>>>> On Mon, 29 Jan 2018 02:10:26 +0100, Frederic Weisbecker wrote: > > > On Wed, Jan

Re: [PATCH RFC] nohz,blk-mq: do not create blk-mq workqueues on nohz dedicated CPUs

2015-04-07 Thread Luiz Capitulino
On Tue, 31 Mar 2015 20:18:36 -0300 Marcelo Tosatti wrote: > On Tue, Mar 31, 2015 at 05:02:38PM +0200, Frederic Weisbecker wrote: > > On Tue, Mar 31, 2015 at 10:27:26AM -0400, Rik van Riel wrote: > > > CPUs with nohz_full do not want disruption from timer interrupts, > > > or other random system t

Re: kernel/timer: avoid spurious ksoftirqd wakeups (v2)

2015-04-10 Thread Luiz Capitulino
On Fri, 10 Apr 2015 15:09:07 -0300 Marcelo Tosatti wrote: > On Wed, Apr 08, 2015 at 12:12:45AM +0200, Frederic Weisbecker wrote: > > On Tue, Apr 07, 2015 at 11:10:49PM +0200, Thomas Gleixner wrote: > > > On Mon, 6 Apr 2015, Marcelo Tosatti wrote: > > > > It is only necessary to raise timer softir

Re: kernel/timer: avoid spurious ksoftirqd wakeups (v2)

2015-04-13 Thread Luiz Capitulino
On Sat, 11 Apr 2015 11:25:49 +0200 (CEST) Thomas Gleixner wrote: > On Fri, 10 Apr 2015, Luiz Capitulino wrote: > > On Fri, 10 Apr 2015 15:09:07 -0300 > > > It seems a valid solution for this interrupt is to program > > > sched_timer to the nearest future possible.

Re: [PATCH 0/2] x86/boot/KASLR: Skip specified number of 1GB huge pages when do physical randomization

2018-05-23 Thread Luiz Capitulino
On Fri, 18 May 2018 19:28:36 +0800 Baoquan He wrote: > > Note that it's not KASLR specific: if we had some other kernel feature that > > tried > > to allocate a piece of memory from what appears to be perfectly usable > > generic RAM > > we'd have the same problems! > > Hmm, this may not b

Re: [PATCH 0/2] x86/boot/KASLR: Skip specified number of 1GB huge pages when do physical randomization

2018-05-29 Thread Luiz Capitulino
On Mon, 28 May 2018 17:54:18 +0800 Baoquan He wrote: > On 05/23/18 at 03:10pm, Luiz Capitulino wrote: > > On Fri, 18 May 2018 19:28:36 +0800 > > Baoquan He wrote: > > > > > > Note that it's not KASLR specific: if we had some other kernel feature >

Re: [RFC][Patch v8 5/7] virtio: Enables to add a single descriptor to the host

2019-02-06 Thread Luiz Capitulino
On Wed, 6 Feb 2019 07:56:37 -0500 Nitesh Narayan Lal wrote: > On 2/5/19 3:49 PM, Michael S. Tsirkin wrote: > > On Mon, Feb 04, 2019 at 03:18:52PM -0500, Nitesh Narayan Lal wrote: > >> This patch enables the caller to expose a single buffers to the > >> other end using vring descriptor. It also

Re: [RFC][Patch v8 5/7] virtio: Enables to add a single descriptor to the host

2019-02-06 Thread Luiz Capitulino
On Wed, 6 Feb 2019 08:24:14 -0500 Nitesh Narayan Lal wrote: > On 2/6/19 8:15 AM, Luiz Capitulino wrote: > > On Wed, 6 Feb 2019 07:56:37 -0500 > > Nitesh Narayan Lal wrote: > > > >> On 2/5/19 3:49 PM, Michael S. Tsirkin wrote: > >>> On Mon, Feb 04

[PATCH 2/4] memblock: add memblock_virt_alloc_nid_nopanic()

2014-02-10 Thread Luiz Capitulino
From: Luiz capitulino This function tries to allocate memory from the specified node only (vs. automatically trying other nodes on failure). This is going to be used by HugeTLB boot-time allocation code in next commits. Signed-off-by: Luiz capitulino --- include/linux/bootmem.h | 4 mm

  1   2   3   >