Re: [PATCH 7.2 v10 0/2] skip redundant sync IPIs when TLB flush sent them
From: Peter Zijlstra
Date: Fri Apr 24 2026 - 16:12:35 EST
On Fri, Apr 24, 2026 at 08:03:14PM +0000, Roman Gushchin wrote:
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> writes:
>
> > On Fri, Apr 24, 2026 at 09:22:51PM +0200, Peter Zijlstra wrote:
> >
> >> mdir = mailbox.Maildir('~/Maildir/');
> >>
> >> for i, r in enumerate(reviews):
> >> inline = r.get('inline_review', '') or ''
> >> if not inline:
> >> continue
> >>
> >> author_name = r.get('author_name', 'Sashiko Reviewer')
> >> author_email = r.get('author_email', 'noreply@xxxxxxxxxxx')
> >>
> >> msgid = msgids[r['patch_id']]
> >> subject = subjects[r['patch_id']]
> >>
> >> # Create the Email object
> >> msg = EmailMessage()
> >> msg['Subject'] = f"Re: {subject}"
> >> msg['From'] = f"{author_name} <{author_email}>"
> >> msg['To'] = "peterz@xxxxxxxxxxxxx"
> >> msg['Date'] = formatdate(localtime=True)
> >>
> >> # The critical threading headers
> >> msg['Message-ID'] = f"<review-{i}-{msgid}>"
> >> msg['References'] = f"<{msgid}>"
> >> msg['In-Reply-To'] = f"<{msgid}>"
> >>
> >> msg.set_content(inline)
> >>
> >> mdir.add(msg)
> >>
> >> mdir.flush()
> >
> > So Ideally I would have 'Reply-to' header set to the original sender and
> > added 'Cc' like the original email. However, AFAICT the JSON does not
> > contain this information, and while I could use the mdir object to find
> > the original message in my Inbox, this is incredibly slow.
> >
> > I have a TODO to use python-notmuch to do this, but haven't gotten
> > around to doing this yet.
> >
> > With that 'fixed' I could actually reply to these messages and it would
> > all 'just' work. For now I copy/paste when needed.
>
> I can add an api to return a json with the review and all
> meta-information by the original msgid, will it be useful?
Oh yes, that would be more convenient. Thanks!