Skip to content

Commit

Permalink
Merge tag 'rolling-lts/wsl/5.15.90.3' into linux-msft-wsl-5.15.y
Browse files Browse the repository at this point in the history
Linux rolling-lts/wsl/5.15.90.3
  • Loading branch information
kelsey-steele committed Jul 13, 2023
2 parents 4aeb777 + df38460 commit c8875a7
Show file tree
Hide file tree
Showing 16 changed files with 919 additions and 181 deletions.
21 changes: 21 additions & 0 deletions Documentation/admin-guide/cgroup-v2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,27 @@ PAGE_SIZE multiple when read back.
high limit is used and monitored properly, this limit's
utility is limited to providing the final safety net.

memory.reclaim
A write-only nested-keyed file which exists for all cgroups.

This is a simple interface to trigger memory reclaim in the
target cgroup.

This file accepts a single key, the number of bytes to reclaim.
No nested keys are currently supported.

Example::

echo "1G" > memory.reclaim

The interface can be later extended with nested keys to
configure the reclaim behavior. For example, specify the
type of memory to reclaim from (anon, file, ..).

Please note that the kernel can over or under reclaim from
the target cgroup. If less bytes are reclaimed than the
specified amount, -EAGAIN is returned.

memory.oom.group
A read-write single value file which exists on non-root
cgroups. The default value is "0".
Expand Down
5 changes: 3 additions & 2 deletions MSFT-Merge/log
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Name SHA1
---- ----
config/wsl a1edb1f45f33bee0960a1c82de4737227a8a5e72
config/wsl efdbd7684bb9625e93871b347d3c7327fc9a63ac
feature/arm64-hyperv-hypercall-interface/5.15 3e314b48254cb9c3eeac699356ac605193b4b6fa
feature/arm64-hyperv-synthetic-clocks-timers/5.15 59db35e760b9bacc8596a3660a12420f1fa5318f
feature/dxgkrnl/5.15 411a9171ae715efe3817a05a1802f9367c04df33
feature/dxgkrnl/5.15 26d29d8377a78f1b0014f6c9ba6df9ed5763f885
feature/hvlite_virtio_pmem/5.15 9194f84de8a58bc1a83125054286d649e35054be
feature/page-reporting/5.15 ad427234defd6cdfdc0c21ca5b64ef589b82a421
feature/vpci/5.15 d19bb684cca000b65a3b001964a3cc820cbbf9b5
feature/memory-reclaim/5.15 fed46d1f99d22a5a9efd06da0bf5baf6a04045d8
fix/vsock/5.15 c9e883dfbd7be1194e53133d888b435b277e2e5b
product/wsl/readme/5.15 0e1ddcfdc9986e1bf420a3663011abd79752c642
product/wsl/security/5.15 ab2488a9f10a3b83b958103c9b3ed728eb57c564
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
VERSION = 5
PATCHLEVEL = 15
SUBLEVEL = 90
EXTRAVERSION = .1
EXTRAVERSION = .3
NAME = Trick or Treat

# *DOCUMENTATION*
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/configs/config-wsl-arm64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 5.15.83.1 Kernel Configuration
# Linux/arm64 5.15.90.1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="aarch64-msft-linux-gcc (GCC) 9.3.0"
CONFIG_CC_IS_GCC=y
Expand Down Expand Up @@ -1768,7 +1768,7 @@ CONFIG_BLK_DEV_BSG=y
# CONFIG_CHR_DEV_SCH is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_SCAN_ASYNC=y

#
# SCSI Transports
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/configs/config-wsl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.15.83.1 Kernel Configuration
# Linux/x86 5.15.90.1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="x86_64-msft-linux-gcc (GCC) 9.3.0"
CONFIG_CC_IS_GCC=y
Expand Down Expand Up @@ -1777,7 +1777,7 @@ CONFIG_BLK_DEV_BSG=y
# CONFIG_CHR_DEV_SCH is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_SCAN_ASYNC=y

#
# SCSI Transports
Expand Down
12 changes: 4 additions & 8 deletions drivers/hv/dxgkrnl/dxgadapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,7 @@ struct dxgprocess_adapter *dxgprocess_adapter_create(struct dxgprocess *process,
}
return adapter_info;
cleanup:
if (adapter_info)
kfree(adapter_info);
kfree(adapter_info);
return NULL;
}

Expand Down Expand Up @@ -1233,10 +1232,8 @@ struct dxgsyncobject *dxgsyncobject_create(struct dxgprocess *process,
DXG_TRACE("Syncobj created: %p", syncobj);
return syncobj;
cleanup:
if (syncobj->host_event)
kfree(syncobj->host_event);
if (syncobj)
kfree(syncobj);
kfree(syncobj->host_event);
kfree(syncobj);
return NULL;
}

Expand Down Expand Up @@ -1316,8 +1313,7 @@ void dxgsyncobject_release(struct kref *refcount)
kref_put(&syncobj->shared_owner->ssyncobj_kref,
dxgsharedsyncobj_release);
}
if (syncobj->host_event)
kfree(syncobj->host_event);
kfree(syncobj->host_event);
kfree(syncobj);
}

