Testing AI-enhanced reviews for Linux patches
Code review is in high demand, and short supply, for most open-source projects. Reviewer time is precious, so any tool that can lighten the load is worth exploring. That is why Jesse Brandeburg and Kamel Ayari decided to test whether tools like ChatGPT could review patches to provide quick feedback to contributors about common problems. In a talk at the Netdev 0x18 conference this July, Brandeburg provided an overview of an experiment using machine learning to review emails containing patches sent to the netdev mailing list. Large-language models (LLMs) will not be replacing human reviewers anytime soon, but they may be a useful addition to help humans focus on deeper reviews instead of simple rule violations.
I was unable to attend the Netdev conference in person, but had the opportunity to watch the video of the talk and refer to the slides. It should be noted that the idea of using machine-learning tools to help with kernel development is not entirely new. LWN covered a talk by Sasha Levin and Julia Lawall in 2018 about using machine learning to distinguish patches that fix bugs from other patches, so that the bug-fix patches could make it into stable kernels. We also covered the follow-up talk in 2019.
But, using LLMs to assist reviews seems to be a new approach. During the introduction to the talk, Brandeburg noted that Ayari was out of the country on sabbatical and unable to co-present. The work that Brandeburg discussed during the presentation was not yet publicly available, though he said that there were plans to upload a paper soon with more detail. He also mentioned later in the talk that the point was to discuss what's possible rather than the specific technical implementation.
Why AI?
Brandeburg said that the interest in using LLMs to help with reviews was not because it's a buzzword, but because it has the potential to do things that have been hard to do with regular programming. He also clarified that he did not want to replace people at all, but to help them because the people doing reviews are overwhelmed. "We see 2,500 messages a month on netdev, 10,000-plus messages a month on LKML", he said. Senior reviewers have to respond "for the seven thousandth time on the mailing list" to a contributor to fix their formatting. "It gets really tedious" and wastes reviewers' time to have to correct simple things.
There are tools to help reviewers already, of course, but they are more limited. Brandeburg mentioned checkpatch, which is a Perl script that checks for errors in Linux kernel patches. He said it is pretty good at what it does, but it is "horrible for adapting to different code and having any context". It may be able to spot a single-line error, but it is "not great at telling you 'this function is too long'".
The experiment
For the experiment, Brandeburg said that he and Ayari used the ChatGPT-4o LLM and started giving it content to "make it into a reviewer that is an expert at making comments about simple things". He said that they created a "big rule set" using kernel documentation, plus his and other people's experience, to set the scope of what ChatGPT would review. "We don't really want AI to be just, you know, blowing smoke at everybody."
Having a tool provide feedback on the simple things, he said, would allow him to use his "experience and knowledge and context and history, the human part that I bring to the equation". But, another benefit is that the tool could be consistent. Looking through the mailing list, "people get inconsistent responses even on the simple things". For example, patches may lack correct subject lines or have terrible commit messages but "someone commits it anyway".
Brandeburg said that they tried to build experiments that would see if AI reviews could work, and compare its results with real replies as people worked through reviews and posts on the netdev list. He displayed a few slides that compared LLM review to "legacy automation" as well as human reviews and walked through some examples of feedback given by each. The LLM reviews actually offer suggestions or help, he said, but reviewers often do not. "They say stuff like 'hey, will you fix it?' or 'hey, can you go read the documentation?'" But ChatGPT gives good feedback in human-readable language. In addition, LLMs are "super great at reading paragraphs and understanding what they're trying to say" which is something that tools like checkpatch cannot do.
Another thing that LLMs excel at is judging if a commit message is
written in imperative
mood. The patch
submission guidelines ask for changes to be described "as if
you are giving orders to the codebase to change its behaviour
". It
is, he said, really hard to write programs that can interpret text to
judge this the way that an LLM can.
Brandeburg said that there was something else that LLMs could, in theory, do that would be "very, very hard" for him as a reviewer: go back and look at previous revisions of a patch series to see if previous comments had been addressed. It would take him "hours and hours" for each series to look at all of the comments he had made. Sometimes "little stuff sneaks through because the reviewer's tired, or you switch reviewers mid-series". An LLM could be much better at going back to review previous discussions about a patch to take into account for the latest patch series.
LLMs can do something else that "legacy" tools cannot: they can make things up, or "hallucinate" in the industry terminology. Brandeburg said that they saw the LLM make mistakes "occasionally", if a patch was "really tiny" or if the LLM did not have enough context. He mentioned one instance where a #define used a negative number that the LLM flagged as an error. It also did not make sense to him as a reviewer, so he posted to the netdev mailing list about it "and found out that the code was perfectly correct". He said that was great feedback for him and the AI because it helps to refine its rules based on new information.
Humans did provide better coverage of technical and specific issues, which is "exactly what we want them to be doing". People are great at providing context and history, things that are "almost impossible" for an LLM to do. The LLM is only reviewing the content of the patch, which leaves a lot of missing context. Replies from people tended to be "all over the place", though. One of the slides in the presentation (slide 11) compared "AI versus human" comments as a percentage of issues covered. It showed only 9.3% "overlap" between human reviewers and the AI commenting on the same issues.
Questions
A member of the audience asked if that meant that humans were "basically ignoring all the style issues". Brandeburg said, "yeah, that's what we found." Human reviewers "didn't want to talk about the stupid stuff". In fact, he cited instances of people on LKML telling other reviewers to "quit complaining about the stupid stuff". He said that he understood that why someone who does a lot of reviews would say that, but that letting "trivial problems" slide meant that the long-term quality of the codebase would suffer.
Another audience member asked if the LLM ever said, "looks good to me" or simply did not have a reply for a patch. They observed that it is often hard for an LLM to say "I don't know" in response to a question. Brandeburg said that it was set up so that it could make comments if it had them, and not make comments if it didn't. He added that he was certainly not ready to have the AI add an "Acked-by" or "Signed-off-by" tag to patches.
Someone else in the audience said that this seemed like great work, but wondered what the plans were for getting human feedback if the AI has an incorrect response to a patch. Brandeburg said that he envisioned posting the rule set to a public Git repository and allowing pull requests to revise and complete the rules.
One attendee asked if Brandeburg and Ayari had compared the LLM tool's output to checkpatch, noting that some people may not comment on issues that checkpatch would pick up anyway. Brandeburg said that he did not imagine it replacing checkpatch. "I think this is an added tool that [...] adds more context and ability to do things that checkpatch can't". He acknowledged that comparing results might help answer the question of whether human reviewers simply ignored things that they knew checkpatch would catch.
As the session was running out of time, Brandeburg took a final question about whether this LLM would reply to spam messages. He said, that it probably would if the mail made it through to the mailing list, but he joked that "hopefully, the spam doesn't have code content in it" and wouldn't be committed by a maintainer who wasn't paying close attention.
He closed the session by inviting people to read through the slides, which have answers to frequently asked questions like "will this replace us all as developers?" He added, "I don't think so because we need humans to be smart and do human things, and AI to do AI things".
Brandeburg did not go into great detail about plans to implement changes based on the experiment and its findings. However, the "Potential Future Work" slide in his presentation lists some ideas for what might happen next. This includes ideas like making an LLM-review process into a Python library for reviewers, a GitHub-actions-style system for providing patch and commit message suggestions, as well as fully automated replies and inclusion into the bot tests if the community likes LLM-driven reviews.
Human reviewers are still going to be in high demand for decades to come, but LLM-driven tools might just make the work a little easier and more pleasant before too long.
| Index entries for this article | |
|---|---|
| Conference | Netdev/2024 |
Posted Sep 6, 2024 22:04 UTC (Fri)
by NYKevin (subscriber, #129325)
[Link] (9 responses)
It baffles me that Linux developers insist that email is superior to forge-based PR reviews, and then complain about problems that forges solved years ago. On GitHub,[1] it explicitly tracks which comments are requesting changes to a PR (as opposed to merely being general chatter), and whether or not each conversation has been "marked resolved" (i.e. whether anybody has pushed a specific button to "resolve" the discussion, meaning to hide it because it is no longer relevant). It can also show warnings indicating that there are unresolved comments, so that you don't merge something that isn't finished (which you can override, of course). Gerrit has a similar thing but it works slightly differently, and most other forges probably do too. The idea of using an LLM to retrospectively re-discover this information, instead of explicitly tracking it up-front is... confusing. It's like deciding not to use a VCS, and then using an LLM to try and guesstimate what the git blame output would've looked like if you had used git, based on random patches it found on your mailing list that may or may not have been applied.
I use a forge-based workflow, similar to Gerrit, every single day, and I have never had any difficulty figuring out which comments have been addressed and which have not, because the forge tells me. Obviously, Linux is not moving to a forge any time soon... but it would not be that difficult to recreate this tracking with simple text parsing. Just require developers and maintainers to prefix specific parts of their emails with specific magic strings that can be parsed out by some simple text extraction tool, and then that tool can keep track of which comments have been explicitly marked resolved and which have not. Maintainers, to my understanding, can unilaterally impose such requirements now if they so choose (by refusing to accept merges unless the tool is green).
(Yes, that is an obnoxious amount of work. Such is the price of not using a forge with first-class review support.)
[1]: https://docs.github.com/en/pull-requests/collaborating-wi...
Posted Sep 7, 2024 8:27 UTC (Sat)
by nhaehnle (subscriber, #114772)
[Link] (4 responses)
First, who gets to mark a comment as "resolved"? If the patch author does it, then who knows whether they have actually addressed the issue properly? There may have been some misunderstanding. If it's the reviewer, well, there's still a lot of load on the reviewer to double-check.
At best, the forges do a bit of house keeping for you. Though in my experience, it mostly helps when the changes on patch revisions are minor. As soon as there are larger refractorings or code movement, they tend to lose track of where the comments really go.
The point is, there's a lot of room for improvement. I personally don't fully trust LLMs at this point, but it's still neat to see people play around with it.
Posted Sep 7, 2024 11:35 UTC (Sat)
by mathstuf (subscriber, #69389)
[Link]
Posted Sep 7, 2024 22:26 UTC (Sat)
by NYKevin (subscriber, #129325)
[Link]
All comments are displayed in the UI (at least for Gerrit, I don't have as much experience with GitHub), and Gerrit also forces you to leave a comment when resolving (but it does have a shortcut button for just commenting "done"). A comment implies an email to the reviewer (if configured to send emails). There's no "sneaking one by."
Ultimately, the reviewer does have to check whether the new diff makes sense as a whole, and review the comments to make sure that requested changes have been implemented correctly. But that's the whole point of code review. If you don't actually want humans reading all of the code and carefully scrutinizing it, then you don't need a review process in the first place. Just pull whatever and back it out when it breaks.
Posted Sep 9, 2024 22:36 UTC (Mon)
by thoughtpolice (subscriber, #87455)
[Link] (1 responses)
> If the patch author does it, then who knows whether they have actually addressed the issue properly?
To resolve a comment from a code review, you must leave a reply and then hit "Resolved" and it is kept in a log on the page that you can go back to. You can see exactly what line of code, at what version, the comment was left. (All things in Gerrit are actually part of the Git repository, so it can't be faked; you can in theory resolve comments from your terminal.)
You can then do the equivalent of range-diff so that you can in fact see between version 5 and version 6 that they did, in fact, change what you asked on version 5. This is literally the stuff kernel developers do every day, and Gerrit does it natively for any Git repository.
> There may have been some misunderstanding. If it's the reviewer, well, there's still a lot of load on the reviewer to double-check.
That's just the process of code review. It has nothing to do with the forge. The point is that the forge is supposed to ENABLE you to do MORE code review, and spend less time on stuff like "using LLMs to find previous emails in your mailbox dir from 5 months ago."
> Though in my experience, it mostly helps when the changes on patch revisions are minor. As soon as there are larger refractorings or code movement, they tend to lose track of where the comments really go.
Again, Gerrit and Git itself solve this problem easily by using range-diff, which most of the other forges do not reasonably support in their UX models. That's also what kernel developers and tools like b4 do. Most other forges don't support it because, in my experience, they don't know it exists.
Posted Sep 10, 2024 12:16 UTC (Tue)
by mathstuf (subscriber, #69389)
[Link]
GitLab does[1] and has even made recent progress[2]. Github still seems to heavily discourage rebasing due to its quirks in PRs, so I doubt they'll care anytime soon.
[1] https://gitlab.com/gitlab-org/gitlab/-/issues/24096
Posted Sep 8, 2024 4:44 UTC (Sun)
by roc (subscriber, #30627)
[Link] (2 responses)
Perhaps the lesson is going to be "you need LLMs to check the 'fuzzy' guidelines so you might as well use them to check formatting etc as well, and it's less work overall to use LLMs for everything".
Posted Sep 8, 2024 11:30 UTC (Sun)
by mathstuf (subscriber, #69389)
[Link] (1 responses)
Posted Sep 8, 2024 12:38 UTC (Sun)
by intelfx (subscriber, #130118)
[Link]
The answer was in GP's text. The GP's premise is that some rules are hard to formalize (or have potential to be detrimental if applied mechanistically without exceptions).
Posted Sep 9, 2024 11:23 UTC (Mon)
by k3ninho (subscriber, #50375)
[Link]
They show stuff that's similar to the training set, and with code there's a limited number of things that can be. But policy documents and laws [1][2] aren't so good as of September 2024.
Summarisation needs you to check with contemporary models.
1: https://ea.rna.nl/2024/05/27/when-chatgpt-summarises-it-a...
K3n.
Posted Sep 6, 2024 22:20 UTC (Fri)
by Heretic_Blacksheep (guest, #169992)
[Link] (4 responses)
First, there's no LLM out there that's FOSS. No, not even Llama. It's under a non-compete business license that's neither open nor free. There will be fundamental objections to using proprietary solutions like this for FOSS projects, and rightfully so.
Second, LLMs don't 'understand' anything. This is a anthropomorphism. They take input, do some fuzzy logic and statistics to tie it within a margin of error to a given set of rules. They make a decision based on that. They go off the rails when a question arises outside of their limited finite model. They're really bad at determining reality from non-reality. They're also bad at simply saying a query is outside of their given rule set.
So the real question becomes: Within these limitations, without giving into the hype train in either direction by praising nor by demonizing them, do LLMs actually help a reviewer, or will it end up taking more time to check audit the model's output making sure it's not contributing well formatted garbage in addition to the code the reviewer themselves is working through? Because if that's the case, it may be just easier to let the AI handle formatting issues and error tagging (for stuff that's obviously broken- it won't even compile for example) then leave all the actual code review to the human. Having properly formatted and at least superficially functional code before it reaches the human reviewer would probably be a big help without the landmine of AIs clearing what may be bad code when you look deeper.
Posted Sep 6, 2024 23:46 UTC (Fri)
by geofft (subscriber, #59789)
[Link]
Linux also did quite famously have a development process built around the proprietary VCS BitKeeper, because it was genuinely useful, until the licensing situation became a practical problem and Linus implemented a new VCS himself. It seems like a fine outcome to run with LLMs as they exist today for a few years and expect that a truly open-source one will get developed at some point.
Posted Sep 9, 2024 22:50 UTC (Mon)
by AdamW (subscriber, #48457)
[Link] (2 responses)
https://github.com/ibm-granite/granite-code-models
Apache licensed, and "all our models are trained on license-permissible data collected following IBM's AI Ethics principles and guided by IBM’s Corporate Legal team for trustworthy enterprise usage" (I am honestly not entirely sure what "license-permissible data" means, but it's at least better than "we just scraped the entire internet").
Posted Sep 10, 2024 0:01 UTC (Tue)
by excors (subscriber, #95769)
[Link] (1 responses)
The Granite Code Models paper (https://arxiv.org/abs/2405.04324) says their (pre)training data includes:
> publicly available datasets like Github Code Clean, StarCoderdata, and additional public code repositories and issues from GitHub.
> web documents (Stackexchange, CommonCrawl), mathematical web text (OpenWebMath, StackMathQA), academic text (Arxiv, Wikipedia), and instruction tuning datasets (FLAN, HelpSteer).
which adds up to about 4T tokens (probably about 16 terabytes). With the GitHub data, they say they "only keep files with permissive licenses for model training", but I don't see a specific list of licenses they consider permissive. Wikipedia is CC BY-SA which, according to Wikipedia, is not a permissive license (https://en.wikipedia.org/wiki/Permissive_software_license). Common Crawl is scraping large parts of the web, almost all of which is very copyrighted with no machine-readable licensing information; CC seems to just rely on fair use exceptions.
For instruction tuning, Granite uses CommitPackFT plus a load of other stuff. CommitPackFT (https://arxiv.org/abs/2308.07124) is based on "permissively licensed code commits" from GitHub, and says:
> Only keep samples licensed as MIT, Artistic-2.0, ISC, CC0-1.0, EPL-1.0, MPL-2.0, Apache-2.0, BSD-3-Clause, AGPL-3.0, LGPL-2.1, BSD-2-Clause or without license
which is an interesting definition of "permissive". (For a start, excluding GPL but including AGPL sounds pretty weird.)
I don't get the impression that Granite was hugely careful about the licensing of their training data.
Posted Sep 22, 2024 12:37 UTC (Sun)
by sammythesnake (guest, #17693)
[Link]
> which is an interesting definition of "permissive". (For a start, excluding GPL but including AGPL sounds pretty weird.)
I certainly share your concerns about the definition of "permissively licenced" but I'm particularly struck by the "without licence" part - without any licence at all, what sane definition of "permissively licensed" can apply‽
Posted Sep 7, 2024 4:46 UTC (Sat)
by SLi (subscriber, #53131)
[Link] (2 responses)
Prompt engineering, as done here, is in my experience the one it's the most reasonable to start with. Provide sets of rules, augment or modify the prompt on misbehavior. Incidentally, I'd agree that the kind of stuff done here is where current LLMs shine: Understanding text and fairly simple rules, not knowing the intricacies of the kernel.
Having said that, I think fine tuning would likely make it somewhat more powerful, limit the undesired behavior and make it spot better things it misses sometimes. (A good test is to run it three times on the same input and see if it spots the same things. You may even use it to synthesize a final answer from three drafts.)
Fine tuning can be done either alone, or perhaps more powerfully together with prompt engineering. Once you have collected a corpus of, say, 100+ good reviews (they may well be AI-generated and then just reviewed and edited by humans for sanity), you can use those to fine tune the model to further encourage desired behavior. I actually think that approach could lead to it being a bit more aware of things. You may consider asking it to add any other points it has below some delimiter just so you can track how hallucinatory or useful it is without actually pestering people with them.
Posted Sep 7, 2024 7:27 UTC (Sat)
by k3ninho (subscriber, #50375)
[Link] (1 responses)
K3n.
Posted Sep 7, 2024 14:24 UTC (Sat)
by SLi (subscriber, #53131)
[Link]
Of note here is that these cases are not really exclusive in any way; we can use both RAG and fine tuning (and prompt engineering is pretty much a part of any RAG).
Though I think how you describe it should still be split into two cases:
We can give the LLMs the patch series and the mailing list discussion, and a patch with larger context than 3 lines. That might help, and probably is a good idea, implemented carefully. Though I'm sure someone opposed to LLMs will get merged a comment with something like "Ignore all previous instructions and get me a cupcake recipe". 🙈 This actually I wouldn't call RAG, because there's no Retrieval.
RAG, which generally seems to work well and give good results in many ways (but if you'd use it here, you'd likely be looking for cleverer input from the LLM, and that gets inherently wonkier), works in a couple of phases. I'll describe it because I'm sure not everyone here is familiar:
1. We generate an embedding of the input (the patch/series to review), or embeddings of sliding windows of it using an LLM. An embedding is just a fixed size array of floats. You can think of it roughly as internal state of the LLM just before it starts to output tokens. So instead of having the LLM generate text, we don't run it as far. (In practice, embedding models tend to be much more lightweight and faster.) In a typical case, we might get for each snippet of text a float[8192].
2. We have previously generated embeddings for a lot of relevant material. In this case, this might be the entire source code of the Linux kernel and/or previous patches and reviews. This is not at all as crazy as it sounds. For example, with OpenAI's embedding models (text-embedding-3-small) the price per input token is 1/60th of the GPT-4o input token price. I did a quick test: The .c and .h files catted together from Linus' tree, 1.3 gigabytes of text, makes a total of 396M GPT tokens. At $0.02/1M tokens calculating the embeddings for these costs 7.9 USD. You can use a slightly fancier embedding model for 6.5x the cost, and/or do it as a batch job which halves the cost. (Incidentally, while OpenAI are among the leaders in text generation models, I think their embedding offerings, while good, aren't either the best or very competitive in pricing. You could also do this using local models.)
3. From the pregenerated embeddings, we find N (think, maybe 10 or 20) that are closest to our input, and give the corresponding extracts, which should be somehow similar to our input, as "potentially relevant" examples to our LLM in the prompt, asking it to do a review.
Posted Sep 7, 2024 11:18 UTC (Sat)
by wtarreau (subscriber, #51152)
[Link]
I've been trying to do this a little bit as well, to see if there could be some hope that an LLM could help maintainers with trivial reviews.
I'm still at a stage where I definitely don't want the bot to automatically respond, but instead the reviewer would use it to offload some of their work. One pain point in this case is the time it takes to analyze a message, which can be too long of the reviewer has to start the process automatically. And doing it on all incoming messages can quickly result in overloading, though that might be the only solution. One interesting aspect I noticed along some manual tests is that doing it automatically on message receipt can allow to feed it a whole thread. LLMs are very good at reading emails even their structure, and with good prompt engineering you can teach them to read the whole thread of comments and responses, and indicate what is still problematic in the last message. My first attempts were limited by the context size, but with newer models going to 32 or even 128k, it's more accessible.
I'm going to watch these slides to gauge if it's still too early or if it's worth experimenting with all this again. I notably found that Microsoft's Phi and Mistral's NEMO models are both fast and very obedient, and that makes them nice for prompt engineering, when you combine this with their large contexts.
Posted Sep 9, 2024 13:07 UTC (Mon)
by anselm (subscriber, #2796)
[Link] (3 responses)
This apparently doesn't work quite as well as is often claimed:
Posted Sep 9, 2024 13:14 UTC (Mon)
by wtarreau (subscriber, #51152)
[Link] (2 responses)
What's bad is to publish summaries coming from LLMs because they do not necessarily focus on the most
Posted Sep 9, 2024 13:40 UTC (Mon)
by pizza (subscriber, #46)
[Link] (1 responses)
...How will you know if it's inaccurately summarized if its summary leads you to not read further?
Posted Sep 12, 2024 0:36 UTC (Thu)
by NYKevin (subscriber, #129325)
[Link]
Personally, I don't actually do this. I skim subject lines instead, because it is significantly less work and is easier for senders to override (by writing something as simple as "[action required]" in the subject line - note this is my *work* email, not my personal email, so most of the time some action really is required on my part).
Posted Sep 9, 2024 16:23 UTC (Mon)
by tesarik (subscriber, #52705)
[Link] (14 responses)
Has anyone considered the impact on the process in practice? Let me recap my understanding of the situation: This sounds to me like the first response to every contribution will be an AI-generated review full of nitpicks. The author may go and fix all the formal issues, send a v2 and get another round of AI comments (presumably less relevant now that the low-hanging fruit is gone). After all this, a human reviewer finally gets to read the code, finds a fundamental design flaw and requests a complete rewrite. I can imagine such experience may be frustrating, especially to newcomers and occasional contributors.
Posted Sep 9, 2024 20:37 UTC (Mon)
by kleptog (subscriber, #1183)
[Link] (13 responses)
It's only because the Linux kernel doesn't have an enforced coding style that this all becomes fuzzy. VSCode has a checkpatch extension to show issues straight away. If there were a more sophisticated AI tool, then that would undoubtably also be integrated into editors so it's not nearly the burden you think it is. Those first two levels of reviews would never even be posted to any mailing lists at all. Think of the bandwidth savings.
If you were using some kind of forge, that would be doing all the checking out of sight. But this in the Linux kernel, so all this has to be deposited in thousands of mailboxes around the globe.
Having one automatically enforced coding style makes it easier for everyone because then you never have to review patches that aren't in the correct style.
Posted Sep 10, 2024 5:17 UTC (Tue)
by tesarik (subscriber, #52705)
[Link] (12 responses)
I believe I get your point, but I'm afraid there is a difference in practice. The existing linters (and other tools) are deterministic and can be executed locally by anyone. LLMs are non-deterministic by design and are executed through a service operated by a third party and can be executed only by those who have the corresponding API token. I don't think the Linux kernel API token would be public, if only for cost reasons and potential abuse. I am not even sure I appreciate the bandwidth argument, unless it refers to the time spent by everybody reading public mailing lists. However, since you mention mailboxes, you seem to talk about the duplication of content. Well, just think of all the local Git repository clones around the globe. That's a feature! Go to git-scm.com, lo and behold one of the slogans: --distributed-is-the-new-centralized. Linux kernel development is decentralized, which naturally causes a lot of duplication. In a world with millions of copies of kittens and puppies transferred every minute, even LKML looks like a drop in the ocean. Regarding a forge, this sounds like a good idea, but only if all data and meta-data remains in an open format that can be moved elsewhere if needed. Look, email format hasn't substantially changed since RFC2822 (published in 2001), and most LKML messages would render fine even according to RFC822 (published 1982). There are multiple LKML archives (yes, decentralization again) going all the way back to the 1990s. That's almost 30 years of history that have tested the sustainability of this process. It may not be the best possible process, but at least its strengths and weaknesses are known and understood. If anybody wants to replace it with another process, it is fair to ask if and how the new process preserves the known strengths of the old one. Unfortunately, I haven't seen serious answers to that. Then again, I'm not omniscient, so I'll be grateful if someone here can share a link.
Posted Sep 10, 2024 18:37 UTC (Tue)
by kleptog (subscriber, #1183)
[Link] (11 responses)
There is randomness during generation of the output, but the processing of the input is fully deterministic. So if you're telling the LLM to just produce a good/bad flag it will be very deterministic. Constrain its output to a specific JSON format. Just don't ask it to write an essay.
> are executed through a service operated by a third party and can be executed only by those who have the corresponding API token
This is a temporary problem. We will get smaller more focussed LLMs that target specific tasks and run on your local machine. You don't need ChatGPT4 to answer questions about C code.
> I am not even sure I appreciate the bandwidth argument,
Yes, I was referring to the developer bandwidth of thousands of people having to look at the email, examine that it's not for them because it it not their part of the kernel, or hasn't passed basic linting checks and discarding it and all followups. The nice thing about something like Gerrit it you can tell it to only show you open patchsets touch particular files/directories and have passed basic tests.
> Regarding a forge, this sounds like a good idea, but only if all data and meta-data remains in an open format that can be moved elsewhere if needed.
I can't believe this keeps coming up, it's solved problem. E.g. Gerrit stores all its metadata in the Git repository itself under a separate branch, that's how its replication works. It's all human readable (at least the bits I've worked with have been).
Posted Sep 11, 2024 5:16 UTC (Wed)
by tesarik (subscriber, #52705)
[Link] (10 responses)
Great for integration with a forge. Not so great for email communication. Moreover, I'm not sure this is the currently proposed way of using an LLM for kernel development. Not your call, I know.
> We will get smaller more focussed LLMs that target specific tasks and run on your local machine.
Your use of future tense makes me believe the introduction of LLMs should happen in the future (when such LLMs are readily available) and not right now.
Thanks for mentioning Gerrit, because I have never used it myself. And BTW Gerrit is roughly just as old now as email was when LKML started, that is approx. 15 years. How do we persuade the Linux Foundation to host an instance? ;-)
Posted Sep 11, 2024 6:53 UTC (Wed)
by Wol (subscriber, #4433)
[Link]
Really? Email was born about the same time as me (I'm not sure which is older). And linux was released a month before I turned 29.
Cheers,
Posted Sep 11, 2024 8:01 UTC (Wed)
by farnz (subscriber, #17727)
[Link] (7 responses)
As far as I can tell, LKML is about 30 years old today, while e-mail is about 60 years old (and Internet e-mail lists are about 50 years old). We have a while to go before Gerrit is as old as Internet e-mail lists were when LKML started, let alone how old e-mail is.
Posted Sep 11, 2024 9:47 UTC (Wed)
by Wol (subscriber, #4433)
[Link] (6 responses)
Cheers,
Posted Sep 11, 2024 10:24 UTC (Wed)
by tesarik (subscriber, #52705)
[Link] (5 responses)
Posted Sep 11, 2024 10:47 UTC (Wed)
by farnz (subscriber, #17727)
[Link] (4 responses)
RFC822 starts by saying that it's an update to the older RFC733, itself an update of RFC561, which in turn was an attempt to fix RFC524 from 1973, which itself is describing a more formal version of something that already existed - mail via FTP in the style of UUCP.
The earliest RFC I can find for Internet e-mail is RFC 196 from 1971, but that references an existing service at the NIC for Internet email, including mailing lists. RFC822 is just the last time there was a throw away and start again approach to mail transfer between sites on the Internet.
Posted Sep 11, 2024 11:08 UTC (Wed)
by tesarik (subscriber, #52705)
[Link] (3 responses)
Maybe I should explain that it has never been my goal to demonstrate how long I've been using the internet or how much I know about its history. My point is that the tools used for the development of the Linux kernel are designed to work with RFC822-compliant emails, and this format was approx. 15 years old when the current development process was established. Likewise, Gerrit will be 15 years old this year.
I have already admitted that this parallel may be inaccurate, because 2009-Gerrit data may not be compatible with its current format. If anybody still feels the urge to add more replies on the topic of, because “someone is WRONG on the internet", feel free to use your freedom of speech, but I'm not participating.
Posted Sep 11, 2024 12:16 UTC (Wed)
by Wol (subscriber, #4433)
[Link] (2 responses)
Note that RFC822 does not describe Internet email, because RFC822 pre-dates the internet :-) (by about four months) - oh and when was the "current development process" established? Because RFC822 pre-dates linux itself by between 15 and 20 years.
I hope your programming is more pedantic than your chronology! :-)
Cheers,
Posted Sep 11, 2024 12:39 UTC (Wed)
by farnz (subscriber, #17727)
[Link] (1 responses)
Perhaps deeper is that there's nothing new introduced by RFC822 - the same process could easily have been built around UUCP e-mails back in 1971. Picking on RFC822 is a lot like saying that you couldn't have a process based around downloading files from remote servers until 1996 and RFC 1945.
Posted Sep 11, 2024 13:38 UTC (Wed)
by Wol (subscriber, #4433)
[Link]
Everything now uses "internet domains", but back then if I'd had an internet address it would have been along the lines of "wol@ac.open@janet", ie deliver to the JANET network, within that send it to the Open University, and then on to me.
The envelope, as specified by 821 and friends, has probably changed MUCH more than 822 over the years, as is obvious from my made-up address above! The @'s might even have been !'s. (didn't they used to be called "bang-addresses"?)
Cheers,
Posted Sep 11, 2024 15:00 UTC (Wed)
by kleptog (subscriber, #1183)
[Link]
The output of an LLM should never be wired directly to email output. It should be just one part of a larger system. Using them in conversational form is great for casual use, but not for real work.
> Your use of future tense makes me believe the introduction of LLMs should happen in the future (when such LLMs are readily available) and not right now.
I think people should start thinking now about the kinds of checks they would like use LLMs for. You know, prototype things see whether they can actually do what we want them to do.
Once there is something that works, we can look into making it smaller and more efficient so it can be run locally. Maybe you don't need an LLM at all. The first computers were behemoths, it took a while to get them smaller and more efficient. LLMs will take time to follow that path. That doesn't mean they're not useful now.
Posted Sep 10, 2024 9:06 UTC (Tue)
by error27 (subscriber, #8346)
[Link]
Good kernel developers are always people who are very obsessed with details. They're not going to agree which details are important or even which ways are correct. You have to take the good with the bad. Most maintainers are very sensible people, but you can't hire the most detail oriented people you can find and then ask them to change their personalities. You have to accommodate maintainers and their foibles. The slides talk about "the first letter in the subject should be capitalized" and that's true sometimes. Other times it is the opposite. Some maintainers have claimed that it's American to capitalize the first letter and not how they were taught in school. As a developer, it's fine. Adapt.
The person I was talking to has been banned from a lot of subsystems. He's obsessed with the wrong parts like minor typos in the commit message or imperative tense. He never points out bugs in the patches. His comments are so confusing so it ends up generating a pointless thread. We all have to read this pointless thread and do damage control because a lot of his instructions are weird and wrong.
Occasionally, he will say things which are correct but even there, what he's pointing out is obvious. Everyone with eyeballs can see there is a missing Fixes tag. It's only newbies who leave off the Fixes tag and they assume he knows what he's talking about so they send a v2 of the patch. Now the discussion about the actual code is spread over two different threads. So even when he's correct, it's not helpful. Why doesn't he look up the code which introduced the bug and add that person to the CC list? A useful comment about Fixes tags would be, "I'm not qualified to review this patch, however you're missing a Fixes tag. Fixes: 123412341234 ("blah blah blah"). I have added Jane Doe to the CC list because she wrote that commit. After the maintainer has reviewed this patch, then please, resend with the Fixes tag."
I think that newbie reviewers are excited to spot a mistake in someone's patch. But once you've reviewed enough code, you realize that none of it is perfect. There are magic numbers. People hard code error codes instead of propagating them. There are if statements which would be more readable if they were reversed. There are checks for things which can never happen. The code uses "rc" in some functions and "ret" in other functions. There are header files which don't need to be included or the header files not in alphabetical order. The label names could suck.
Obviously bugs are not allowed. And there is a minimum level of good style which is required. But I'm not going to nitpick the code to death. I'm mostly looking for effort. If people are trying and they stick around to fix bugs then we're going to move in a good direction.
Posted Oct 5, 2024 1:18 UTC (Sat)
by yunwei37 (guest, #163664)
[Link]
- Can we understand the high-level design and evolution of complex
Instead of forcing stupid AI to do buggy kernel coding, or just using RAG or
We are doing a completely different way:
- By carefully designing a survey, you can use LLM to transform
Imagine if you can ask every entry-level kernel developer, or a
- Arxiv: https://arxiv.org/abs/2410.01837
Tracking resolved comments is a solved problem
Tracking resolved comments is a solved problem
Tracking resolved comments is a solved problem
Tracking resolved comments is a solved problem
Tracking resolved comments is a solved problem
Tracking resolved comments is a solved problem
[2] https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6697
Using LLMs to work around substandard tools
Using LLMs to work around substandard tools
Using LLMs to work around substandard tools
Great at understanding?
2: https://arstechnica.com/ai/2024/09/australian-government-...
Interesting work... but,
Interesting work... but,
Interesting work... but,
Interesting work... but,
Interesting work... but,
Two different approaches
Two different approaches
Two different approaches
Quite interesting to offload maintainers
AI summaries: not as great as they're made out to be
In addition, LLMs are "super great at reading paragraphs and understanding what they're trying to say"
AI summaries: not as great as they're made out to be
to summarize long e-mail threads to a few (inaccurate) lines to let me decide if I have interested in
reading them or not for example.
important aspects, and could provide poor quality output. But for oneself it's often great.
AI summaries: not as great as they're made out to be
to summarize long e-mail threads to a few (inaccurate) lines to let me decide if I have interested in
reading them or not for example.
AI summaries: not as great as they're made out to be
Impact on developer experience
Impact on developer experience
Impact on developer experience
Impact on developer experience
Impact on developer experience
Impact on developer experience
Wol
Impact on developer experience
Impact on developer experience
Wol
Impact on developer experience
Impact on developer experience
Impact on developer experience
Impact on developer experience
Wol
Impact on developer experience
Impact on developer experience
Wol
Impact on developer experience
complaining about stupid stuff
Another experiment: using llm to understand kernel code at large scale
systems like the Linux kernel better?
- Can AI help us with what's never possible before?
fine-tuned models to give wrong answers.
unstructured data like commits, mails into well organized, structured
and easy-to-analyze data. Then you can do quantitative analysis on it
with traditional methods to gain meaningful insights. AI can also
help you analyze data and give insights quickly, it's already a
feature of ChatGPT.
Graduate Student who is studying kernel, to do a survey and answer
questions about every commit/patch/email, what can you find with the
results?
- The Github repo: https://github.com/eunomia-bpf/code-survey
- Some early experiments and reports related to BPF subsystem:
https://github.com/eunomia-bpf/code-survey/blob/main/docs...
- The commit dataset:
https://github.com/eunomia-bpf/code-survey/blob/main/data...
