[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v1] xen: mem_access: conditionally compile vm_event.c & monitor.c


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
  • From: Sergiy Kibrik <sergiy_kibrik@xxxxxxxx>
  • Date: Thu, 16 Jan 2025 13:29:27 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SzJcRdDFcNa/JHdo6ET0bo0EE20NiRzFULe0NfJ3fVU=; b=xlVvv/euiOMS7BFI0OBtnEb91sSd1UXmdkUzuh+KFH/tExkwSrQBpMGBFptBHhkpkA5CJloR1m5/ibeg63Bgiyq1111pU5BWkE9dxDcwPoAvqCIQjzIw13U5Vho18tJFYjFIOAgP2zQwzpG4WaLt4Gg+5YYu58lZ6ut1RdDC+c8Pj1QidkV2FE1RPV+LWs3MgUNC3Anp/GLwMSX39mfxGLUzJPBFTonUR5kTj8LVAkBQyLa1M7AkwPB2E1rONyei4BJIu49V4VhndKF33h2gBmUR743PsfQWS4m80pcNsBBMB9oL9+y4cgFigH5N/0yd8CrijQtqUCdk56eWbv96wQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UcqdOgJ7kZ1glDYlQcohnnwArXlIDygMWwXA5415niZx7gM/CE80cK1h2eabMgibGZOOxt2LQvGlIsc6Jl7rsrEIDJmIl3j2HGT+G/FjYy+ZdhSwcQ47gpDau1JOuJf/MOEbROE+jHGz8QfVgxwPYQPIaXPcYOXb0L2AhZEq8gv+S+Gui7kKwXDvgzw0HhOmpnO6gD0hqR8OMI7QHH/77aS44+UKIO03URdd6GIEGxwEASC/1Qhtz7tCm/Ijbe2CBjDlnVItoicbm91eWdMpu8B5jqzrbw4IZ00c1sdV6oildmprg58guFmWU0HSzQ9PhuxdwV60QwbqYN3BqGy2Cg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Stefano Stabellini <stefano.stabellini@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 16 Jan 2025 11:29:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

07.01.25 10:46, Jan Beulich:
On 06.01.2025 19:09, Tamas K Lengyel wrote:
On Mon, Jan 6, 2025 at 10:10 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:

On 06.01.2025 15:05, Tamas K Lengyel wrote:
On Mon, Jan 6, 2025 at 5:16 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:

On 30.12.2024 07:30, Sergiy Kibrik wrote:
From: Stefano Stabellini <stefano.stabellini@xxxxxxx>

Extend coverage of CONFIG_MEM_ACCESS option and make the build of VM events
and monitoring support optional.

Yet doesn't this end up in things becoming misleading? Don't we rather need a
2nd Kconfig option, with a dependency between the two? Or alternatively a
rename of the existing option (to describe the higher-level feature rather
than the lower level one)? Tamas, I'm particularly interested in knowing your
view here as well.

Thanks Jan, I was thinking the same thing. The dependency of these
subsystems is mem_access -> monitor -> vm_event. If the goal here is
to disable all three levels the ideal way would be to have separate
kconfig options for each level. It may be a bit too fine-grained
though on ARM since there are only two types of events for monitor
(SMC & mem_access) and only the monitor uses the vm_event channel (no
mem-sharing/paging on ARM). So if doing separate kconfig for each
individual feature is an overkill I would suggest using
CONFIG_VM_EVENT that disables all three levels, including both
mem_access & smc monitor hooks.

Except that "disables all three levels" doesn't work, unless the other
option(s) are promptless (and selected). I'd have expected VM_EVENT to
maybe have a "depends on MEM_ACCESS", whereas a "select MEM_ACCESS"
wouldn't make much sense as long as MEM_ACCESS can be enabled
individually (with it being unclear to me whether such a configuration
is actually useful in any way).

Not sure I follow. None of these systems make sense to enable
individually. Without vm_event monitor/mem_access are useless, that's
why I would pick CONFIG_VM_EVENT as the option on ARM to disable all
three levels if we don't want to start splitting it into multiple
kconfig options (which I think may be an overkill here).

Oh, okay, you suggest to replace MEM_ACCESS by VM_EVENT at the Kconfig
level. That would be fine with me, so long as it's also appropriate on
(in particular) x86. Then, if there was ever a 2nd use of mem-access,
MEM_ACCESS could be re-introduced as a standalone option.


Thanks Jan,
would it be ok to replace MEM_ACCESS with VM_EVENT everywhere at once, including in defconfigs and automation script etc? Or such changes would better be done gradually, starting with changing Kconfig only?

  -Sergiy



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.