Expand Down
19 changes: 14 additions & 5 deletions drivers/hv/dxgkrnl/dxgkrnl.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ struct dxghwqueue;
* Driver private data.
* A single /dev/dxg device is created per virtual machine.
*/
struct dxgdriver{
struct dxgdriver {
struct dxgglobal *dxgglobal;
struct device *dxgdev;
struct pci_driver pci_drv;
struct device *dxgdev;
struct pci_driver pci_drv;
struct hv_driver vmbus_drv;
};
extern struct dxgdriver dxgdrv;
Expand Down Expand Up @@ -386,6 +386,8 @@ struct dxgprocess {
struct list_head plistentry;
pid_t pid;
pid_t tgid;
pid_t vpid; /* pdi from the current namespace */
struct pid_namespace *nspid; /* namespace id */
/* how many time the process was opened */
struct kref process_kref;
/* protects the object memory */
Expand Down Expand Up @@ -478,6 +480,7 @@ struct dxgadapter {
struct winluid luid; /* VM bus channel luid */
u16 device_description[80];
u16 device_instance_id[WIN_MAX_PATH];
bool compute_only;
bool stopping_adapter;
};

Expand Down Expand Up @@ -954,7 +957,8 @@ int dxgvmb_send_query_alloc_residency(struct dxgprocess *process,
*args);
int dxgvmb_send_escape(struct dxgprocess *process,
struct dxgadapter *adapter,
struct d3dkmt_escape *args);
struct d3dkmt_escape *args,
bool user_mode);
int dxgvmb_send_query_vidmem_info(struct dxgprocess *process,
struct dxgadapter *adapter,
struct d3dkmt_queryvideomemoryinfo *args,
Expand Down Expand Up @@ -984,14 +988,19 @@ int dxgvmb_send_get_stdalloc_data(struct dxgdevice *device,
void *prive_alloc_data,
u32 *res_priv_data_size,
void *priv_res_data);
int dxgvmb_send_query_statistics(struct dxgprocess *process,
int dxgvmb_send_query_statistics(struct d3dkmthandle host_process_handle,
struct dxgadapter *adapter,
struct d3dkmt_querystatistics *args);
int dxgvmb_send_async_msg(struct dxgvmbuschannel *channel,
void *command,
u32 cmd_size);
int dxgvmb_send_share_object_with_host(struct dxgprocess *process,
struct d3dkmt_shareobjectwithhost *args);
int dxgvmb_send_invalidate_cache(struct dxgprocess *process,
struct dxgadapter *adapter,
struct d3dkmt_invalidatecache *args);
int dxgvmb_send_is_feature_enabled(struct dxgadapter *adapter,
struct d3dkmt_isfeatureenabled *args);

void signal_host_cpu_event(struct dxghostevent *eventhdr);
int ntstatus2int(struct ntstatus status);
Expand Down
11 changes: 10 additions & 1 deletion drivers/hv/dxgkrnl/dxgmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#define PCI_VENDOR_ID_MICROSOFT 0x1414
#define PCI_DEVICE_ID_VIRTUAL_RENDER 0x008E
#define PCI_DEVICE_ID_COMPUTE_ACCELERATOR 0x008A

#undef pr_fmt
#define pr_fmt(fmt) "dxgk: " fmt
Expand Down Expand Up @@ -270,6 +271,8 @@ int dxgglobal_create_adapter(struct pci_dev *dev, guid_t *guid,

adapter->adapter_state = DXGADAPTER_STATE_WAITING_VMBUS;
adapter->host_vgpu_luid = host_vgpu_luid;
if (dev->device == PCI_DEVICE_ID_COMPUTE_ACCELERATOR)
adapter->compute_only = true;
kref_init(&adapter->adapter_kref);
init_rwsem(&adapter->core_lock);
mutex_init(&adapter->device_creation_lock);
Expand Down Expand Up @@ -622,6 +625,12 @@ static struct pci_device_id dxg_pci_id_table[] = {
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID
},
{
.vendor = PCI_VENDOR_ID_MICROSOFT,
.device = PCI_DEVICE_ID_COMPUTE_ACCELERATOR,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID
},
{ 0 }
};

Expand Down Expand Up @@ -962,4 +971,4 @@ module_exit(dxg_drv_exit);

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Microsoft Dxgkrnl virtual compute device Driver");
MODULE_VERSION("2.0.1");
MODULE_VERSION("2.0.2");
4 changes: 4 additions & 0 deletions drivers/hv/dxgkrnl/dxgprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
*/

#include "dxgkrnl.h"
#include "linux/sched.h"
#include <linux/pid_namespace.h>

#undef dev_fmt
#define dev_fmt(fmt) "dxgk: " fmt
Expand All @@ -31,6 +33,8 @@ struct dxgprocess *dxgprocess_create(void)
DXG_TRACE("new dxgprocess created");
process->pid = current->pid;
process->tgid = current->tgid;
process->vpid = task_pid_vnr(current);
process->nspid = task_active_pid_ns(current);
ret = dxgvmb_send_create_process(process);
if (ret < 0) {
DXG_TRACE("send_create_process failed");
Expand Down
Loading

0 comments on commit c8875a7

Please sign in to comment.