hello and welcome to HCM,
indicates bacterial decay or infection in the tooth that involves the exposed tooth nerve tissues .
such infected tooth needs to be treated by a root canal
procedure so please consider getting the treatment done by consulting a dentist
you may need a X RAY examination done for your teeth to confirm the spread of infection.
i would suggest you to start with antibiotic Augmentin 625mg along with analgesics like aceclofenac
two times daily for 3 to 5 days .
This course of medicines will help in subsiding pain and and prevents infection till you go for knee surgery
You can plan for knee surgery as both the procedures are not related.
i hope this helps ,