This Swedish comfort food can be served throughout the day, as breakfast or a snack, alongside lingonberry (or another red-berry) jam, and perhaps bacon. The dumplings can also be served simply boiled, not fried.
Place potatoes in a large saucepan, and cover with cold water by about 2 inches. Add 1 tablespoon salt, and bring to a boil. Reduce heat, and simmer until tender, about 30 minutes. Drain, and immediately return to pan. Return to stove (with burner off), and let dry for 15 minutes. Peel potatoes, and pass through a ricer or a food mill, into a large bowl. Let cool completely, at least 2 hours (or cover and refrigerate overnight).
Meanwhile, cook bacon in a medium skillet over medium-high heat for 2 to 4 minutes. Add onion and allspice, reduce heat to medium, and cook until onion is soft, about 4 minutes. Add ham, and cook until both bacon and ham are lightly browned, about 10 minutes. Let cool.
Toss cooled potatoes with flour and 1 1/2 teaspoons salt. Gradually add egg yolks, stirring until incorporated. Using your hands, gather mixture in a mound.
Place about 1/4 of the potato mixture on a lightly floured work surface. Shape into a log that is 1 1/4 inches in diameter, then cut it crosswise into five 2-inch pieces. With floured hands, roll each portion into a ball, and use 2 fingers to make a deep indentation in center. Place 1 heaping tablespoon bacon filling in center, pinch to enclose filling, and press to seal. Flatten slightly into a disc. Place on a parchment-lined baking sheet, and cover with a clean kitchen towel. Repeat with remaining dumplings.
Bring a large pot of salted water to a boil. Add 5 dumplings. Cook, stirring occasionally, until dumplings rise to the surface, about 5 minutes. Using a slotted spoon, transfer to a clean kitchen towel to drain. Repeat.
Heat 3 tablespoons butter in a large skillet until foamy. Fry dumplings in batches, being careful not to overcrowd them, until golden brown, about 3 minutes per side. Cover loosely with parchment and then foil to keep warm. If butter browns between batches, wipe out skillet, and add more butter. Meanwhile, fry bacon slices for serving on the side if desired. Serve immediately.