Re: [PATCH v3 11/15] KVM: s390: stop using lists to keep track of used dat tables

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

 



On Fri Jan 17, 2025 at 8:09 PM CET, Claudio Imbrenda wrote:
> Until now, every dat table allocated to map a guest was put in a
> linked list. The page->lru field of struct page was used to keep track
> of which pages were being used, and when the gmap is torn down, the
> list was walked and all pages freed.
>
> This patch gets rid of the usage of page->lru. Page tables are now
> freed by recursively walking the dat table tree.
>
> Since s390_unlist_old_asce() becomes useless now, remove it.
>
> Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>

With comment fixes done:

Reviewed-by: Christoph Schlameuss <schlameuss@xxxxxxxxxxxxx>

> ---
>  arch/s390/include/asm/gmap.h |   3 --
>  arch/s390/mm/gmap.c          | 102 ++++++++---------------------------
>  2 files changed, 23 insertions(+), 82 deletions(-)
>
> diff --git a/arch/s390/include/asm/gmap.h b/arch/s390/include/asm/gmap.h
> index dbf2329281d2..904d97f0bc5e 100644
> --- a/arch/s390/include/asm/gmap.h
> +++ b/arch/s390/include/asm/gmap.h
> @@ -45,7 +45,6 @@
>   */
>  struct gmap {
>  	struct list_head list;
> -	struct list_head crst_list;

nit: Please also remove @crst_list and @pt_list from the struct gmap comment.

>  	struct mm_struct *mm;
>  	struct radix_tree_root guest_to_host;
>  	struct radix_tree_root host_to_guest;
> @@ -61,7 +60,6 @@ struct gmap {
>  	/* Additional data for shadow guest address spaces */
>  	struct radix_tree_root host_to_rmap;
>  	struct list_head children;
> -	struct list_head pt_list;
>  	spinlock_t shadow_lock;
>  	struct gmap *parent;
>  	unsigned long orig_asce;
> @@ -141,7 +139,6 @@ int gmap_protect_one(struct gmap *gmap, unsigned long gaddr, int prot, unsigned
>  void gmap_sync_dirty_log_pmd(struct gmap *gmap, unsigned long dirty_bitmap[4],
>  			     unsigned long gaddr, unsigned long vmaddr);
>  int s390_disable_cow_sharing(void);
> -void s390_unlist_old_asce(struct gmap *gmap);
>  int s390_replace_asce(struct gmap *gmap);
>  void s390_uv_destroy_pfns(unsigned long count, unsigned long *pfns);
>  int __s390_uv_destroy_range(struct mm_struct *mm, unsigned long start,

[...]






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux