From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: <dan.j.williams@intel.com>, <ira.weiny@intel.com>,
<fan.ni@samsung.com>, <a.manzanares@samsung.com>,
<linux-cxl@vger.kernel.org>
Subject: Re: [PATCH 1/3] cxl/mbox: Add support for background operations
Date: Fri, 14 Apr 2023 14:51:03 +0100 [thread overview]
Message-ID: <20230414145103.00000eb5@Huawei.com> (raw)
In-Reply-To: <6s2gtg7imyiyrkiq54rcxmidzkyfy4bvybfpjm5jikblnvluei@6trlbojork66>
On Tue, 11 Apr 2023 12:06:07 -0700
Davidlohr Bueso <dave@stgolabs.net> wrote:
> On Mon, 03 Apr 2023, Jonathan Cameron wrote:
>
> >On Fri, 24 Feb 2023 11:44:41 -0800
> >Davidlohr Bueso <dave@stgolabs.net> wrote:
> >> + } else {
> >> + /* estimate only */
> >> + cxl_dstate->bg.complete_pct = 100 * now / total_time;
> >> + timer_mod(cxl_dstate->bg.timer, now + CXL_MBOX_BG_UPDATE_FREQ);
> >> + }
> >> +
> >> + bg_status_reg = FIELD_DP64(bg_status_reg, CXL_DEV_BG_CMD_STS, PERCENTAGE_COMP,
> >> + cxl_dstate->bg.complete_pct);
> >> + cxl_dstate->mbox_reg_state64[R_CXL_DEV_BG_CMD_STS] = bg_status_reg;
> >> +
> >> + if (cxl_dstate->bg.complete_pct == 100) {
> >> + cxl_dstate->bg.starttime = 0;
> >> + /* registers are updated, allow new bg-capable cmds */
> >> + cxl_dstate->bg.runtime = 0;
> >
> >Looks like this could all move into the if (now >=..
> >block above as I'm not seeing either of these fields being used after that.
>
> I'd rather keep this branch. For one, the next patch will also add the msi
> notifications here; and secondly, we don't want another incoming cmd to see
> no bg command running (runtime is used to check CXL_MBOX_BUSY) and status
> pct complete not at 100.
>
Fair enough. I still haven't read patch 3 :)
Might make it today! Only a few weeks after reading patch 2.
> Thanks,
> Davidlohr
next prev parent reply other threads:[~2023-04-14 13:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 19:44 [PATCH -qemu 0/3] cxl: Background commands and device sanitation Davidlohr Bueso
2023-02-24 19:44 ` [PATCH 1/3] cxl/mbox: Add support for background operations Davidlohr Bueso
2023-03-01 19:00 ` Fan Ni
2023-03-01 20:45 ` Davidlohr Bueso
2023-04-03 16:47 ` Jonathan Cameron
2023-04-07 18:05 ` Davidlohr Bueso
2023-04-14 13:49 ` Jonathan Cameron
2023-04-11 19:06 ` Davidlohr Bueso
2023-04-14 13:51 ` Jonathan Cameron [this message]
2023-02-24 19:44 ` [PATCH 2/3] cxl/mbox: Wire up interrupts for background completion Davidlohr Bueso
2023-04-03 16:52 ` Jonathan Cameron
2023-04-04 9:22 ` Jonathan Cameron
2023-04-12 2:22 ` Davidlohr Bueso
2023-04-14 13:43 ` Jonathan Cameron
2023-02-24 19:44 ` [PATCH 3/3] cxl: Add support for device sanitation Davidlohr Bueso
2023-04-14 14:15 ` Jonathan Cameron
2023-04-16 2:32 ` Davidlohr Bueso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230414145103.00000eb5@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=a.manzanares@samsung.com \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=fan.ni@samsung.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox