lkml.org 
[lkml]   [2021]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 9/9] iommu: Move flush queue data into iommu_dma_cookie
    From
    On 2021-11-24 17:25, John Garry wrote:
    > On 23/11/2021 14:10, Robin Murphy wrote:
    >> ruct iommu_dma_msi_page {
    >>       struct list_head    list;
    >> @@ -41,7 +43,19 @@ struct iommu_dma_cookie {
    >>       enum iommu_dma_cookie_type    type;
    >>       union {
    >>           /* Full allocator for IOMMU_DMA_IOVA_COOKIE */
    >> -        struct iova_domain    iovad;
    >> +        struct {
    >> +            struct iova_domain    iovad;
    >> +
    >> +            struct iova_fq __percpu *fq;    /* Flush queue */
    >> +            /* Number of TLB flushes that have been started */
    >> +            atomic64_t        fq_flush_start_cnt;
    >> +            /* Number of TLB flushes that have been finished */
    >> +            atomic64_t        fq_flush_finish_cnt;
    >> +            /* Timer to regularily empty the flush queues */
    >> +            struct timer_list    fq_timer;
    >> +            /* 1 when timer is active, 0 when not */
    >> +            atomic_t        fq_timer_on;
    >
    > I thought that putting all the FQ stuff in its own structure would be
    > neater, but that's just personal preference.

    But look, it is! ;)

    The iova_domain is still a fundamental part of the flush queue built
    around it; the rest of the machinery can't stand in isolation. It's just
    an anonymous structure because I don't feel like needlessly cluttering
    up the code with "cookie->fq.fq" silliness.

    Cheers,
    Robin.

    \
     
     \ /
      Last update: 2021-11-24 19:00    [W:2.304 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site